|
7 | 7 | <!-- next-header --> |
8 | 8 | UNRELEASED |
9 | 9 | =================== |
10 | | - * see https://github.com/kube-rs/kube/compare/3.1.0...main |
| 10 | + * see https://github.com/kube-rs/kube/compare/4.0.0...main |
| 11 | + |
| 12 | +[4.0.0](https://github.com/kube-rs/kube/releases/tag/4.0.0) / 2026-06-16 |
| 13 | +=================== |
| 14 | +<!-- Release notes generated using configuration in .github/release.yml at 4.0.0 --> |
| 15 | +## New Major |
| 16 | +As per the release schedule to match up with the [latest Kubernetes ハル release](https://kubernetes.io/blog/2026/04/22/kubernetes-v1-36-release/). |
| 17 | +Lots of fixes and improvements. Thanks to everyone who contributed! |
| 18 | + |
| 19 | +## Kubernetes `v1_36` support via k8s-openapi [0.28](https://github.com/Arnavion/k8s-openapi/releases/tag/v0.28.0) |
| 20 | + |
| 21 | +Please [upgrade k8s-openapi along with kube](https://kube.rs/upgrading/) to avoid conflicts. |
| 22 | + |
| 23 | +## CEL Validation |
| 24 | +A new optional crate [kube-cel](https://docs.rs/kube-cel/latest/kube_cel/) is being re-exported through `kube::core::cel` via https://github.com/kube-rs/kube/pull/1954 |
| 25 | + |
| 26 | +Kubernetes CRDs support [CEL validation rules](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#validation-rules) via `x-kubernetes-validations`, and were supported from 3.0 via [`KubeSchema`](https://docs.rs/kube/latest/kube/derive.KubeSchema.html), but these rules could only be evaluated server-side by the API server. |
| 27 | + |
| 28 | +The new crate allows evaluating these rules locally using rules matching the [upstream Kubernetes CEL libraries](https://docs.rs/kube/latest/kube/core/cel/trait.KubeCelExt.html#upstream-sources). |
| 29 | + |
| 30 | +While low-level, a higher-level CEL validator integrates with [`CustomResource`](https://docs.rs/kube/latest/kube/derive.CustomResource.html) via [`#[kube(cel)]`](https://docs.rs/kube/latest/kube/derive.CustomResource.html#cel-validation-client-side) from https://github.com/kube-rs/kube/pull/2011 and can be used as; |
| 31 | + |
| 32 | +```rust |
| 33 | +#[derive(CustomResource, Serialize, Deserialize, Clone, KubeSchema)] |
| 34 | +#[kube(group = "example.com", version = "v1", kind = "Foo", namespaced)] |
| 35 | +#[kube(cel, validation = "self.spec.replicas >= 0")] // cel trigger + validation rule |
| 36 | +struct FooSpec { replicas: i32 } |
| 37 | + |
| 38 | +let foo = Foo::new("test", FooSpec { replicas: -1 }); |
| 39 | +foo.validate_cel()?; // new impl; checks creation rules |
| 40 | +new_foo.validate_cel_update(&old_foo)?; // new impl; checks transition rules |
| 41 | +``` |
| 42 | + |
| 43 | +See [examples/crd_derive_cel.rs](https://github.com/kube-rs/kube/blob/main/examples/crd_derive_cel.rs) for more details. |
| 44 | + |
| 45 | +This is available under the `kube/cel` feature, courtesy of @doxxx93. |
| 46 | + |
| 47 | +## Config |
| 48 | +A lot of improvements to config handling; |
| 49 | + |
| 50 | +- better error handling of malformed client certs in https://github.com/kube-rs/kube/pull/1966 |
| 51 | +- add missing `Kubeconfig` fields in https://github.com/kube-rs/kube/pull/1965 |
| 52 | +- `Kubeconfig` future key compatibility for new fields by adding catch-all `other` key via https://github.com/kube-rs/kube/pull/1964 |
| 53 | +- deserialization changed from `serde-yaml` to [`serde-saphyr`](https://github.com/bourumir-wyngs/serde-saphyr) to get rid of the long-deprecated dependency. https://github.com/kube-rs/kube/pull/1975 |
| 54 | + |
| 55 | +### Retry and Timeouts |
| 56 | +Better timeout and retry handling to better deal with flaky network conditions, and busy or initializing apiservers. |
| 57 | + |
| 58 | +- default global read timeouts has been unset in favor of `watcher` level timeouts in https://github.com/kube-rs/kube/pull/1945 (see https://github.com/kube-rs/kube/issues/1798 for context) |
| 59 | +- regular (non-watch) queries now respect the [`RetryPolicy`](https://docs.rs/kube/latest/kube/client/retry/struct.RetryPolicy.html) - now enabled by default in https://github.com/kube-rs/kube/pull/2007. |
| 60 | + |
| 61 | +### Client |
| 62 | + |
| 63 | +- properly handling rotating ca certs in cluster via https://github.com/kube-rs/kube/pull/1962 |
| 64 | +- handle `tls-server-name` with `openssl-tls` via https://github.com/kube-rs/kube/pull/1993 |
| 65 | +- auth exec: accept `yaml` output from `exec` plugins via https://github.com/kube-rs/kube/pull/2003 |
| 66 | +- fix `ws` task leak and `drop`, and a deadlock on `join()` via https://github.com/kube-rs/kube/pull/1978 |
| 67 | +- **change**: client tracing now opt-in due to issues. see https://github.com/kube-rs/kube/pull/1972 |
| 68 | + |
| 69 | +### Runtime |
| 70 | + |
| 71 | +- [`watcher`](https://docs.rs/kube/latest/kube/runtime/watcher/index.html) automatically uses the `metadata_` api methods when called with [`PartialObjectMeta<K>`](https://docs.rs/kube/latest/kube/core/metadata/struct.PartialObjectMeta.html) via https://github.com/kube-rs/kube/pull/1952 |
| 72 | + * (this deprecates [`metadata_watcher`](https://docs.rs/kube/latest/kube/runtime/watcher/fn.metadata_watcher.html) in favor of an explicit change from `Api::<K>` to `Api::<PartialObjectMeta<K>>`) |
| 73 | +- added [`wait::conditions::is_created`](https://docs.rs/kube/latest/kube/runtime/wait/conditions/fn.is_deleted.html) as a counter to `is_deleted` https://github.com/kube-rs/kube/pull/2000 |
| 74 | +- added [`Store::state_filtered`](https://docs.rs/kube/latest/kube/runtime/reflector/struct.Store.html#method.state_filter) and [`Store::state_filter_selector`](https://docs.rs/kube/latest/kube/runtime/reflector/struct.Store.html#method.state_filter_selector) to allow more efficient slicing of the locked cache via https://github.com/kube-rs/kube/pull/2002 + https://github.com/kube-rs/kube/pull/1998 |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | +## What's Changed |
| 80 | +### Added |
| 81 | +* feat: add typed kubeconfig fields for client-go parity by @alex-lapuka in https://github.com/kube-rs/kube/pull/1965 |
| 82 | +* Add CEL validation via kube-cel re-export by @doxxx93 in https://github.com/kube-rs/kube/pull/1954 |
| 83 | +* Add `AdmissionRequest::to_cel_request()` for VAP CEL bridging by @doxxx93 in https://github.com/kube-rs/kube/pull/1991 |
| 84 | +* runtime: implement `Store::state_with` and `Store::state_filtered` by @Alvov1 in https://github.com/kube-rs/kube/pull/1998 |
| 85 | +* runtime: add `wait::conditions::is_created` helper by @orangecms in https://github.com/kube-rs/kube/pull/2000 |
| 86 | +* refactor(runtime): rename Store::state_with/state_filtered per review feedback by @Alvov1 in https://github.com/kube-rs/kube/pull/2002 |
| 87 | +* deps: bump kube-cel to 0.6.1 (validation surface flattened) by @doxxx93 in https://github.com/kube-rs/kube/pull/2005 |
| 88 | +* Enable `RetryPolicy::server_retry` by default for `Client` by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/2007 |
| 89 | +* feat(derive): client-side CEL validation via #[kube(cel)] / #[x_kube(cel)] by @doxxx93 in https://github.com/kube-rs/kube/pull/2011 |
| 90 | +### Changed |
| 91 | +* preserve unknown kubeconfig fields via serde(flatten) by @alex-lapuka in https://github.com/kube-rs/kube/pull/1964 |
| 92 | +* Remove global read_timeout default, add watcher-level idle timeout by @doxxx93 in https://github.com/kube-rs/kube/pull/1945 |
| 93 | +* Update tokio-tungstenite requirement from 0.28.0 to 0.29.0 by @dependabot[bot] in https://github.com/kube-rs/kube/pull/1963 |
| 94 | +* convert from serde-yaml to serde-saphyr by @clux in https://github.com/kube-rs/kube/pull/1975 |
| 95 | +* features: making client tracing opt-in by @mattklein123 in https://github.com/kube-rs/kube/pull/1972 |
| 96 | +* client: reload in-cluster CA bundle on rotation (rustls-tls) by @chrnorm in https://github.com/kube-rs/kube/pull/1962 |
| 97 | +* Api<PartialObjectMeta<K>> should opportunistically degrade to metadata requests by @doxxx93 in https://github.com/kube-rs/kube/pull/1952 |
| 98 | +* Chore(deps): Update garde requirement from 0.22.0 to 0.23.0 by @dependabot[bot] in https://github.com/kube-rs/kube/pull/1989 |
| 99 | +* bump k8s-openapi to 0.28 by @clux in https://github.com/kube-rs/kube/pull/2009 |
| 100 | +* Box a large runtime error in ReconcilerErr by @clux in https://github.com/kube-rs/kube/pull/1880 |
| 101 | +### Fixed |
| 102 | +* fix: feature-flag CREATE_NO_WINDOW to not break stderr inheritance by @cristeigabriela in https://github.com/kube-rs/kube/pull/1971 |
| 103 | +* Remove silent error when client-key/client-certificate is malformed by @goenning in https://github.com/kube-rs/kube/pull/1966 |
| 104 | +* Fix AttachedProcess task leak on drop and join() deadlock by @SebTardif in https://github.com/kube-rs/kube/pull/1978 |
| 105 | +* support auth exec yaml output by @aviramha in https://github.com/kube-rs/kube/pull/2003 |
| 106 | +* fix(client): apply tls-server-name on the openssl-tls path by @dgunzy in https://github.com/kube-rs/kube/pull/1993 |
| 107 | +* Use the resource's own name for the schema title by @cehoffman in https://github.com/kube-rs/kube/pull/1985 |
| 108 | + |
| 109 | + |
| 110 | +* @alex-lapuka made their first contribution in https://github.com/kube-rs/kube/pull/1965 |
| 111 | +* @cristeigabriela made their first contribution in https://github.com/kube-rs/kube/pull/1971 |
| 112 | +* @mattklein123 made their first contribution in https://github.com/kube-rs/kube/pull/1972 |
| 113 | +* @chrnorm made their first contribution in https://github.com/kube-rs/kube/pull/1962 |
| 114 | +* @SebTardif made their first contribution in https://github.com/kube-rs/kube/pull/1978 |
| 115 | +* @Alvov1 made their first contribution in https://github.com/kube-rs/kube/pull/1998 |
| 116 | +* @orangecms made their first contribution in https://github.com/kube-rs/kube/pull/2000 |
| 117 | +* @dgunzy made their first contribution in https://github.com/kube-rs/kube/pull/1993 |
| 118 | +* @cehoffman made their first contribution in https://github.com/kube-rs/kube/pull/1985 |
| 119 | + |
| 120 | +**Full Changelog**: https://github.com/kube-rs/kube/compare/3.1.0...4.0.0 |
| 121 | + |
| 122 | +4.0.0 / 2026-06-16 |
| 123 | +=================== |
| 124 | + * see https://github.com/kube-rs/kube/compare/4.0.0...main |
11 | 125 |
|
12 | 126 | [3.1.0](https://github.com/kube-rs/kube/releases/tag/3.1.0) / 2026-03-17 |
13 | 127 | =================== |
@@ -39,7 +153,7 @@ Maintenance release with fixes for schemas/validation, client exec blocking and |
39 | 153 |
|
40 | 154 | 3.1.0 / 2026-03-17 |
41 | 155 | =================== |
42 | | - * see https://github.com/kube-rs/kube/compare/3.1.0...main |
| 156 | + * see https://github.com/kube-rs/kube/compare/4.0.0...main |
43 | 157 |
|
44 | 158 | [3.0.1](https://github.com/kube-rs/kube/releases/tag/3.0.1) / 2026-01-30 |
45 | 159 | =================== |
|
0 commit comments