21 breaking releases

0.22.0 May 4, 2024
0.21.1 Feb 17, 2024
0.21.0 Jan 20, 2024
0.20.0 Sep 7, 2023
0.2.0 Jul 7, 2018

#12 in Development tools

Download history 63203/week @ 2024-02-01 69170/week @ 2024-02-08 56937/week @ 2024-02-15 65848/week @ 2024-02-22 81860/week @ 2024-02-29 72235/week @ 2024-03-07 74694/week @ 2024-03-14 69956/week @ 2024-03-21 82910/week @ 2024-03-28 71020/week @ 2024-04-04 66356/week @ 2024-04-11 79258/week @ 2024-04-18 85197/week @ 2024-04-25 83499/week @ 2024-05-02 82183/week @ 2024-05-09 78168/week @ 2024-05-16

344,237 downloads per month
Used in 168 crates (150 directly)

Apache-2.0

42MB
657K SLoC

This crate contains definitions of the resource types in the Kubernetes client API, auto-generated from the Kubernetes OpenAPI spec.

crates.io

Documentation

Changelog

This crate is not generated using Swagger or the OpenAPI Generator directly, as clients generated by the common client generator are. This gives this crate a few important advantages.

Works around bugs in the upstream OpenAPI spec

The upstream OpenAPI spec is not written by hand; it's itself generated from the API server's Go code. As such, the spec makes mistakes when trying to convert the representations of Go types to OpenAPI, such as incorrectly representing the JSON type used in CRD validation, and incorrectly representing the type of objects inside a WatchEvent. A client generated naively from the spec inherits all these mistakes, and it is hard for such a client to fix them in "post".

Since this crate uses a custom code generator, it is able to work around these mistakes and emit correct bindings. See the list of fixes here and the breakdown of fixes applied to each Kubernetes version here.

Supports more versions of Kubernetes

Official clients tend to support only the three latest versions of Kubernetes. This crate supports a few more.

As mentioned above, the upstream OpenAPI spec contains mistakes. When upstream fixes these mistakes, it usually does not backport them to older versions (not even to supported older versions). This crate does backport those fixes if they're applicable.

License

k8s-openapi

https://github.com/Arnavion/k8s-openapi

Copyright 2018 Arnav Singh

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

The OpenAPI spec that these bindings are generated from is sourced from the Kubernetes repository https://github.com/kubernetes/kubernetes which also uses the Apache-2.0 license.

Dependencies