New Major
As per the release schedule to match up with the latest Kubernetes Garhwal release.
Lots of fixes and improvements. Thanks to everyone who contributed!
Kubernetes v1_37 support via k8s-openapi 0.29
Please upgrade k8s-openapi along with kube to avoid conflicts.
Semver Breaking Upgrades
Upgrades to several other important libraries that we couldn't do until the major. These include
tower-http@0.7, serde-saphyr@2, syn@3, base64@0.23 , pem@4,
Important Additions
A new Api::dynamic ctor has been added as well as Api::constrain* methods to change an Api's namespace. Simplifies Api handling when dealing with discovery;
// before
let api: Api<DynamicObject> = if caps.scope == Scope::Cluster {
Api::all_with(client.clone(), &ar)
} else {
Api::default_namespaced_with(client.clone(), &ar)
};
// after
let api: Api<DynamicObject> = Api::dynamic(client.clone(), &ar, &caps.scope).constrain_default();#[kube(no_spec)]to support non-standard crs without a.spec; #2071- A
DynamicObjectcan now be used to perform adiscovery::resolve_objectlookup; #2031
Custom client can now use a customizable executor to deal with different lifestyle semantics of spans. Really hairy issue propagated through multiple repos.
Fixes
Many fixes this release worth checking below. Of particular importance;
Watcher Fixes
Two important ones; EOF recovery + missing init for the new (not-yet-default) StreamingList watch mode. Watcher also allows longer watches now.
Errors + Docs
Many smaller fixes to improve error handling; their accuracy, management of the Error size, and what to print.
Notable new docs on advanced finalizer pitfalls.
Internals
As usual there's a lot of ongoing work that improves internal ergonomics and maintainability that is normally hidden from the changelog.
In particular this release, a special thank you to @daemonfire300 for the new test suite for advanced watcher specifics, which allows us to test more complicated watcher edge cases (including one of the fixes above).
What's Changed
Added
- Derive ordering for label selector expressions by @meowjesty in #2058
- Expose concrete types in functions that return
impl AsyncRead/AsyncWriteby @MintSoup in #2059 - resolve an Api's ApiResource directly from a DynamicObject/TypeMeta via Discovery by @jessemin in #2031
- derive: add
no_specattribute for CRDs without top-level spec (#1763) by @antcybersec in #2071 - Extend Api with a kubectl style namespace constraint by @doxxx93 in #2067
- client: Add support for NO_PROXY/no_proxy by @Techassi in #2075
- runtime: move controller trigger functions to dedicated module and unify stream bounds by @antcybersec in #2076
- feat(client): allow customizable
hyper::rt::Executorby @cratelyn in #2103 - Expose
hyper-timeout'sreset_reader_on_writeconfig by @ggevay in #2111
Changed
- Update serde-saphyr requirement from 0.0.29 to 1.3.0 by @jszwedko in #2086
- Surface upgrade HTTP errors as Error::Api by @SebTardif in #1984
- Box large error payloads to keep kube::Error under 128 bytes by @doxxx93 in #2096
- Chore(deps): Update serde-saphyr requirement from 1.0.0 to 2.0.0 by @dependabot[bot] in #2114
- Chore(deps): Update base64 requirement from 0.22.1 to 0.23.1 by @dependabot[bot] in #2108
- Chore(deps): Update pem requirement from 3.0.1 to 4.0.0 by @dependabot[bot] in #2107
- Chore(deps): Update tokio-tungstenite requirement from 0.29.0 to 0.30.0 by @dependabot[bot] in #2038
- Chore(deps): Update tower-http requirement from 0.6.4 to 0.7.0 by @dependabot[bot] in #2019
- Drop redundant status field from AuthError::AuthExecRun by @doxxx93 in #2099
- update k8s-openapi to 0.29 by @clux in #2120
Deprecated
Removed
Fixed
- Allow PredicateFilter to work with dynamic objects by @kwohlfahrt in #2054
- Handle API errors in watch responses by @doxxx93 in #2062
- Opt watch streams out of gzip compression by @doxxx93 in #2080
- Percent-decode proxy userinfo before Basic auth encoding by @zap0xfce2 in #2078
- core: allow watch timeouts above five minutes by @centerionware in #2069
- fix(runtime): honor zero watch timeout without idle watchdog by @centerionware in #2068
- client: log non-JSON error bodies at debug, not warn by @antcybersec in #2070
- Recover watch streams after nested unexpected EOF by @mvanhorn in #2084
- Fix Retry-After overflow panic in the default retry policy by @doxxx93 in #2097
- Document predicate pitfalls around deletes and finalizers by @daemonfire300 in #2092
- fix: emit Event::Init when a StreamingList initial watch opens by @mvanhorn in #2118
- fix(config): populate missing impersonation headers by @tremwil in #2116
New Contributors
- @kwohlfahrt made their first contribution in #2054
- @MintSoup made their first contribution in #2059
- @jessemin made their first contribution in #2031
- @daemonfire300 made their first contribution in #2022
- @antcybersec made their first contribution in #2071
- @zap0xfce2 made their first contribution in #2078
- @jszwedko made their first contribution in #2086
- @centerionware made their first contribution in #2069
- @mvanhorn made their first contribution in #2084
- @ggevay made their first contribution in #2111
- @tremwil made their first contribution in #2116
Full Changelog: 4.2.0...5.0.0