Repository navigation
v0.5.0
-
BREAKING CHANGE: The optional parameters of delete, list, patch and watch operations are now emitted as a single common type -
k8s_openapi::DeleteOptional,k8s_openapi::ListOptional,k8s_openapi::PatchOptionalandk8s_openapi::WatchOptionalrespectively. For example, where an operation likek8s_openapi::api::core::v1::Pod::list_namespaced_podused to have anoptional: k8s_openapi::api::core::v1::ListNamespacedPodOptional<'_>, it now has anoptional: k8s_openapi::ListOptional<'_>parameter instead.This is because these per-operation optional structs all had the same members.
Furthermore, delete-collection operations like
Pod::delete_collection_namespaced_podnow take two optional parameters, one of typek8s_openapi::ListOptionalthat determines which items will be selected for deletion, and the other of typek8s_openapi::DeleteOptionalwhich determines how the selected items will be deleted. -
BREAKING CHANGE: Most response types had an empty
Unauthorizedvariant, and did not have other useful variants likeForbiddenorConflict. To handle those variants, you would have had to match on the emptyOthervariant and manually parse the response body into a JSON value.Now these empty variants like
Unauthorizedare no longer emitted, and the previously emptyOthervariant is now emitted asOther(Result<Option<serde_json::Value>, Error>). If the response body is empty, the response will be parsed asOther(Ok(None)). Otherwise, it will be parsed as JSON intoOther(Ok(Some(response)))orOther(Err(err)). -
BREAKING CHANGE: The
apimachinery::pkg::apis::meta::v1::Patchtype used to be incorrectly emitted as an empty struct. It is now emitted as an enum with variants corresponding to the three types of patches supported by Kubernetes -Json(Vec<serde_json::Value>),Merge(serde_json::Value)andStrategicMerge(serde_json::Value). -
BREAKING CHANGE: The
apimachinery::pkg::apis::meta::v1::WatchEventtype used to be emitted as a struct containing a weakly-typedobjectand stringly-typedtype_fields. It is now generic on the type of object and is emitted asenum WatchEvent<T>withAdded(T),Deleted(T),Modified(T),ErrorStatus(metav1::Status)andErrorOther(RawExtension)members. For v1.15 and above, the enum also has aBookmark(T)variant. -
BREAKING CHANGE: The
apiextensions_apiserver::pkg::apis::apiextensions::v1beta1::CustomResourceSubresourceStatustype used to be incorrectly emitted as an empty struct. It is now emitted as a newtype aroundserde_json::Value -
BREAKING CHANGE: The connect and exec operations on
Node,PodandServiceno longer have a corresponding response type. The response types were bogus, and these operations are not HTTP requests but SPDY or WebSocket requests anyway. The functions still returnhttp::Request, and you will need to decompose these into types that your SPDY / WebSocket crate uses. -
BUGFIX: Operation parameters that were used as path components of the request URL (such as
namespace) are now correctly encoded instead of being used verbatim. -
FEATURE: The
http::Requestreturned by API operation functions now has theContent-Typeheader set if the request has a body. Particularly for patch operations, this sets the correctContent-Typeheader corresponding to the type of patch used. -
FEATURE: A new crate
k8s-openapi-deriveis now released. This crate contains a custom derive that can be used on a CRD spec type to generate the corresponding CRD type, itsk8s_openapi::Resourceandk8s_openapi::Metadataimpls, and CRUD operations. See that crate's docs for more details.
Corresponding Kubernetes API server versions:
- v1.8.15
- v1.9.11
- v1.10.13
- v1.11.10
- v1.12.10
- v1.13.8
- v1.14.4
- v1.15.1