This repository was archived by the owner on Feb 10, 2026. It is now read-only.
Open
Conversation
ab72196 to
f011b01
Compare
f011b01 to
600c45a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.69.0→3.0.0Release Notes
kube-rs/kube (kube)
v3.0.1Compare Source
===================
What's Changed
Bugfix release for schemas, admission, and docs. Minor internal improvements listed in the milestone. Important fixes below.
Fixed
AdmissionResponsecreated via invalid call by @Magicloud in #1905OptionalEnumtransform skipping schemas with description by @doxxx93 in #1908additionalProperties: falsefrom schema by @doxxx93 in #1920v3.0.0Compare Source
===================
New Major
As per the new release schedule to match up with the new Kubernetes release.
Lots of additions, fixes and improvements. Thanks to everyone who contributed so heavily over the holidays! Happy new year.
Breaking Changes
Kubernetes
v1_35support via k8s-openapi 0.27Please upgrade k8s-openapi along with kube to avoid conflicts.
jiffreplaceschronoMatching k8s-openapi's change, kube has also swapped out
chrono. The biggest impact of this is for interacting with timestamps inmetadata, but it also updates 2 smaller public interfaces inLogParams,Client::with_valid_until. See controller-rs#217 for an example change.Changes: #1868 + #1870
ErrorResponsehas been replaced withStatusErrorResponseserved as a partial metav1/Status replacement which ended up hiding error information to users. These structs have merged, more information is available on errors, and a type alias with a deprecation warning is in place forErrorResponsewhich will be removed in a later version.This creates a small breaking change for users matching on specific
Error::Apicodes;.map_err(|error| match error { - kube::Error::Api(kube::error::ErrorResponse { code: 403, .. }) => { - Error::UnauthorizedToPatch(obj) - } + kube::Error::Api(s) if s.is_forbidden() => Error::UnauthorizedToPatch(obj), other => Error::Other(other), })?;#1875 + #1883 + #1891.
Predicates now has a TTL Cache
This prevents unbounded memory for controllers, particularly affecting ones watching quickly rotating objects with generated names (e.g. pods). By default the TTL is
1h. It can be configured via newPredicateConfigparameter. To use the default;Change in #1836. This helped expose and fix a bug in watches with streaming_lists now fixed in #1882.
Subresource Api
Some subresource write methods were public with inconsistent signatures that required less ergonomic use than any other write methods. They took a
Vec<u8>for the post body, now they take a&K: Serializeor the actual subresource.There affect
Api::create_subresource,Api::replace_subresource,Api::replace_status,Api::replace_scale. In essence this generally means you do not have to wrap raw objects injson!andserde_json::to_vecfor these calls and lean more on rust's typed objects rather thanjson!blobs which has some footguns for subresources.See some more shifts in examples in the implementaion; #1884
Improvements
Support Kubernetes 1.30 Aggregated Discovery
Speeds up api discovery significantly by using the newer api with much less round-tripping.
To opt-in change
Discovery::run()toDiscovery::run_aggregated()Changes; #1876 + #1873 + #1889
Rust 2024
While this is mostly for internal ergonomics, we would like to highlight this also simplifies the
Conditionimplementors which had to deal with a lot of options;pub fn is_job_completed() -> impl Condition<Job> { |obj: Option<&Job>| { - if let Some(job) = &obj { - if let Some(s) = &job.status { - if let Some(conds) = &s.conditions { - if let Some(pcond) = conds.iter().find(|c| c.type_ == "Complete") { - return pcond.status == "True"; - } - } - } + if let Some(job) = &obj + && let Some(s) = &job.status + && let Some(conds) = &s.conditions + && let Some(pcond) = conds.iter().find(|c| c.type_ == "Complete") + { + return pcond.status == "True";Change #1856 + #1792
New Client
RetryPolicyopt-inAllows custom clients (for now) to enable exponential backoff'd retries for retryable errors by exposing a
tower::retry::Policyfor atower::retry::Layer. See the new custom_client_retry example for details.Enabled by a clonable body + the new RetryPolicy based on mirrord's solution*.
Fixes
More
Resizesubresource impl forPod- #1851#[kube(attr="...")to allow custom attrs on derives - #1850What's Changed
Added
Resizesubresource forPodby @hugoponthieu in #1851try_clonemethod forkube_client::client::Bodywhen it'sKind::Onceby @meowjesty in #1867Changed
predicate_filterby @doxxx93 in #1838chronowithjiffby @ngergs in #1868k8s-openapifor Kubernetes 1.35 by @clux in #1898Fixed
v2.0.1Compare Source
===================
What's Changed
Fixes an accidental inclusion of a constraint added to
Api::log_streamintroduced in the 2.0.0 Rust 2024 upgrade.Fixed
v2.0.0Compare Source
===================
New Major
As per the new release schedule to match up with the new Kubernetes release.
Lots of additions, fixes and improvements. Thanks to everyone who contributed so heavily over the holidays! Happy new year.
Breaking Changes
Kubernetes
v1_35support via k8s-openapi 0.27Please upgrade k8s-openapi along with kube to avoid conflicts.
jiffreplaceschronoMatching k8s-openapi's change, kube has also swapped out
chrono. The biggest impact of this is for interacting with timestamps inmetadata, but it also updates 2 smaller public interfaces inLogParams,Client::with_valid_until. See controller-rs#217 for an example change.Changes: #1868 + #1870
ErrorResponsehas been replaced withStatusErrorResponseserved as a partial metav1/Status replacement which ended up hiding error information to users. These structs have merged, more information is available on errors, and a type alias with a deprecation warning is in place forErrorResponsewhich will be removed in a later version.This creates a small breaking change for users matching on specific
Error::Apicodes;.map_err(|error| match error { - kube::Error::Api(kube::error::ErrorResponse { code: 403, .. }) => { - Error::UnauthorizedToPatch(obj) - } + kube::Error::Api(s) if s.is_forbidden() => Error::UnauthorizedToPatch(obj), other => Error::Other(other), })?;#1875 + #1883 + #1891.
Predicates now has a TTL Cache
This prevents unbounded memory for controllers, particularly affecting ones watching quickly rotating objects with generated names (e.g. pods). By default the TTL is
1h. It can be configured via newPredicateConfigparameter. To use the default;Change in #1836. This helped expose and fix a bug in watches with streaming_lists now fixed in #1882.
Subresource Api
Some subresource write methods were public with inconsistent signatures that required less ergonomic use than any other write methods. They took a
Vec<u8>for the post body, now they take a&K: Serializeor the actual subresource.There affect
Api::create_subresource,Api::replace_subresource,Api::replace_status,Api::replace_scale. In essence this generally means you do not have to wrap raw objects injson!andserde_json::to_vecfor these calls and lean more on rust's typed objects rather thanjson!blobs which has some footguns for subresources.See some more shifts in examples in the implementaion; #1884
Improvements
Support Kubernetes 1.30 Aggregated Discovery
Speeds up api discovery significantly by using the newer api with much less round-tripping.
To opt-in change
Discovery::run()toDiscovery::run_aggregated()Changes; #1876 + #1873 + #1889
Rust 2024
While this is mostly for internal ergonomics, we would like to highlight this also simplifies the
Conditionimplementors which had to deal with a lot of options;pub fn is_job_completed() -> impl Condition<Job> { |obj: Option<&Job>| { - if let Some(job) = &obj { - if let Some(s) = &job.status { - if let Some(conds) = &s.conditions { - if let Some(pcond) = conds.iter().find(|c| c.type_ == "Complete") { - return pcond.status == "True"; - } - } - } + if let Some(job) = &obj + && let Some(s) = &job.status + && let Some(conds) = &s.conditions + && let Some(pcond) = conds.iter().find(|c| c.type_ == "Complete") + { + return pcond.status == "True";Change #1856 + #1792
New Client
RetryPolicyopt-inAllows custom clients (for now) to enable exponential backoff'd retries for retryable errors by exposing a
tower::retry::Policyfor atower::retry::Layer. See the new custom_client_retry example for details.Enabled by a clonable body + the new RetryPolicy based on mirrord's solution*.
Fixes
More
Resizesubresource impl forPod- #1851#[kube(attr="...")to allow custom attrs on derives - #1850What's Changed
Added
Resizesubresource forPodby @hugoponthieu in #1851try_clonemethod forkube_client::client::Bodywhen it'sKind::Onceby @meowjesty in #1867Changed
predicate_filterby @doxxx93 in #1838chronowithjiffby @ngergs in #1868k8s-openapifor Kubernetes 1.35 by @clux in #1898Fixed
v1.1.0Compare Source
===================
What's Changed
Missing attribute bugfix + extra standard derives on core::conversion structs.
Added
Fixed
#[schemars(crate)]attribute by @Techassi in #1764v1.0.0Compare Source
A Major Version
It's been a long time coming, but time has come to draw the line in the sand. No alphas, no betas. Hope it finds you all well. Thanks to everyone who has contributed over the years.
This is a somewhat symbolic gesture, because semver-breaking changes are still hard to avoid with a large set of sub-1.0 dependencies we need to bump, as well as managing the large api surface of Kubernetes.
Therefore, the plan is to align our breaking changes and major bumps with Kubernetes versions / k8s-openapi versions for now, and this should allow our other releases to stream in. See #1688 for more information.
Kubernetes
v1_33support viak8s-openapi0.25Please upgrade k8s-openapi along with kube to avoid conflicts.
New minimum versions: MSRV 1.82.0, MK8SV: 1.30*
KubeSchema
The
CELSchemaalternate derive forJsonSchemahas been renamed toKubeSchemato indicate the increased functionality.In addition to being able to inject CEL rules for validations, it can now also inject
x-kubernetesproperties such as merge-strategy via #1750, handle#[validate]attributes #1749, and pass validation rules as string literals #1754 :See kube.rs docs on validation for more info. Huge thanks to @Danil-Grigorev.
What's Changed
Added
hyper-util/tracingfeature flag by @cratelyn in #1734Changed
x-kubernetes-*schema extensions by @Danil-Grigorev in #1750k8s-openapito0.25.0by @clux in #1756Removed
watcher::Eventinto_iter_*methods by @clux in #1738Fixed
CELSchemaby @Danil-Grigorev in #1747CELSchemaby @Danil-Grigorev in #1749New Contributors
Full Changelog: kube-rs/kube@0.99.0...1.0.0
v0.99.0Compare Source
===================
Highlights
Dependency Cleanups
backoff(unmaintained) replaced withbackonin #1653default_backoffnatively, or throughController.ExponentialBackofffrombackon::ExponentialBuilderintoWatchStreamExt::backoffjson-patchbumped and uses re-exportedjsonptrfor less version clashes #1718randdependency no longer explicit as only rng is underwsfeature viatungstenite'sclient::generate_key#1691ring(still maintained) now optional forrustls-tlsfeature (for alternateaws-lc-rs) #1717Features
v5.channel.k8s.iostreamingwsprotocol to allow closing streams properly (kubernetes.io blog) #1693CustomResourcederive; typed attributes for#[kube(scale)]and#[kube(deprecated)]in #1656 + #1697Client::with_valid_untilto handle short lived local client certs #1707conditionsthat can be awaited #1710What's Changed
Added
Api::get_metadata_opt_withby @sebsoto in #1708Client::with_valid_untilfor client cert expiry by @goenning in #1707ExponentialBackoffpublic by @gdeleon2 in #1716Changed
backoffwithbackonby @flavio in #1653randto 0.9 by @clux in #1686randdependency in favor oftungstenitefn by @clux in #1691json-patchto 4 use bundledjsonptrto 0.7 by @clux in #1718Fixed
CustomResourcederive; allowstatusattribute to take a path by @clux in #1704v0.98.0Compare Source
===================
Highlights
v1_32support viak8s-openapi0.24kube-deriveadditions:CELSchemaderive macro wrapper aroundJsonSchemafor injecting cel validations into the schema #1649servedandstoragebooleans for multiple versions ofCustomResourcederives: #1644kube-runtimeeventRecordernow aggregates repeat events #1655 (some breaking changes, see controller-rs#116)kube-clientUTF-16 edge case handling for windows #1654What's Changed
Added
storageandservedargument to derive macro by @Techassi in #1644derive(CELSchema)macro for generating cel validation on CRDs by @Danil-Grigorev in #1649Changed
runtimeevent recorder by @pando85 in #1655k8s-openapifor Kubernetesv1_32support and MSRV by @clux in #1671Fixed
v0.97.0Compare Source
===================
Highlights
CustomResourcederive added features for crd yaml output:aws-lc-rs(rustls crypto) provider #1617nulluser; #1608client-go#1603gzipviaConfig#1627thiserror,hashbrown,jsonptr,json-patch. Killedlazy_static/once_cellWhat's Changed
Added
Changed
Fixed
aws-lc-rsby @goenning in #1617v0.96.0Compare Source
===================
Highlights
webpki-rootsadded #1323, and predicates no longer requireunstable-runtime#1578towerandsecrecy, andderivativeswapped foreduceWhat's Changed
Added
ObjectRef::fromas alias for::from_objby @nightkr in #1598Changed
secrecyto 0.10 by @clux in #1588towerto 0.5.1 by @markdingram in #1589Removed
Fixed
v0.95.0Compare Source
===================
Kubernetes
v1_31support viak8s-openapi0.23Please upgrade k8s-openapi along with kube to avoid conflicts.
New minimum versions: MSRV 1.77.2, MK8SV: 1.26
What's Changed
Changed
k8s-openapito 0.23 for Kubernetes 1.31 support by @clux in #1581v0.94.2Compare Source
What's Changed
Fixes a runtime regression in
watch_object.Fixed
watch_objecthandles objects removed before init by @markdingram in #1577New Contributors
Full Changelog: kube-rs/kube@0.94.1...0.94.2
v0.94.1Compare Source
===================
What's Changed
Convenience release. Adjusted a version bound to avoid possibility of running into version compatibility errors with
hyper-rustls.Fixed
v0.94.0Compare Source
===================
Highlights
Support for
rustls's aws-lc-rs is available under a newkube/aws-lc-rsfeature. Via #1568 for #1562Furthermore, there are improvements to partial typing:
DeserializeGuardsafety wrapper to lift deserialisation errors (to e.g. not break watchers). See the errorbound example and core module module. Wrapped type be used with e.g.Api::<DeserializeGuard<CaConfigMap>>. Via #1556Resource;#[derive(Resource)]allows inheriting existingk8s-openapiresource implementations to avoid stepping down to the dynamic api. See the cert check example for usage. Via #1565What's Changed
Added
aws-lc-rsrustls feature by @mcluseau in #1568Resourcederive macro by @Danil-Grigorev in #1565Changed
v0.93.1Compare Source
===================
What's Changed
Fixed
v0.93.0Compare Source
===================
Highlights
Better query validation, better client header customisation, and two new modules:
core::labelsmodule for creating typed label selectors forListParamsorWatchParams. Can be constructed from a nativeLabelSelector, or directly from aSelectorofExpressions. PR.preludeto simplify imports of extension traits. PR.A big thank you to everyone who contributed to this release!
What's Changed
Added
Changed
Removed
Fixed
v0.92.1Compare Source
===================
Highlights
Better query validation, better client header customisation, and two new modules:
Configuration
📅 Schedule: Branch creation - "after 9pm,before 6am" in timezone Europe/Zurich, Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.