Skip to content

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented May 14, 2025

This PR contains the following updates:

Package Type Update Change
kube dependencies major 1.0.03.0.0

Release Notes

kube-rs/kube (kube)

v3.0.1

Compare Source

===================

What's Changed

Bugfix release for schemas, admission, and docs. Minor internal improvements listed in the milestone. Important fixes below.

Fixed

v3.0.0

Compare 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_35 support via k8s-openapi 0.27

Please upgrade k8s-openapi along with kube to avoid conflicts.

jiff replaces chrono

Matching k8s-openapi's change, kube has also swapped out chrono. The biggest impact of this is for interacting with timestamps in metadata, but it also updates 2 smaller public interfaces in LogParams, Client::with_valid_until. See controller-rs#217 for an example change.

Changes: #​1868 + #​1870

ErrorResponse has been replaced with Status

ErrorResponse served 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 for ErrorResponse which will be removed in a later version.

This creates a small breaking change for users matching on specific Error::Api codes;

     .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 new PredicateConfig parameter. To use the default;

-        .predicate_filter(predicates::resource_version);
+        .predicate_filter(predicates::resource_version, Default::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: Serialize or 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 in json! and serde_json::to_vec for these calls and lean more on rust's typed objects rather than json! blobs which has some footguns for subresources.

-    let o = foos.replace_status("qux", &pp, serde_json::to_vec(&object)?).await?;
+    let o = foos.replace_status("qux", &pp, &object).await?;

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() to Discovery::run_aggregated()

Changes; #​1876 + #​1873 + #​1889

Rust 2024

While this is mostly for internal ergonomics, we would like to highlight this also simplifies the Condition implementors 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 RetryPolicy opt-in

Allows custom clients (for now) to enable exponential backoff'd retries for retryable errors by exposing a tower::retry::Policy for a tower::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

  • streaming list bug fix - #​1882
  • watcher jitter bug fix - #​1897
  • schema fix for IntOrString - #​1867
  • schema fix for optional enums - #​1853
  • websocket keepalives for long running attaches - #​1889
More
  • Resize subresource impl for Pod - #​1851
  • add #[kube(attr="...") to allow custom attrs on derives - #​1850
  • example updates for admission w/axum - #​1859

What's Changed

Added
Changed
Fixed

v2.0.1

Compare Source

===================

What's Changed

Fixes an accidental inclusion of a constraint added to Api::log_stream introduced in the 2.0.0 Rust 2024 upgrade.

Fixed

v2.0.0

Compare 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_35 support via k8s-openapi 0.27

Please upgrade k8s-openapi along with kube to avoid conflicts.

jiff replaces chrono

Matching k8s-openapi's change, kube has also swapped out chrono. The biggest impact of this is for interacting with timestamps in metadata, but it also updates 2 smaller public interfaces in LogParams, Client::with_valid_until. See controller-rs#217 for an example change.

Changes: #​1868 + #​1870

ErrorResponse has been replaced with Status

ErrorResponse served 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 for ErrorResponse which will be removed in a later version.

This creates a small breaking change for users matching on specific Error::Api codes;

     .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 new PredicateConfig parameter. To use the default;

-        .predicate_filter(predicates::resource_version);
+        .predicate_filter(predicates::resource_version, Default::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: Serialize or 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 in json! and serde_json::to_vec for these calls and lean more on rust's typed objects rather than json! blobs which has some footguns for subresources.

-    let o = foos.replace_status("qux", &pp, serde_json::to_vec(&object)?).await?;
+    let o = foos.replace_status("qux", &pp, &object).await?;

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() to Discovery::run_aggregated()

Changes; #​1876 + #​1873 + #​1889

Rust 2024

While this is mostly for internal ergonomics, we would like to highlight this also simplifies the Condition implementors 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 RetryPolicy opt-in

Allows custom clients (for now) to enable exponential backoff'd retries for retryable errors by exposing a tower::retry::Policy for a tower::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

  • streaming list bug fix - #​1882
  • watcher jitter bug fix - #​1897
  • schema fix for IntOrString - #​1867
  • schema fix for optional enums - #​1853
  • websocket keepalives for long running attaches - #​1889
More
  • Resize subresource impl for Pod - #​1851
  • add #[kube(attr="...") to allow custom attrs on derives - #​1850
  • example updates for admission w/axum - #​1859

What's Changed

Added
Changed
Fixed

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/major-kube-rs branch 9 times, most recently from dd255e7 to 195da17 Compare May 19, 2025 06:10
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 8 times, most recently from 995caeb to c2836f6 Compare May 27, 2025 00:16
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 4 times, most recently from 1fc9f75 to 48bb34b Compare June 10, 2025 14:30
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 4 times, most recently from 4764e03 to f2caf5f Compare June 30, 2025 19:37
@renovate renovate bot force-pushed the renovate/major-kube-rs branch from f2caf5f to e1d44bf Compare August 10, 2025 12:25
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 4 times, most recently from 63d43db to b1e37d9 Compare August 22, 2025 22:47
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 2 times, most recently from 0212c8f to dcead99 Compare October 17, 2025 03:39
@renovate renovate bot force-pushed the renovate/major-kube-rs branch from dcead99 to aea9163 Compare October 22, 2025 16:18
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 12 times, most recently from 97a7444 to 866d52b Compare November 18, 2025 00:47
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 2 times, most recently from 45b2ff7 to 7aabf3c Compare December 12, 2025 01:21
@renovate renovate bot force-pushed the renovate/major-kube-rs branch from 7aabf3c to a33d84b Compare December 31, 2025 16:28
@renovate renovate bot changed the title fix(deps): update rust crate kube to v2 fix(deps): update rust crate kube to v3 Jan 12, 2026
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 2 times, most recently from 67b35e7 to d44c018 Compare January 13, 2026 04:50
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 4 times, most recently from cd3638b to 96d473a Compare January 22, 2026 18:51
@renovate renovate bot force-pushed the renovate/major-kube-rs branch 3 times, most recently from ca3228b to 52eea01 Compare January 30, 2026 17:13
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@renovate renovate bot force-pushed the renovate/major-kube-rs branch from 52eea01 to 561067c Compare February 2, 2026 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants