20 breaking releases

0.21.1 Feb 17, 2024
0.20.0 Sep 7, 2023
0.18.0 Apr 7, 2023
0.17.0 Jan 4, 2023
0.2.0 Jul 7, 2018

#22 in Development tools

Download history 21802/week @ 2023-12-23 48379/week @ 2023-12-30 67062/week @ 2024-01-06 63111/week @ 2024-01-13 74793/week @ 2024-01-20 66661/week @ 2024-01-27 64587/week @ 2024-02-03 67654/week @ 2024-02-10 57010/week @ 2024-02-17 82289/week @ 2024-02-24 66608/week @ 2024-03-02 74929/week @ 2024-03-09 73127/week @ 2024-03-16 75727/week @ 2024-03-23 78327/week @ 2024-03-30 57413/week @ 2024-04-06

297,455 downloads per month
Used in 154 crates (139 directly)

Apache-2.0

35MB
553K 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