Changelog#
Unreleased#
2.0.1 / 2025-09-12#
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#
- Remove unused use<'_> from log_stream() by @pgerber in https://github.com/kube-rs/kube/pull/1824
2.0.1 / 2025-09-12#
2.0.0 / 2025-09-08#
Kubernetes v1_34 support via k8s-openapi 0.26#
Please upgrade k8s-openapi along with kube to avoid conflicts.
Schemars 1.0#
A fairly significant upgrade in https://github.com/kube-rs/kube/pull/1780. Our external facing API should be unchanged, although some schemars public import paths have changed. Note that if you are implementing schemars traits directly, then see the upstream schemars/migrating (and maybe consider using KubeSchema for relevant schema overrides).
Please upgrade schemars along with kube for this version to avoid conflicts.
New Minimums#
Minimum versions: MSRV 1.85.0 (for edition 2024), MK8SV: 1.30 (unchanged).
Highlights#
This version is contains fixes, dependency clearups, and dependency updates. Noteworthy additions are TryFrom impls for Kubeconfig users in #1801, and a namespace accessor in Api in #1788
New Major#
A new semver major for unstable, public facing dependency updates. As per the new release cycle, it is aligned with the Kubernetes release.
What's Changed#
Added#
- Add
TryFromconversions forKubeconfig->Config->Clientby @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1801 - Add pub fn namespace(&self) -> Option<&str> to Api by @tgrushka in https://github.com/kube-rs/kube/pull/1788
Changed#
- Update to schemars 1.0 by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1780
- Bump Rust Edition to 2024 and MSRV to 1.85 by @clux in https://github.com/kube-rs/kube/pull/1785
- Replace
hyper-socks2withhyper-utilclient-proxy feature by @tottoto in https://github.com/kube-rs/kube/pull/1795 - Bump k8s-openapi to 0.26.0 by @clux in https://github.com/kube-rs/kube/pull/1817
Fixed#
- Clamp scheduling delay to 6 months by @dervoeti in https://github.com/kube-rs/kube/pull/1779
- Update admission example and pin to a local crd by @clux in https://github.com/kube-rs/kube/pull/1782
- Fix interactive auth mode to allow prompt messages by @gememma in https://github.com/kube-rs/kube/pull/1800
- Make kube::runtime::controller::Action ctors const by @imp in https://github.com/kube-rs/kube/pull/1804
- Fix oidc with openssl by @saif-88 in https://github.com/kube-rs/kube/pull/1807
1.1.0 / 2025-05-26#
What's Changed#
Missing attribute bugfix + extra standard derives on core::conversion structs.
Added#
- Add missing derives on conversion types by @sbernauer in https://github.com/kube-rs/kube/pull/1759
Fixed#
- Emit
#[schemars(crate)]attribute by @Techassi in https://github.com/kube-rs/kube/pull/1764
Full Changelog: https://github.com/kube-rs/kube/compare/1.0.0...1.1.0
1.0.0 / 2025-05-13#
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 https://github.com/kube-rs/kube/issues/1688 for more information.
Kubernetes v1_33 support via k8s-openapi 0.25#
Please upgrade k8s-openapi along with kube to avoid conflicts.
New minimum versions: MSRV 1.82.0, MK8SV: 1.30*
KubeSchema#
The CELSchema alternate derive for JsonSchema has been renamed to KubeSchema to indicate the increased functionality.
In addition to being able to inject CEL rules for validations, it can now also inject x-kubernetes properties such as merge-strategy via https://github.com/kube-rs/kube/pull/1750, handle #[validate] attributes https://github.com/kube-rs/kube/pull/1749, and pass validation rules as string literals https://github.com/kube-rs/kube/pull/1754 :
#[derive(CustomResource, Serialize, Deserialize, Debug, PartialEq, Clone, KubeSchema)]
#[kube(...properties)
struct DocumentSpec {
/// New merge strategy support
#[x_kube(merge_strategy = ListMerge::Set)]
x_kubernetes_set: Vec<String>,
/// CEL Validation now lives on x_kube and supports literal Rules:
#[x_kube(validation = "!has(self.variantOne) || self.variantOne.int > 22")]
complex_enum: ComplexEnum,
}
See kube.rs docs on validation for more info. Huge thanks to @Danil-Grigorev.
What's Changed#
Added#
- feat(deps): enable
hyper-util/tracingfeature flag by @cratelyn in https://github.com/kube-rs/kube/pull/1734 - Permit literal string validation for CEL expressions by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1754
Changed#
- Support additional
x-kubernetes-*schema extensions by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1750 - Bump
k8s-openapito0.25.0by @clux in https://github.com/kube-rs/kube/pull/1756
Removed#
- Remove deprecated
watcher::Eventinto_iter_*methods by @clux in https://github.com/kube-rs/kube/pull/1738
Fixed#
- docs: Adjust #[kube(scale(...)] doc example by @Techassi in https://github.com/kube-rs/kube/pull/1733
- Add suffix to generated struct by
CELSchemaby @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1747 - Allow schemars validate attribute in
CELSchemaby @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1749 - fix: resolve conflict with schemars preserve_order feature by @HoKim98 in https://github.com/kube-rs/kube/pull/1758
0.99.0 / 2025-03-12#
Highlights#
Dependency Cleanups#
backoff(unmaintained) replaced withbackonin https://github.com/kube-rs/kube/pull/1653- No change if you are using
default_backoffnatively, or throughController. - Parameters configurable via
ExponentialBackofffrombackon::ExponentialBuilderintoWatchStreamExt::backoff json-patchbumped and uses re-exportedjsonptrfor less version clashes https://github.com/kube-rs/kube/pull/1718randdependency no longer explicit as only rng is underwsfeature viatungstenite'sclient::generate_keyhttps://github.com/kube-rs/kube/pull/1691ring(still maintained) now optional forrustls-tlsfeature (for alternateaws-lc-rs) https://github.com/kube-rs/kube/pull/1717
Features#
- Support for the
v5.channel.k8s.iostreamingwsprotocol to allow closing streams properly (kubernetes.io blog) https://github.com/kube-rs/kube/pull/1693 CustomResourcederive; typed attributes for#[kube(scale)]and#[kube(deprecated)]in https://github.com/kube-rs/kube/pull/1656 + https://github.com/kube-rs/kube/pull/1697Client::with_valid_untilto handle short lived local client certs https://github.com/kube-rs/kube/pull/1707- New common
conditionsthat can be awaited https://github.com/kube-rs/kube/pull/1710
What's Changed#
Added#
- Add typed scale argument to derive macro by @Techassi in https://github.com/kube-rs/kube/pull/1656
- Add deprecated argument to derive macro by @Techassi in https://github.com/kube-rs/kube/pull/1697
- Add
Api::get_metadata_opt_withby @sebsoto in https://github.com/kube-rs/kube/pull/1708 - Add common wait conditions for Deployments, LoadBalancer Services, and Ingress by @detjensrobert in https://github.com/kube-rs/kube/pull/1710
- Add
Client::with_valid_untilfor client cert expiry by @goenning in https://github.com/kube-rs/kube/pull/1707 - kube-runtime: make
ExponentialBackoffpublic by @gdeleon2 in https://github.com/kube-rs/kube/pull/1716
Changed#
- Replace
backoffwithbackonby @flavio in https://github.com/kube-rs/kube/pull/1653 - Bump
randto 0.9 by @clux in https://github.com/kube-rs/kube/pull/1686 - Remove
randdependency in favor oftungstenitefn by @clux in https://github.com/kube-rs/kube/pull/1691 - Exec can return stdout data even after stdin is closed. by @esw-amzn in https://github.com/kube-rs/kube/pull/1693
- Bump
json-patchto 4 use bundledjsonptrto 0.7 by @clux in https://github.com/kube-rs/kube/pull/1718 - Allow removing hyper-rustls/ring feature by @eliad-wiz in https://github.com/kube-rs/kube/pull/1717
Fixed#
- kube-runtime: fix exponential backoff max times by @eliad-wiz in https://github.com/kube-rs/kube/pull/1713
CustomResourcederive; allowstatusattribute to take a path by @clux in https://github.com/kube-rs/kube/pull/1704
0.98.0 / 2024-12-23#
Highlights#
- Kubernetes
v1_32support viak8s-openapi0.24 - Please upgrade k8s-openapi along with kube to avoid conflicts.
- New minimum versions: MSRV 1.81.0, MK8SV: 1.28
kube-deriveadditions:- A
CELSchemaderive macro wrapper aroundJsonSchemafor injecting cel validations into the schema #1649 - Allow overriding
servedandstoragebooleans for multiple versions ofCustomResourcederives: #1644 kube-runtimeeventRecordernow aggregates repeat events #1655 (some breaking changes, see controller-rs#116)kube-clientUTF-16 edge case handling for windows #1654
What's Changed#
Added#
- Add
storageandservedargument to derive macro by @Techassi in https://github.com/kube-rs/kube/pull/1644 - Implement
derive(CELSchema)macro for generating cel validation on CRDs by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1649
Changed#
- Add series implementation for
runtimeevent recorder by @pando85 in https://github.com/kube-rs/kube/pull/1655 - Bump
k8s-openapifor Kubernetesv1_32support and MSRV by @clux in https://github.com/kube-rs/kube/pull/1671 - Update tokio-tungstenite requirement from 0.24.0 to 0.25.0 by @dependabot in https://github.com/kube-rs/kube/pull/1666
Fixed#
- Add support for UTF-16 encoded kubeconfig files by @goenning in https://github.com/kube-rs/kube/pull/1654
0.97.0 / 2024-11-20#
Highlights#
CustomResourcederive added features for crd yaml output:- selectable fields #1605 + #1610
- annotations and labels #1631
- Configuration edge cases:
- Avoid double installations of
aws-lc-rs(rustls crypto) provider #1617 - Kubeconfig fix for
nulluser; #1608 - Default runtime watcher backoff alignment with
client-go#1603 - Feature use:
- Client proxy feature-set misuse prevention #1626
- Allow disabling
gzipviaConfig#1627 - Depedency minors:
thiserror,hashbrown,jsonptr,json-patch. Killedlazy_static/once_cell
What's Changed#
Added#
- Feature: Allow to pass selectableFields for CRD definition by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1605
- add support for CRD annotations and labels in kube-derive by @verokarhu in https://github.com/kube-rs/kube/pull/1631
- Feature: Add config setting to disable gzip compression #1627 by @markdingram in https://github.com/kube-rs/kube/pull/1628
Changed#
- upgrade to hashbrown 0.15.0 by @rorosen in https://github.com/kube-rs/kube/pull/1599
- update jsonptr + json-patch by @aviramha in https://github.com/kube-rs/kube/pull/1600
Fixed#
- fix(kube-runtime): setup backoff with builder pattern by @tiagolobocastro in https://github.com/kube-rs/kube/pull/1603
- allow null user in kubeconfig's context by @aviramha in https://github.com/kube-rs/kube/pull/1608
- Gauge SelectableField by k8s 1.30 version by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1610
- Add a compile_error if setting selectable fields on K8s < 1.30 by @clux in https://github.com/kube-rs/kube/pull/1612
- conditionally install
aws-lc-rsby @goenning in https://github.com/kube-rs/kube/pull/1617 - Warn when trying to use an unsupported proxy protocol by @nightkr in https://github.com/kube-rs/kube/pull/1626
0.96.0 / 2024-10-09#
Highlights#
- Features:
webpki-rootsadded #1323, and predicates no longer requireunstable-runtime#1578 - Local auth: improve leniency/kubectl-alignment #1595, remove http proxy vars #1520
- Dependencies: upgrades to
towerandsecrecy, andderivativeswapped foreduce
What's Changed#
Added#
- rustls: optionally use WebPKI roots to avoid panicking on Android & iOS by @ewilken in https://github.com/kube-rs/kube/pull/1323
- Stabilise runtime predicates by @clux in https://github.com/kube-rs/kube/pull/1578
- Add
ObjectRef::fromas alias for::from_objby @nightkr in https://github.com/kube-rs/kube/pull/1598
Changed#
- Bump
secrecyto 0.10 by @clux in https://github.com/kube-rs/kube/pull/1588 - Upgrades
towerto 0.5.1 by @markdingram in https://github.com/kube-rs/kube/pull/1589 - runtime: rename references from Flatten to Decode by @clux in https://github.com/kube-rs/kube/pull/1520
Removed#
- remove using HTTP PROXY from environment variable by @aviramha in https://github.com/kube-rs/kube/pull/1587
Fixed#
- replace derivative dependency with educe by @rorosen in https://github.com/kube-rs/kube/pull/1585
- change auth behavior to match upstream on unknown/empty user - use null auth by @aviramha in https://github.com/kube-rs/kube/pull/1595
0.95.0 / 2024-09-16#
Kubernetes v1_31 support via k8s-openapi 0.23#
Please upgrade k8s-openapi along with kube to avoid conflicts.
New minimum versions: MSRV 1.77.2, MK8SV: 1.26
What's Changed#
Changed#
- Update tokio-tungstenite requirement from 0.23.0 to 0.24.0 by @dependabot in https://github.com/kube-rs/kube/pull/1579
- Bump
k8s-openapito 0.23 for Kubernetes 1.31 support by @clux in https://github.com/kube-rs/kube/pull/1581
Full Changelog: https://github.com/kube-rs/kube/compare/0.94.2...0.95.0
0.94.2 / 2024-09-13#
What's Changed#
Fixes a runtime regression in watch_object.
Fixed#
- Ensure
watch_objecthandles objects removed before init by @markdingram in https://github.com/kube-rs/kube/pull/1577
0.94.1 / 2024-09-09#
What's Changed#
Convenience release. Adjusted a version bound to avoid possibility of running into version compatibility errors with hyper-rustls.
Fixed#
- Update hyper-rustls minimum version by @divergentdave in https://github.com/kube-rs/kube/pull/1575
0.94.0 / 2024-09-09#
Highlights#
Support for rustls's aws-lc-rs is available under a new kube/aws-lc-rs feature. Via https://github.com/kube-rs/kube/pull/1568 for https://github.com/kube-rs/kube/issues/1562
Furthermore, there are improvements to partial typing:
- Added a
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 https://github.com/kube-rs/kube/pull/1556 - A derive macro for
Resource;#[derive(Resource)]allows inheriting existingk8s-openapiresource implementations to avoid stepping down to the dynamic api. See the cert check example for usage. Via https://github.com/kube-rs/kube/pull/1565
What's Changed#
Added#
- Add error boundary wrapper type by @nightkr in https://github.com/kube-rs/kube/pull/1556
- Implement Error for error_boundary::InvalidObject by @nightkr in https://github.com/kube-rs/kube/pull/1558
- Add finalizers predicate filter by @ivan-kiselev in https://github.com/kube-rs/kube/pull/1560
- optional feature to use
aws-lc-rsrustls feature by @mcluseau in https://github.com/kube-rs/kube/pull/1568 - Add
Resourcederive macro by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1565
Changed#
- Make implicitly dependent feature explicitly depend on each other by @clux in https://github.com/kube-rs/kube/pull/1551
0.93.1 / 2024-07-23#
What's Changed#
Fixed#
- add missing feature gate on ConfigExt for no-features build by @HoKim98 in https://github.com/kube-rs/kube/pull/1549
0.93.0 / 2024-07-22#
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#
- add option to provide headers to send as client by @aviramha in https://github.com/kube-rs/kube/pull/1523
- Add prelude for blanket and extension traits across sub-crates by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1527
- Label selector support by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1539
Changed#
- Update garde requirement from 0.19.0 to 0.20.0 by @dependabot in https://github.com/kube-rs/kube/pull/1535
Removed#
- runtime: remove deprecated default_backoff by @clux in https://github.com/kube-rs/kube/pull/1518
Fixed#
- Fix watcher not fully paginating on Init by @clux in https://github.com/kube-rs/kube/pull/1525 (ported to 0.92.1)
- Prevent empty string object name requests from being sent to the apiserver by @xMAC94x in https://github.com/kube-rs/kube/pull/1541
0.92.1 / 2024-06-19#
Bugfix Release#
This release fixes #1524; a regression from 0.92.0 causing watcher to skip pages on initial list. See #1525.
It is recommended to upgrade from 0.92.0.
What's Changed#
Fixed#
- Fix watcher not fully paginating on Init by @clux in https://github.com/kube-rs/kube/pull/1525
0.92.0 / 2024-06-12#
Runtime: Decreased Memory Usage from watcher#
Buffering of initial pages / init streams is no longer a mandatory process with watcher::Event gaining new Init, InitApply, and InitDone events. These events are read on the store side maintaining the atomicity/completeness guarantees for reflector and Store users.
This constitutes a significant memory decrease for all watcher users, and it has more details in a new kube.rs/blog post.
The downside is a breaking change to watcher::Event. Plain usage of watcher / reflector / Controller should generally not need to change anything, but custom stores / matches on watcher::Event will need an update. If you are writing custom stores, the new signals should be helpful for improved caching.
Thanks to @fabriziosestito via Kubewarden for https://github.com/kube-rs/kube/pull/1494 . Follow-ups for this feature: https://github.com/kube-rs/kube/pull/1499 and https://github.com/kube-rs/kube/pull/1504.
Client: HTTP Proxy Support#
Support is now introduced under the http-proxy feature pulling in hyper-http-proxy complementing the already existing socks5 proxy feature.
Thanks to @aviramha via MetalBear for the support in https://github.com/kube-rs/kube/pull/1496, with follow-ups https://github.com/kube-rs/kube/pull/1501 + https://github.com/kube-rs/kube/pull/1502
What's Changed#
Added#
- Added support for HTTP proxy with hyper-proxy2 by @aviramha in https://github.com/kube-rs/kube/pull/1496
- Implement client native object reference fetching by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1511
Changed#
- Reduce buffering between watcher and Store by @fabriziosestito in https://github.com/kube-rs/kube/pull/1494
- Rename new watcher Event names and remove one that cannot happen by @clux in https://github.com/kube-rs/kube/pull/1499
- Update
tokio-tungsteniteto 0.23 by @Toasterson in https://github.com/kube-rs/kube/pull/1509 - Align
watcher::Eventinit/page variants by @clux in https://github.com/kube-rs/kube/pull/1504 - Update json-patch to 2.0.0 by @bobsongplus in https://github.com/kube-rs/kube/pull/1507
Fixed#
- Fix potentially panicing unchecked duration adds in runtime by @clux in https://github.com/kube-rs/kube/pull/1489
- ObjectList now accepts null metadata like upstream k8s does by @aviramha in https://github.com/kube-rs/kube/pull/1492
- rename http_proxy feature to http-proxy and add it to the umbrella crate by @aviramha in https://github.com/kube-rs/kube/pull/1501
- move from
hyper-proxy2tohyper-http-proxyby @aviramha in https://github.com/kube-rs/kube/pull/1502
0.91.0 / 2024-05-06#
Kubernetes v1_30 support via k8s-openapi 0.22#
Please upgrade k8s-openapi along with kube to avoid conflicts.
Unstable Stream Sharing#
A more complete implementation that allows sharing watcher streams between multiple Controllers (for https://github.com/kube-rs/kube/issues/1080) has been added under the unstable-runtime feature-flag in #1449 and #1483 by @mateiidavid. This represents the first usable implementation of shared streams (and replaces the older prototype part in #1470). While some changes are expected, you can check the shared_stream_controller example for a high-level overview.
What's Changed#
Added#
- Add shared stream interfaces by @mateiidavid in https://github.com/kube-rs/kube/pull/1449
- Allow to create non-controller owner reference for resource by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1475
- feat(runtime): support for owned shared streams by @mateiidavid in https://github.com/kube-rs/kube/pull/1483
Changed#
- Upgrade
k8s-openapito 0.22 and bump MK8SV to 1.25 by @clux in https://github.com/kube-rs/kube/pull/1485
Removed#
- Remove abandoned
StreamSubscribeimplementation by @clux in https://github.com/kube-rs/kube/pull/1470
Fixed#
- Include inner error message in Display for SerdeError by @XAMPPRocky in https://github.com/kube-rs/kube/pull/1481
- Remove invalid
uniqueItemsproperty from CRDs when Sets are used by @sbernauer in https://github.com/kube-rs/kube/pull/1484
0.90.0 / 2024-04-03#
Highlights#
kube::client::Body Improvements#
- Unit testing helpers #1444 + #1445,
- Accuracy;
size_hintandis_end_streamimplemented in #1452 + internal cleanups #1453 and #1455
Dependency Cleanups#
rustlsto 0.23 in #1457once_cellremoved in #1447 (no longer needed)futuresfeature prune in #1442chronofeatures prune in #1448, and bump its min version pin in #1458
What's Changed#
Added#
- Add proxy
Body::collect_bytesfor easier unit tests by @clux in https://github.com/kube-rs/kube/pull/1445
Changed#
- update to
rustls0.23 by @tottoto in https://github.com/kube-rs/kube/pull/1457
Fixed#
- disable unused
futuresfeature by @tottoto in https://github.com/kube-rs/kube/pull/1442 - Expose
Body::emptyfor easier tests by @clux in https://github.com/kube-rs/kube/pull/1444 - replace
once_cellLazy with ordinary static by @tottoto in https://github.com/kube-rs/kube/pull/1447 - replace
chronofeatureclockwithnowby @tottoto in https://github.com/kube-rs/kube/pull/1448 - implement
http_bodytrait method by @tottoto in https://github.com/kube-rs/kube/pull/1452 - Fix examples for custom clients not authenticating by @clux in https://github.com/kube-rs/kube/pull/1450
- Set a compatible minimum
chronoversion by @clux in https://github.com/kube-rs/kube/pull/1458
Full Changelog: https://github.com/kube-rs/kube/compare/0.89.0...0.90.0
0.89.0 / 2024-03-26#
Upgrading hyper and http to 1.0 and MSRV to 1.75.0#
This release completes the hyper & http ecosystem upgrade #1351 via #1438. In particular, this change includes upgrades to http, http-body, tower-http, hyper, hyper-openssl, hyper-rustls, hyper-socks2, hyper-timeout, tame-oauth, tokio-tungstenite, tower-http, rustls, rustls-pemfile, as well as adopting the new hyper_util and http_body_util to make the change.
While this change constitutes significant internal churn (and a new kube::client::Body), our external api remains largely unchanged. Some minor changes are necessary for custom clients, and for integration testing using tower_mock. See the controller-rs upgrade pr or the examples folder in this commit for details.
What's Changed#
Added#
- client_ext for
Client::getandClient::listby @clux in https://github.com/kube-rs/kube/pull/1375 - direct node access logs/portforward/exec/attach via kubelet debug interface by @XciD in https://github.com/kube-rs/kube/pull/1428
Changed#
- Bump MSRV to
1.75.0by @clux in https://github.com/kube-rs/kube/pull/1408 - Ease the bound for
reflectorto only request identifying metadata by @SOF3 in https://github.com/kube-rs/kube/pull/1393 - Update base64 requirement from 0.21.4 to 0.22.0 by @dependabot in https://github.com/kube-rs/kube/pull/1422
- upgrade
jsonpath-rustto 0.5.0 by @clux in https://github.com/kube-rs/kube/pull/1429 - update to hyper 1 by @tottoto in https://github.com/kube-rs/kube/pull/1438
Fixed#
- Serialize TerminalSize fields as PascalCase by @nightkr in https://github.com/kube-rs/kube/pull/1407
Kubeconfigallowcertificate_authority_datanot present inExecAuthClusterby @ljun20160606 in https://github.com/kube-rs/kube/pull/1432- fix: check err on
Client::request_streamby @XciD in https://github.com/kube-rs/kube/pull/1433
0.88.1 / 2024-01-26#
What's Changed#
This is a bug fix release for a deserialization issue introduced in 0.88.0.
Fixed#
- Minor fixes to
ObjectListby @flavio in https://github.com/kube-rs/kube/pull/1398
0.88.0 / 2024-01-21#
Kubernetes v1_29 support via k8s-openapi 0.21#
Please upgrade k8s-openapi along with kube to avoid conflicts.
What's Changed#
Added#
- Add type meta data for list types by @Danil-Grigorev in https://github.com/kube-rs/kube/pull/1380
Changed#
- Bump MSRV to 1.70 by @clux in https://github.com/kube-rs/kube/pull/1384
- Upgrade
k8s-openapifor Kubernetesv1_29support by @clux in https://github.com/kube-rs/kube/pull/1394
0.87.2 / 2023-12-22#
What's Changed#
Added#
- Add support for
LogParams::since_timeby @clux in https://github.com/kube-rs/kube/pull/1342 - Provide cluster info to exec plugins by @aviramha in https://github.com/kube-rs/kube/pull/1331
- Allow setting a description on a derived CRD by @sbernauer in https://github.com/kube-rs/kube/pull/1359
Changed#
- Bump MSRV from 1.64 to 1.65 by @clux in https://github.com/kube-rs/kube/pull/1353
- Switch from
jsonpath_libtojsonpath-rustby @ilya-bobyr in https://github.com/kube-rs/kube/pull/1345
0.87.1 / 2023-11-01#
Headlines#
- fixed a
Controllerissue with reconciliation requests disappearing when usingconcurrency#1324 - improved
Clientwith better exec auth behaviour #1320, timeout control #1314, and socks5 proxy handling #1311 - small changes to an unstable streams feature #1304, and a a derive property that is now illegal with
syn2 #1307
Big thanks to everyone involved 🎃
What's Changed#
Added#
- Feature-flagged support for
socks5proxy inClientby @Razz4780 in https://github.com/kube-rs/kube/pull/1311 - Add example for raw API Server requests by @mateiidavid in https://github.com/kube-rs/kube/pull/1330
Changed#
- Document
Controller::reconcile_onand removeErrinput requirement by @clux in https://github.com/kube-rs/kube/pull/1304 - Bump
base64to0.21by @clux in https://github.com/kube-rs/kube/pull/1308 - Upgrade
darlingandsynand rename#[kube(struct)]by @clux in https://github.com/kube-rs/kube/pull/1307
Fixed#
- Fixed
KUBERNETES_EXEC_INFOenvironment variable passed to auth plugins by @Razz4780 in https://github.com/kube-rs/kube/pull/1320 - Fix
Controller: pending messages are stuck in thescheduledmap by @co42 in https://github.com/kube-rs/kube/pull/1324 - Set a default write timeout by @alex-hunt-materialize in https://github.com/kube-rs/kube/pull/1314
Full Changelog: https://github.com/kube-rs/kube/compare/0.86.0...0.87.1
0.86.0 / 2023-09-08#
Headlines#
k8s-openapi 0.20 for Kubernetes v1_28#
Please note upstream api removals.
As usual, upgrade k8s-openapi along with kube to avoid issues.
Default TLS stack changed to rustls#
With last year's upstream changes from rustls (closing all our existing rustls issues - see https://github.com/kube-rs/kube/issues/1192), this is now the better choice for security, features, and ease of building. The previous default openssl stack can still be used with default-features = false plus the openssl-tls feature.
Controller Configuration#
A controller Config has been added to allow tweaking two behaviour parameters (debouncing in #1265 and concurrency limits in #1277) of the Controller. Huge thanks to @aryan9600 for his work.
Streaming Lists#
The sendInitialEvents alpha feature is now supported, and is quickly testable in the pod_watcher example when using the feature gate. This will help optimise the memory profile of controllers when the feature becomes generally available. Amazing work by first time contributor @casualjim.
What's Changed#
Added#
- add
controller::Configand debounce period to scheduler by @aryan9600 in https://github.com/kube-rs/kube/pull/1265 - adds watch-list implementation without breaking changes by @casualjim in https://github.com/kube-rs/kube/pull/1255
- allow configuring controller's concurrency by @aryan9600 in https://github.com/kube-rs/kube/pull/1277
Changed#
- Change default TLS stack to
rustls-tlsby @clux in https://github.com/kube-rs/kube/pull/1261 - Bump k8s-openapi to 0.20.0 by @clux in https://github.com/kube-rs/kube/pull/1291
Fixed#
core: omit invalid resource version parameters when doing paged requests by @goenning in https://github.com/kube-rs/kube/pull/1281
0.85.0 / 2023-08-06#
What's Changed#
Added#
- Add
WatchStreamExt::reflectto allow chaining on a reflector by @clux in https://github.com/kube-rs/kube/pull/1252 - Implement ephemeral containers subresource by @jmintb in https://github.com/kube-rs/kube/pull/1153
Changed#
- Swap
dirs-nextdependency to cargo-team maintainedhomecrate by @utkarshgupta137 in https://github.com/kube-rs/kube/pull/1207 - Upgrade
k8s-openapito0.19.0forv1_27support by @clux in https://github.com/kube-rs/kube/pull/1271
Fixed#
watcher: returnNoResourceVersionerror if resource version is empty by @aryan9600 in https://github.com/kube-rs/kube/pull/1259- Update the
schedulermessage when preponing by @nightkr in https://github.com/kube-rs/kube/pull/1260
0.84.0 / 2023-07-14#
Highlights#
Stream Improvements#
On the runtime side, the Controller now delays reconciles until the main Store is ready (via a new Store helper from #1243). The stream selection for owned resources is more efficient (#1240), and the underlying watcher streams now all paginate (#1249). There are also many new WatchStreamExt helpers ( #1246 + #1228 + #1232) as a continued work towards the more customisable streams-api (#1080).
On the client-side; streaming logs are now easier to deal with as an AsyncBufRead #1235.
OIDC Refresh#
Optional OIDC refreshable token support was introduced in #1229 under kube/oidc for out-of-cluster Client configuration. Previously, refresh support was limited to non-OIDC tokens from the GcpOuth provider (kube/oauth) or through arbitrary exec calls / TokenFile loading.
What's Changed#
Added#
- Add
Predicatetrait to allow combination + fallbacks by @clux in https://github.com/kube-rs/kube/pull/1228 - Added refreshing OIDC ID token as an optional feature by @Razz4780 in https://github.com/kube-rs/kube/pull/1229
- Add
WatchStreamExt::default_backoffshorthand by @clux in https://github.com/kube-rs/kube/pull/1232 - Derive
PartialEqoncoreparams structs by @danrspencer in https://github.com/kube-rs/kube/pull/1237 - Track store readiness by @nightkr in https://github.com/kube-rs/kube/pull/1243
- Add
WatchStreamExt::modify()to modify events by @aryan9600 in https://github.com/kube-rs/kube/pull/1246 - Add default pagination to
watcherby @clux in https://github.com/kube-rs/kube/pull/1249
Changed#
- Bump MSRV from 1.63 to 1.64 by @clux in https://github.com/kube-rs/kube/pull/1233
- Change
Api::log_streamto returnAsyncBufReadby @aryan9600 in https://github.com/kube-rs/kube/pull/1235
Fixed#
- Make
Controller::ownsusemetadata_watcherinternally by @clux in https://github.com/kube-rs/kube/pull/1240
0.83.0 / 2023-06-05#
What's Changed#
Added#
- Add
Controller::reconcile_onby @co42 in https://github.com/kube-rs/kube/pull/1163 - Add
predicates::resource_versionby @clux in https://github.com/kube-rs/kube/pull/1221 - add
Durationtokube-coreby @hawkw in https://github.com/kube-rs/kube/pull/1224
Changed#
- Introduce
GetParamssupport by @mateiidavid in https://github.com/kube-rs/kube/pull/1214
Fixed#
- Swap
validatorforgardeby @mateiidavid in https://github.com/kube-rs/kube/pull/1212 - fix:
#[kube(crates(serde = "some_crate::serde"))]was not working by @chubei in https://github.com/kube-rs/kube/pull/1215
0.82.2 / 2023-04-19#
Watcher Fixes#
Two fixes to allow watcher::Config to function as intended.
What's Changed#
Fixed#
runtime::watcher: only set rv if semantic is any by @goenning in https://github.com/kube-rs/kube/pull/1204watcher::Config: DeriveClone+Debug+PartialEqby @clux in https://github.com/kube-rs/kube/pull/1206
Full Changelog: https://github.com/kube-rs/kube/compare/0.82.1...0.82.2
0.82.1 / 2023-04-14#
Bugfix Release#
nullable is re-instated on Option types from CustomResource generated schemas, due to unintended errors removing it caused on Api::patch calls on None members that were not setting #[serde(skip_serializing_if = "Option::is_none")]. This only affected 0.81 and 0.82 from last week, and does not require user action regardless of where you are upgrading from.
This release also fixes a metadata_watcher triggering deserialization error from doing Api::list_metadata on an empty set.
What's Changed#
Fixed#
- Fix
WatchParamsbookmarks forwatch_metadataby @clux in https://github.com/kube-rs/kube/pull/1193 - Fix
ObjectListnot deserializingitems: nullby @suryapandian in https://github.com/kube-rs/kube/pull/1199 - Revert "kube-derive: Disable
option_nullablefor CRD generation" by @Dav1dde in https://github.com/kube-rs/kube/pull/1201
0.82.0 / 2023-04-08#
Dependency Updates#
This release brings in the new k8s-openapi release.
Be sure to upgrade k8s-openapi and kube simultaneously to avoid multiple version errors:
cargo upgrade -p k8s-openapi -p kube -i
What's Changed#
Changed#
- Bump
serde_yamlto 0.9 by @clux in https://github.com/kube-rs/kube/pull/1188 - Bump
k8s-openapito 0.18.0 by @clux in https://github.com/kube-rs/kube/pull/1190
Full Changelog: https://github.com/kube-rs/kube/compare/0.81.0...0.82.0
0.81.0 / 2023-04-07#
Highlights#
List/Watch Changes#
One big change is the splitting of ListParams into ListParams and WatchParams in #1162 and #1171. If you were using api.list directly, this should not affect you, but api.watch calls will need a replace of ListParams to WatchParams. Apart from the resulting field splitting, the two structs still have a mostly compatible api.
If you were passing ListParams to watcher, you can change this for a new watcher::Config with a mostly compatible interface:
- let stream = watcher(api, ListParams::default());
+ let stream = watcher(api, watcher::Config::default());
The reason for this change has been to add support for specific version match strategies and has new builders on both ListParams and watcher::Config to control the strategy. Using the new VersionMatch::NotOlderThan can reduce strain on the apiserver for individual api.list calls. Watchers will benefit the most from this, and should consider using the semantic Any strategy (= NotOlderThan with version "0") on all relists by setting watcher::Config::any_semantic().
rustls#
This release closes all our rustls issues as a consequence of the long standing IP address incompatibility (#153) having been resolved upstream. All rustls specific overrides (such as using the deprecated incluster_dns strategy for configuration #1184) have been removed as a result.
Controller streams#
Multiple new runtime features have been added to be able to more precisely control the input streams used by Controller a starting step towards stream sharing (#1080) and as a way to reduce excess input events. Because these interfaces are likely to remain in flux for some time, these are only available under unstable feature flags.
What's Changed#
Added#
- Add
predicatesto allow filteringwatcherstreams by @clux in https://github.com/kube-rs/kube/pull/911 - Add
Controller::owns_streamby @Dav1dde in https://github.com/kube-rs/kube/pull/1173 - Add
Controller::for_stream+Controller::watches_streamby @clux in https://github.com/kube-rs/kube/pull/1187
Changed#
- Split
ListParamsandWatchParamsby @nabokihms in https://github.com/kube-rs/kube/pull/1162 - Make
VersionMatchfollow upstream + configure list semantics inwatcher::Configby @clux in https://github.com/kube-rs/kube/pull/1171 - kube-derive: Disable
option_nullablefor CRD generation by @Dav1dde in https://github.com/kube-rs/kube/pull/1079
Fixed#
- Run
rustlsCI against IP cluster address by @clux in https://github.com/kube-rs/kube/pull/1183 - Fix: tower buffer's worker closed unexpectedly by @divinerapier in https://github.com/kube-rs/kube/pull/1185
- Avoid special
Config::inclusterbehavior forrustlsby @clux in https://github.com/kube-rs/kube/pull/1184
0.80.0 / 2023-03-02#
Notes#
The PartialObjectMeta struct has been changed to allow static dispatch through a new generic parameter. It comes with a new PartialObjectMetaExt trait to help construct it.
Early release for the above change to the new metadata api, plus a trigger for our currently broken docs.rs.
What's Changed#
Changed#
- Genericize
PartialObjectMetaover the underlyingResourceby @clux in https://github.com/kube-rs/kube/pull/1152
Fixed#
- Bypass nightly ICE in docs build by @clux in https://github.com/kube-rs/kube/pull/1155
Full Changelog: https://github.com/kube-rs/kube/compare/0.79.0...0.80.0
0.79.0 / 2023-02-23#
Watch Improvements#
A big feature this time around is the added support for the metadata api via #1137. This is a variant api that only returns the ObjectMeta and TypeMeta to reduce network load, and has a low-level watch analogue available at Api::watch_metadata. Most users will generally want an infinite watch stream rather than the low-level method, so kube::runtime::metadata_watcher has been added as a direct analogue of watcher via #1145. The dynamic_watcher example shows how to switch between the two to get up and running.
The watcher also emits warnings now when HTTP 403s are encountered from Kubernetes, as this usually indicates a non-transient misconfiguration that must be fixed on the administrator side with RBAC.
Finally, there is work in progress on shared streams via WatchStreamExt from #1131 under an unstable feature.
What's Changed#
Added#
- Client: expose
default_namespace()by @jpmcb in https://github.com/kube-rs/kube/pull/1123 - Add support for metadata API by @mateiidavid in https://github.com/kube-rs/kube/pull/1137
- Runtime: Add
WatchStreamExt::subscribeby @danrspencer in https://github.com/kube-rs/kube/pull/1131 - Introduce support for persistent metadata watches by @mateiidavid in https://github.com/kube-rs/kube/pull/1145
Changed#
- Bump Rust MSRV to 1.63.0 by @mateiidavid in https://github.com/kube-rs/kube/pull/1146
Fixed#
Config: make cluster/users/clusters optional by @goenning in https://github.com/kube-rs/kube/pull/1120- Add better logging for watcher errors by @clux in https://github.com/kube-rs/kube/pull/1134
- kubeconfig: deserialize null vectors as default by @goenning in https://github.com/kube-rs/kube/pull/1142
0.78.0 / 2023-01-06#
Kubernetes Bump#
This release brings in the new k8s-openapi release for 1.26 structs, and sets our MK8SV to 1.21.
Be sure to upgrade k8s-openapi and kube simultaneously to avoid multiple version errors:
cargo upgrade -p k8s-openapi -p kube -i
What's Changed#
Added#
- reflector: add helper function to the
Storeby @eliad-wiz in https://github.com/kube-rs/kube/pull/1111
Changed#
- Bump
k8s-openapi@0.17.0and MK8SV by @clux in https://github.com/kube-rs/kube/pull/1116
Removed#
- Remove deprecated
Config::timeoutby @clux in https://github.com/kube-rs/kube/pull/1113
Fixed#
- fix shell exec exiting message loop when terminalSizeReceiver is dropped by @erebe in https://github.com/kube-rs/kube/pull/1112
0.77.0 / 2022-12-15#
Highlights#
This release saw numerous improvements across various parts of the codebase with lots of help from external contributors. Look for improvements in error handling, client exec behaviour, dynamic object conversion, certificate handling, and last, but not least; lots of enhancements in the config module. Huge thanks to everyone who contributed!
Config Enhancements#
Kubeconfigs relying on ExecConfig for auth should now work with a lot more cases (with improvements to script interactivity, cert passing, env-drop, and windows behaviour). We further aligned our Kubeconfig parsing with client-go's behaviour, and also exposed Kubeconfig::merge. Finally, we now pass Config::tls_server_name through to the Client, which has let us include a better rustls workaround for the long-standing ip issue (enabled by default).
What's Changed#
Added#
- Add
DynamicObjects::try_parsefor typed object conversion by @jmintb in https://github.com/kube-rs/kube/pull/1061 - Add
ExecConfig::drop_envto filter host evars for auth providers by @aviramha in https://github.com/kube-rs/kube/pull/1062 - Add support for terminal size when executing command inside a container by @armandpicard in https://github.com/kube-rs/kube/pull/983
- add cmd-drop-env to AuthProviderConfig by @aviramha in https://github.com/kube-rs/kube/pull/1074
- Check for client cert with exec by @rcanderson23 in https://github.com/kube-rs/kube/pull/1089
- Change
Kubeconfig::mergefn to public. by @goenning in https://github.com/kube-rs/kube/pull/1100 - Fix interactivity in auth exec by @armandpicard in https://github.com/kube-rs/kube/pull/1083
Changed#
- [windows] skip window creation on auth exec by @goenning in https://github.com/kube-rs/kube/pull/1095
- Add
Config::tls_server_nameand validate when using rustls by @clux in https://github.com/kube-rs/kube/pull/1104
Removed#
- Remove deprecated
ResourceExt::nameby @clux in https://github.com/kube-rs/kube/pull/1105
Fixed#
- Bump tracing dependency to 0.1.36 by @teozkr in https://github.com/kube-rs/kube/pull/1070
- Improve error message on azure auth not being supported by @goenning in https://github.com/kube-rs/kube/pull/1082
- exec: ensure certs always end with a new line by @goenning in https://github.com/kube-rs/kube/pull/1096
- fix: align kube-rs with client-go config parsing by @goenning in https://github.com/kube-rs/kube/pull/1077
- Return error from
watcherwhen kinds do not support watch by @clux in https://github.com/kube-rs/kube/pull/1101
0.76.0 / 2022-10-28#
Highlights#
#[derive(CustomResource)] now supports schemas with untagged enums#
Expanding on our existing support for storing Rust's struct enums in CRDs, Kube will now try to convert #[serde(untagged)] enums as well. Note that if the same field is present in multiple untagged variants then they must all have the same shape.
Removed deprecated try_flatten_* functions#
These have been deprecated since 0.72, and are replaced by the equivalent WatchStreamExt methods.
What's Changed#
Added#
- Adds example to
Controller::watchesby @Dav1dde in https://github.com/kube-rs/kube/pull/1026 - Discovery: Add
ApiGroup::resources_by_stabilityby @imuxin in https://github.com/kube-rs/kube/pull/1022 - Add support for untagged enums in CRDs by @sbernauer in https://github.com/kube-rs/kube/pull/1028
- Derive PartialEq for DynamicObject by @pbzweihander in https://github.com/kube-rs/kube/pull/1048
Removed#
- Runtime: Remove deprecated util
try_flatten_helpers by @clux in https://github.com/kube-rs/kube/pull/1019 - Remove
native-tlsfeature by @kazk in https://github.com/kube-rs/kube/pull/1044
Fixed#
- add fieldManager querystring to all operations by @goenning in https://github.com/kube-rs/kube/pull/1031
- Add verify_tls1x_signature for NoCertVerification by @rvql in https://github.com/kube-rs/kube/pull/1034
- Fix compatibility with schemars' preserve_order feature by @teozkr in https://github.com/kube-rs/kube/pull/1050
- Hoist enum values from subschemas by @teozkr in https://github.com/kube-rs/kube/pull/1051
0.75.0 / 2022-09-21#
Highlights#
Upgrade k8s-openapi to 0.16 for Kubernetes 1.25#
The update to k8s-openapi@0.16.0 makes this the first release with tentative Kubernetes 1.25 support.
While the new structs and apis now exist, we recommend holding off on using 1.25 until a deserialization bug in the apiserver is resolved upstream. See #997 / #1008 for details.
To upgrade, ensure you bump both kube and k8s-openapi:
cargo upgrade kube k8s-openapi
New/Old Config::incluster default to connect in cluster#
Our previous default of connecting to the Kubernetes apiserver via kubernetes.default.svc has been reverted back to use the old environment variables after Kubernetes updated their position that the environment variables are not legacy. This does unfortunately regress on rustls support, so for those users we have included a Config::incluster_dns to work around the old rustls issue while it is open.
Controller error_policy extension#
The error_policy fn now has access to the object that failed the reconciliation to ease metric creation / failure attribution. The following change is needed on the user side:
-fn error_policy(error: &Error, ctx: Arc<Data>) -> Action {
+fn error_policy(_obj: Arc<YourObject>, error: &Error, ctx: Arc<Data>) -> Action {
Polish / Subresources / Conversion#
There are also a slew of ergonomics improvements, closing of gaps in subresources, adding initial support for ConversionReview, making Api::namespaced impossible to use for non-namepaced resources (a common pitfall), as well as many great fixes to the edge cases in portforwarding and finalizers. Many of these changes came from first time contributors. A huge thank you to everyone involved.
What's Changed#
Added#
- Make
Config::auth_infopublic by @danrspencer in https://github.com/kube-rs/kube/pull/959 - Make raw
Client::sendmethod public by @tiagolobocastro in https://github.com/kube-rs/kube/pull/972 - Make
typesonAdmissionRequestandAdmissionResponsepublic by @clux in https://github.com/kube-rs/kube/pull/977 - Add
#[serde(default)]to metadata field ofDynamicObjectby @pbzweihander in https://github.com/kube-rs/kube/pull/987 - Add
create_subresourcemethod toApiandcreate_token_requestmethod toApi<ServiceAccount>by @pbzweihander in https://github.com/kube-rs/kube/pull/989 - Controller: impl Eq and PartialEq for
Actionby @Sherlock-Holo in https://github.com/kube-rs/kube/pull/993 - Add support for CRD
ConversionReviewtypes by @MikailBag in https://github.com/kube-rs/kube/pull/999
Changed#
- Constrain Resource trait and Api::namespaced by Scope by @clux in https://github.com/kube-rs/kube/pull/956
- Add connect/read/write timeouts to
Configby @goenning in https://github.com/kube-rs/kube/pull/971 - Controller: Include the object being reconciled in the
error_policyby @felipesere in https://github.com/kube-rs/kube/pull/995 Config: Newinclusterandincluster_dnsconstructors by @olix0r in https://github.com/kube-rs/kube/pull/1001- Upgrade
k8s-openapito 0.16 by @clux in https://github.com/kube-rs/kube/pull/1008
Fixed#
- Remove
tracing::instrumentfromapply_debug_overridesby @kazk in https://github.com/kube-rs/kube/pull/958 - fix duplicate finalizers race condition by @alex-hunt-materialize in https://github.com/kube-rs/kube/pull/965
- fix: portforward connection cleanup by @tiagolobocastro in https://github.com/kube-rs/kube/pull/973
0.74.0 / 2022-07-09#
Highlights#
Polish, bug fixes, guidelines, ci improvements, and new contributors#
This release features smaller improvements/additions/cleanups/fixes, many of which are from new first-time contributors! Thank you everyone!
The listed deadlock fix was backported to 0.73.1.
We have also been trying to clarify and prove a lot more of our external-facing guarantees, and as a result:
- We have codified our Kubernetes versioning policy
- The Rust version policy has extended its support range
- Our CI has been extended
ResourceExt::name deprecation#
A consequence of all the policy writing and the improved clarity we have decided to deprecate the common ResourceExt::name helper.
This method could panic and it is unexpected for the users and bad for our consistency. To get the old functionality, you can replace any .name() call on a Kubernetes resources with .name_unchecked(); but as the name implies, it can panic (in a local setting, or during admission). We recommend you replace it with the new ResourceExt::name_any for a general identifier:
-pod.name()
+pod.name_any()
What's Changed#
Added#
- Add support for passing the
fieldValidationquery parameter on patch by @phroggyy in https://github.com/kube-rs/kube/pull/929 - Add
conditions::is_job_completedby @clux in https://github.com/kube-rs/kube/pull/935
Changed#
- Deprecate
ResourceExt::namein favour of safe name_* alternatives by @clux in https://github.com/kube-rs/kube/pull/945
Removed#
- Remove
#[kube(apiextensions)]flag fromkube-deriveby @clux in https://github.com/kube-rs/kube/pull/920
Fixed#
- Document every public derived fn from kube-derive by @clux in https://github.com/kube-rs/kube/pull/919
- fix applier hangs which can happen with many watched objects by @moustafab in https://github.com/kube-rs/kube/pull/925
- Applier: Improve reconciler reschedule context to avoid deadlocking on full channel by @teozkr in https://github.com/kube-rs/kube/pull/932
- Fix deserialization issue in AdmissionResponse by @clux in https://github.com/kube-rs/kube/pull/939
- Admission controller example fixes by @Alibirb in https://github.com/kube-rs/kube/pull/950
0.73.1 / 2022-06-03#
Highlights#
This patch release fixes a bug causing applier and Controller to deadlock when too many Kubernetes object change events were ingested at once. All users of applier and Controller are encouraged to upgrade as quickly as possible. Older versions are also affected, this bug is believed to have existed since the original release of kube_runtime.
What's Changed#
Fixed#
- [0.73 backport] fix applier hangs which can happen with many watched objects (#925) by @moustafab (backported by @teozkr) in https://github.com/kube-rs/kube/pull/927
Full Changelog: https://github.com/kube-rs/kube/compare/0.73.0...0.73.1
0.73.0 / 2022-05-23#
Highlights#
New k8s-openapi version and MSRV#
Support added for Kubernetes v1_24 support via the new k8s-openapi version. Please also run cargo upgrade --workspace k8s-openapi when upgrading kube.
This also bumps our MSRV to 1.60.0.
Reconciler change#
A small ergonomic change in the reconcile signature has removed the need for the Context object. This has been replaced by an Arc. The following change is needed in your controller:
-async fn reconcile(doc: Arc<MyObject>, context: Context<Data>) -> Result<Action, Error>
+async fn reconcile(doc: Arc<MyObject>, context: Arc<Data>) -> Result<Action, Error>
This will simplify the usage of the context argument. You should no longer need to pass .get_ref() on its every use.
See the controller-rs upgrade change for details.
What's Changed#
Added#
- Add Discovery::groups_alphabetical following kubectl sort order by @clux in https://github.com/kube-rs/kube/pull/887
Changed#
- Replace runtime::controller::Context with Arc by @teozkr in https://github.com/kube-rs/kube/pull/910
- runtime: Return the object from
await_conditionby @olix0r in https://github.com/kube-rs/kube/pull/877 - Bump k8s-openapi to 0.15 for kubernetes v1_24 and bump MSRV to 1.60 by @clux in https://github.com/kube-rs/kube/pull/916
0.72.0 / 2022-05-13#
Highlights#
Ergonomics improvements#
A new runtime::WatchSteamExt (#899 + #906) allows for simpler setups for streams from watcher or reflector.
- let stream = utils::try_flatten_applied(StreamBackoff::new(watcher(api, lp), b));
+ let stream = watcher(api, lp).backoff(b).applied_objects();
The util::try_flatten_* helpers have been marked as deprecated since they are not used by the stream impls.
A new reflector:store() fn allows simpler reflector setups #907:
- let store = reflector::store::Writer::<Node>::default();
- let reader = store.as_reader();
+ let (reader, writer) = reflector::store();
Additional conveniences getters/settes to ResourceExt for manged_fields and creation_timestamp #888 + #898, plus a GroupVersion::with_kind path to a GVK, and a TryFrom<TypeMeta> for GroupVersionKind in #896.
CRD Version Selection#
Managing multiple version in CustomResourceDefinitions can be pretty complicated, but we now have helpers and docs on how to tackle it.
A new function kube::core::crd::merge_crds have been added (in #889) to help push crd schemas generated by kube-derived crds with different #[kube(version)] properties. See the kube-derive#version documentation for details.
A new example showcases how one can manage two or more versions of a crd and what the expected truncation outcomes are when moving between versions.
Examples#
Examples now have moved to tracing for its logging, respects RUST_LOG, and namespace selection via the kubeconfig context. There is also a larger kubectl example showcasing kubectl apply -f yaml as well as kubectl {edit,delete,get,watch} via #885 + #897.
What's Changed#
Added#
- Allow merging multi-version CRDs into a single schema by @clux in https://github.com/kube-rs/kube/pull/889
- Add GroupVersion::with_kind and TypeMeta -> GroupVersionKind converters by @clux in https://github.com/kube-rs/kube/pull/896
- Add managed_fields accessors to ResourceExt by @clux in https://github.com/kube-rs/kube/pull/898
- Add ResourceExt::creation_timestamp by @clux in https://github.com/kube-rs/kube/pull/888
- Support lowercase http_proxy & https_proxy evars by @DevineLiu in https://github.com/kube-rs/kube/pull/892
- Add a WatchStreamExt trait for stream chaining by @clux in https://github.com/kube-rs/kube/pull/899
- Add Event::modify + reflector::store helpers by @clux in https://github.com/kube-rs/kube/pull/907
Changed#
- Switch to kubernetes cluster dns for incluster url everywhere by @clux in https://github.com/kube-rs/kube/pull/876
- Update tower-http requirement from 0.2.0 to 0.3.2 by @dependabot in https://github.com/kube-rs/kube/pull/893
Removed#
- Remove deprecated legacy crd v1beta1 by @clux in https://github.com/kube-rs/kube/pull/890
0.71.0 / 2022-04-12#
Highlights#
Several quality of life changes and improvement this release for port-forwarding, a new ClientBuilder, better handling of kube-derive edge-cases.
We highlight some changes here that you should be especially aware of.
events::Recorder publishing to kube-system for cluster scoped resources#
Publishing events via Recorder for cluster scoped resources (supported since 0.70.0) now publish to kube-system rather than default, as all but the newest clusters struggle with publishing events in the default namespace.
Default TLS stack set to OpenSSL#
The previous native-tls default was there because we used to depend on reqwest, but because we depended on openssl anyway the feature does not make much sense. Changing to openssl-tls also improves the situation on macOS where the Security Framework struggles with PKCS#12 certs from OpenSSL v3. The native-tls feature will still be available in this release in case of issues, but the plan is to decommission it shortly. Of course, we all ideally want to move to rustls, but we are still blocked by #153.
What's Changed#
Added#
- Add
ClientBuilderthat lets users add custom middleware without full stack replacement by @teozkr in https://github.com/kube-rs/kube/pull/855 - Support top-level enums in CRDs by @sbernauer in https://github.com/kube-rs/kube/pull/856
Changed#
- portforward: Improve API and support background task cancelation by @olix0r in https://github.com/kube-rs/kube/pull/854
- Make remote commands cancellable and remove panics by @kazk in https://github.com/kube-rs/kube/pull/861
- Change the default TLS to OpenSSL by @kazk in https://github.com/kube-rs/kube/pull/863
- change event recorder cluster namespace to kube-system by @clux in https://github.com/kube-rs/kube/pull/871
Fixed#
- Fix schemas containing both properties and additionalProperties by @jcaesar in https://github.com/kube-rs/kube/pull/845
- Make dependency pins between sibling crates stricter by @clux in https://github.com/kube-rs/kube/pull/864
- Fix in-cluster kube_host_port generation for IPv6 by @somnusfish in https://github.com/kube-rs/kube/pull/875
0.70.0 / 2022-03-20#
Highlights#
Support for EC keys with rustls#
This was one of the big blockers for using rustls against clusters like k3d or k3s
While not sufficient to fix using those clusters out of the box, it is now possible to use them with a workarodund
More ergonomic reconciler#
The signature and end the Ok action in reconcile fns has been simplified slightly, and requires the following user updates:
-async fn reconcile(obj: Arc<MyObject>, ctx: Context<Data>) -> Result<ReconcilerAction, Error> {
- ...
- Ok(ReconcilerAction {
- requeue_after: Some(Duration::from_secs(300)),
- })
+async fn reconcile(obj: Arc<MyObject>, ctx: Context<Data>) -> Result<Action, Error> {
+ ...
+ Ok(Action::requeue(Duration::from_secs(300)))
The Action import lives in the same place as the old ReconcilerAction.
What's Changed#
Added#
- Add support for EC private keys by @farcaller in https://github.com/kube-rs/kube/pull/804
- Add helper for creating a controller owner_ref on Resource by @clux in https://github.com/kube-rs/kube/pull/850
Changed#
- Remove
scheduler::Errorby @teozkr in https://github.com/kube-rs/kube/pull/827 - Bump parking_lot to 0.12, but allow dep duplicates by @clux in https://github.com/kube-rs/kube/pull/836
- Update tokio-tungstenite requirement from 0.16.1 to 0.17.1 by @dependabot in https://github.com/kube-rs/kube/pull/841
- Let OccupiedEntry::commit take PostParams by @teozkr in https://github.com/kube-rs/kube/pull/842
- Change ReconcileAction to Action and add associated ctors by @clux in https://github.com/kube-rs/kube/pull/851
Fixed#
- Token reloading with RwLock by @kazk in https://github.com/kube-rs/kube/pull/835
- Fix event publishing for cluster scoped crds by @zhrebicek in https://github.com/kube-rs/kube/pull/847
- Fix invalid CRD when Enum variants have descriptions by @sbernauer in https://github.com/kube-rs/kube/pull/852
0.69.1 / 2022-02-16#
Highlights#
This is an emergency patch release fixing a bug in 0.69.0 where a kube::Client would deadlock after running inside a cluster for about a minute (#829).
All users of 0.69.0 are encouraged to upgrade immediately. 0.68.x and below are not affected.
What's Changed#
Fixed#
- [0.69.x] Fix deadlock in token reloading by @clux (backported by @teozkr) in https://github.com/kube-rs/kube/pull/831
0.69.0 / 2022-02-14#
Highlights#
Ergonomic Additions to Api#
Two new methods have been added to the client Api this release to reduce the amount of boiler-plate needed for common patterns.
Api::entryvia 811 - to aid idempotent crud operation flows (following the style ofMap::Entry)Api::get_optvia 809 - to aid dealing with theNotFoundtype error via a returnedOption
In-cluster Token reloading#
Following a requirement for Kubernetes clients against versions >= 1.22.0, our bundled AuthLayer will reload tokens every minute when deployed in-cluster.
What's Changed#
Added#
- Add conversion for
ObjectRef<K>toObjectReferenceby @teozkr in https://github.com/kube-rs/kube/pull/815 - Add
Api::get_optfor better existence handling by @teozkr in https://github.com/kube-rs/kube/pull/809 - Entry API by @teozkr in https://github.com/kube-rs/kube/pull/811
Changed#
- Reload token file at least once a minute by @kazk in https://github.com/kube-rs/kube/pull/768
- Prefer kubeconfig over in-cluster config by @teozkr in https://github.com/kube-rs/kube/pull/823
Fixed#
- Disable CSR utilities on K8s <1.19 by @teozkr in https://github.com/kube-rs/kube/pull/817
0.68.0 / 2022-02-01#
Interface Changes#
To reduce the amount of allocation done inside the runtime by reflectors and controllers, the following change via #786 is needed on the signature of your reconcile functions:
-async fn reconcile(myobj: MyK, ctx: Context<Data>) -> Result<ReconcilerAction>
+async fn reconcile(myobj: Arc<MyK>, ctx: Context<Data>) -> Result<ReconcilerAction>
This also affects the finalizer helper.
Port-forwarding#
As one of the last steps toward gold level client requirements, port-forwarding landed in #446. There are 3 new examples (port_forward*.rs) that showcases how to use this websocket based functionality.
What's Changed#
Added#
- Add a VS Code devcontainer configuration by @olix0r in https://github.com/kube-rs/kube/pull/788
- Add support for user impersonation by @teozkr in https://github.com/kube-rs/kube/pull/797
- Add port forward by @kazk in https://github.com/kube-rs/kube/pull/446
Changed#
- runtime: Store resources in an
Arcby @olix0r in https://github.com/kube-rs/kube/pull/786 - Propagate Arc through the finalizer reconciler helper by @teozkr in https://github.com/kube-rs/kube/pull/792
- Disable unused default features of chrono crate by @dreamer in https://github.com/kube-rs/kube/pull/801
Fixed#
- Use absolute path to Result in derives by @teozkr in https://github.com/kube-rs/kube/pull/795
- core: add missing reason to Display on Error::Validation in Request by @clux in https://github.com/kube-rs/kube/pull/798
0.67.0 / 2022-01-25#
Changed#
- runtime: Replace
DashMapwith a lockedAHashMapby @olix0r in https://github.com/kube-rs/kube/pull/785 - update k8s-openapi for kubernetes 1.23 support by @clux in https://github.com/kube-rs/kube/pull/789
0.66.0 / 2022-01-15#
Tons of ergonomics improvements, and 3 new contributors.
Highlighted first is the 3 most discussed changes:
Support for auto-generating schemas for enums in kube-derive#
It is now possible to embed complex enums inside structs that use #[derive(CustomResource)].
This has been a highly requested feature since the inception of auto-generated schemas. It does not work for all cases, and has certain ergonomics caveats, but represents a huge step forwards.
Note that if you depend on kube-derive directly rather than via kube then you must now add the schema feature to kube-core
New StreamBackoff mechanism in kube-runtime#
To avoid spamming the apiserver when on certain watch errors cases, it's now possible to stream wrap the watcher to set backoffs. The new default_backoff follows existing client-go conventions of being kind to the apiserver.
Initially, this is default-enabled in Controller watches (configurable via Controller::trigger_backoff) and avoids spam errors when crds are not installed.
New version priority parser in kube-core#
To aid users picking the most appropriate version of a kind from api discovery or through a CRD, two new sort orders have been exposed on the new kube_core::Version
Version::priorityimplementing kubernetes version priorityVersion::generationimplementing a more traditional; generational sort (highest version)
Changes#
Merged PRs from github release.
Added#
- Add
DeleteParamsconstructors for easily settingPropagationPolicyby @kate-goldenring in https://github.com/kube-rs/kube/pull/757 - Add Serialize to ObjecList and add field-selector and jsonpath example by @ChinYing-Li in https://github.com/kube-rs/kube/pull/760
- Implement cordon/uncordon for Node by @ChinYing-Li in https://github.com/kube-rs/kube/pull/762
- Export Version priority parser with Ord impls in kube_core by @clux in https://github.com/kube-rs/kube/pull/764
- Add Api fns for arbitrary subresources and approval subresource for CertificateSigningRequest by @ChinYing-Li in https://github.com/kube-rs/kube/pull/773
Changed#
- Add backoff handling for watcher and Controller by @clux in https://github.com/kube-rs/kube/pull/703
- Remove crate private
identity_pemfield fromConfigby @kazk in https://github.com/kube-rs/kube/pull/771 - Use SecretString in AuthInfo to avoid credential leaking by @ChinYing-Li in https://github.com/kube-rs/kube/pull/766
0.65.0 / 2021-12-10#
- BREAKING: Removed
kube::Error::OpenSslError- #716 - BREAKING: Removed
kube::Error::SslError- #704 and #716 - BREAKING: Added
kube::Error::NativeTls(kube::client::NativeTlsError)for errors from Native TLS - #716 - BREAKING: Added
kube::Error::RustlsTls(kube::client::RustlsTlsError)for errors from Rustls TLS - #704 - Modified
Kubeconfigparsing - allow empty kubeconfigs as per kubectl - #721 - Added
Kubeconfig::from_yaml- #718 via #719 - Updated
rustlsto 0.20.1 - #704 - BREAKING: Added
ObjectRefto the object that failed to be reconciled tokube::runtime::controller::Error::ReconcileFailed- #733 - BREAKING: Removed
api_versionandkindfields fromkindstructs generated bykube::CustomResource- #739 - Updated
tokio-tungsteniteto 0.16 - #750 - Updated
tower-httpto 0.2.0 - #748 - BREAKING:
kube-client: replaceRefreshTokenLayerwithAsyncFilterLayerinAuthLayer- #752
0.64.0 / 2021-11-16#
- BREAKING: Replaced feature
kube-derive/schemawith attribute#[kube(schema)]- #690 - If you currently disable default
kube-derivedefault features to avoid automatic schema generation, add#[kube(schema = "disabled")]to your spec struct instead - BREAKING: Moved
CustomResourcederive crate overrides into subattribute#[kube(crates(...))]- #690 - Replace
#[kube(kube_core = .., k8s_openapi = .., schema = .., serde = .., serde_json = ..)]with#[kube(crates(kube_core = .., k8s_openapi = .., schema = .., serde = .., serde_json = ..))] - Added
openssl-tlsfeature to useopensslfor TLS on all platforms. Note that, even thoughnative-tlsuses a platform specific TLS,kuberequiresopensslon all platforms becausenative-tlsonly allows PKCS12 input to load certificates and private key at the moment, and creating PKCS12 requiresopenssl. - #700 - BREAKING: Changed to fail loading configurations with PEM-encoded certificates containing invalid sections instead of ignoring them. Updated
pemto 1.0.1. - #702 oauth: Updatedtame-oauthto 0.6.0 which supports the same default credentials flow as the Gooauth2for Google OAuth. In addition to reading the service account information from JSON file specified withGOOGLE_APPLICATION_CREDENTIALSenvironment variable, Application Default Credentials fromgcloud, and obtaining OAuth tokens from local metadata server when running inside GCP are now supported. - #701
Refining Errors#
We started working on improving error ergonomics. See the tracking issue #688 for more details.
The following is the summary of changes to kube::Error included in this release:
- Added
Error::Auth(kube::client::AuthError)(errors related to client auth, some of them were previously inError::Kubeconfig) - Added
Error::BuildRequest(kube::core::request::Error)(errors building request fromkube::core) - Added
Error::InferConfig(kube::config::InferConfigError)(forClient::try_default) - Added
Error::OpensslTls(kube::client::OpensslTlsError)(newopenssl-tlsfeature) - #700 - Added
Error::UpgradeConnection(kube::client::UpgradeConnectinError)(wsfeature, errors from upgrading a connection) - Removed
Error::Connection(was unused) - Removed
Error::RequestBuild(was unused) - Removed
Error::RequestSend(was unused) - Removed
Error::RequestParse(was unused) - Removed
Error::InvalidUri(replaced by variants of errors inkube::configerrors) - Removed
Error::RequestValidation(replaced by a variant ofError::BuildRequest) - Removed
Error::Kubeconfig(replaced byError::InferConfig, andError::Auth) - Removed
Error::ProtocolSwitch(wsonly, replaced byError::UpgradeConnection) - Removed
Error::MissingUpgradeWebSocketHeader(wsonly, replaced byError::UpgradeConnection) - Removed
Error::MissingConnectionUpgradeHeader(wsonly, replaced byError::UpgradeConnection) - Removed
Error::SecWebSocketAcceptKeyMismatch(wsonly, replaced byError::UpgradeConnection) - Removed
Error::SecWebSocketProtocolMismatch(wsonly, replaced byError::UpgradeConnection) - Removed
impl From<T> for Error
Expand for more details
The following breaking changes were made as a part of an effort to refine errors (the list is large, but most of them are lower level, and shouldn't require much change in most cases): * Removed `impl From0.63.2 / 2021-10-28#
kube::runtime::events: fix build and hide module on kubernetes < 1.19 (events/v1 missing there) - #685
0.63.1 / 2021-10-26#
kube::runtime::wait::Conditionadded boolean combinators (not/and/or) - #678kube: fix docs.rs build - #681 via #682
0.63.0 / 2021-10-26#
- rust
editionbumped to2021- #664, #666, #667 kube::CustomResourcederive can now take arbitrary#[kube(k8s_openapi)]style-paths fork8s_openapi,schemars,serde, andserde_json- #675kube: fixnative-tlsincluded when onlyrustls-tlsfeature is selected - #673 via #674
0.62.0 / 2021-10-22#
kubenow re-exportskube-runtimeunderruntimefeature - #651 via #652- no need to keep both
kubeandkube_runtimeinCargo.tomlanymore - fixes issues with dependabot / lock-step upgrading
- change
kube_runtime::Ximport paths tokube::runtime::Xwhen moving to the feature kube::runtimeaddedeventsmodule with an eventRecorder- #249 via #653 + #662 + #663kube::runtime::wait::conditionsaddedis_crd_establishedhelper - #659kube::CustomResourcederive can now take an arbitrary#[kube(kube_core)]path forkube::core- #658kube::coreconsistently re-exported across crates- docs: major overhaul + architecture.md - #416 via #652
0.61.0 / 2021-10-09#
kube-core: BREAKING: extendCustomResourceExttrait with::shortnamesmethod (impl inkube-derive) - #641kube-runtime: addwaitmodule toawait_condition, and addedwatch_objectto watcher - #632 via #633kube: addRestartmarker trait to allowApi::restarton core workloads - #630 via #635- bump dependencies:
tokio-tungstenite,k8s-openapi,schemars,tokioin particular - #643 + #645
0.60.0 / 2021-09-02#
kube: supportk8s-openapiwithv1_22features - #621 via #622kube:BREAKING: support forCustomResourceDefinitionatv1beta1now requires an opt-indeprecated-crd-v1beta1feature - #622kube-core: add content-type header to requests with body - #626 via #627
0.59.0 / 2021-08-09#
BREAKING: bumpedk8s-openapito 0.13.0 - #581 via #616kubeconnects to kubernetes via cluster dns when usingrustls- #587 via #597- client now works with
rustlsfeature in-cluster - #153 via #597 kubenicer serialization ofKubeconfig- #613kube-coreadded serde traits forApiResource- #590kube-coreaddedCrdExtensions::crd_namemethod (implemented bykube-derive) - #583kube-coreadded theHasSpecandHasStatustraits - #605kube-deriveadded support to automatically implement theHasSpecandHasStatustraits - #605kube-runtimefix tracing span hierarchy from applier - #600
0.58.1 / 2021-07-06#
kube-runtime: fix non-unix builds - #582
0.58.0 / 2021-07-05#
kube:BREAKING: subresource marker traits renamed conjugation:Log,Execute,Attach,Evict(previouslyLogging,Executable,Attachable,Evictable) - #536 via #560kube-deriveadded#[kube(category)]attr to set CRD categories - #559kube-runtimeaddedfinalizerhelper #291 via #475kube-runtimeadded tracing for why reconciliations happened #457 via #571kube-runtimeaddedController::reconcile_all_onto allow scheduling all objects for reconciliation #551 via #555kube-runtimeaddedController::graceful_shutdown_onfor shutting down theControllerwhile waiting for running reconciliations to finish - #552 via #573- BREAKING:
controller::appliernow starts a graceful shutdown when thequeueterminates - BREAKING:
schedulernow shuts down immediately whenrequeststerminates, rather than waiting for the pending reconciliations to drain kube-runtimeadded tracking for reconciliation reason- Added:
Controller::owns_withandController::watches_withto pass adyntypeargument for dynamicApis - #575 - BREAKING:
Controller::ownssignature changed to not allowDynamicTypes - BREAKING:
controller::trigger_*now returns aReconcileRequestrather thanObjectRef. TheObjectRefcan be accessed via theobj_reffield
Known Issues#
- Api::replace can fail to unset list values with k8s-openapi 0.12 #581
0.57.0 / 2021-06-16#
kube: custom clients now respect default namespaces - fixes #534 via #544- BREAKING: custom clients via
Client::newmust passconfig.default_namespaceas 2nd arg kube: AddedCustomResourceExttrait forkube-derive- #497 via #545- BREAKING:
kube-deriveusers must importkube::CustomResourceExt(orkube::core::crd::v1beta1::CustomResourceExtif using legacy#[kube(apiextensions = "v1beta1")]) to use generated methodsFoo::crdorFoo::api_resource - BREAKING:
k8s_openapibumped to 0.12.0 - #531- Generated structs simplified +
Resourcetrait expanded - Adds support for kubernetes
v1_21 - Contains bugfix for kubernetes#102159
- Generated structs simplified +
kuberesource plurals is no longer inferred fromk8s-openapistructs - #284 via #556- BREAKING:
kube::Resourcetrait now requires apluralimplementation
Known Issues#
- Api::replace can fail to unset list values with k8s-openapi 0.12 #581
0.56.0 / 2021-06-05#
kube: addedApi::default_namespaced- #209 via #534kube: addedconfigfeature - #533 via #535kube: BREAKING: movedclient::discoverymodule tokube::discoveryand rewritten module #538discovery: addedoneshothelpers for quick selection of recommended resources / kinds #538discovery: movedApiResourceandApiCapabilities(result of discovery) tokube_core::discovery-
BREAKING: removed internal
ApiResource::from_apiresource -
kube::Clientis now configurable with layers usingtower-http#539 via #540 - three new examples added:
custom_client,custom_client_tlsandcustom_client_trace - Big feature streamlining, big service and layer restructuring, dependency restructurings
- Changes can hit advanced users, but unlikely to hit base use cases with
ApiandClient. - In depth changes broken down below:
TLS Enhancements#
- Add
kube::client::ConfigExtextendingConfigfor customClient. This includes methods to configure TLS connection when building a custom client #539 native-tls:Config::native_tls_https_connectorandConfig::native_tls_connectorrustls-tls:Config::rustls_https_connectorandConfig::rustls_client_config- Remove the requirement of having
native-tlsorrustls-tlsenabled whenclientis enabled. Allow one, both or none. - When both, the default Service will use
native-tlsbecause of #153.rustlscan be still used with a custom client. Users will have an option to configure TLS at runtime. - When none, HTTP connector is used.
- Remove TLS features from
kube-runtime - BREAKING: Features must be removed if specified
- Remove
clientfeature fromnative-tlsandrust-tlsfeatures config+native-tls/rustls-tlscan be used independently, e.g., to create a simple HTTP client- BREAKING:
clientfeature must be added ifdefault-features = false
Layers#
ConfigExt::base_uri_layer(BaseUriLayer) to set cluster URL (#539)ConfigExt::auth_layerthat returns optional layer to manageAuthorizationheader (#539)gzip: Replaced custom decompression module withDecompressionLayerfromtower-http(#539)- Replaced custom
LogRequestwithTraceLayerfromtower-http(#539) - Request body is no longer shown
- Basic and Bearer authentication using
AddAuthorizationLayer(borrowing from https://github.com/tower-rs/tower-http/pull/95 until released) - BREAKING: Remove
headersfromConfig. Injecting arbitrary headers is now done with a layer on a custom client.
Dependency Changes#
- Remove
static_assertionssince it's no longer used - Replace
tokio_rustlswithrustlsandwebpkisince we're not usingtokio_rustlsdirectly - Replace uses of
rustls::internal::pemfilewithrustls-pemfile - Remove
urland always usehttp::Uri - BREAKING:
Config::cluster_urlis nowhttp::Uri - BREAKING:
Error::InternalUrlError(url::ParseError)andError::MalformedUrl(url::ParseError)replaced byError::InvalidUri(http::uri::InvalidUri)
0.55.0 / 2021-05-21#
kube:clientfeature added (default-enabled) - #528kube:PatchParamsforce now only works withPatch::Apply#528kube:apidiscoverymodule now uses a newApiResourcestruct #495 + #482kube:apiBREAKING:DynamicObject+Objectnow takes anApiResourcerather than aGroupVersionKindkube:apiBREAKING:discoverymodule'sGrouprenamed toApiGroupkube:clientBREAKING:kube::client::Statusmoved tokube::core::Status(accidental, re-adding in 0.56)kube-corecrate factored out ofkubeto reduce dependencies - #516 via #517 + #519 + #522 + #528 + #530kube:kube::Serviceremoved to allowkube::Clientto take an abritraryService<http::Request<hyper::Body>>- #532
0.54.0 / 2021-05-19#
- yanked 30 minutes after release due to #525
- changes lifted to 0.55.0
0.53.0 / 2021-05-15#
kube:admissioncontroller module added under feature - #477 via #484 + fixes in #488 #498 #499 + #507 + #509kube:configparsing of pem blobs now resilient against missing newlines - #504 via #505kube:discoverymodule added to simplify dynamic api usage - #491kube:apiBREAKING:DynamicObject::namespacerenamed to::within- #502kube:apiBREAKING: addedResourceExttrait moving the getters fromResourcetrait - #486kube:apiadded a generic interface for subresources viaRequest- #487kube:apifix bug inPatchParams::dry_runnot being serialized correctly - #511
0.53.0 Migration Guide#
The most likely issue you'll run into is from kube when using Resource trait which has been split:
+use kube::api::ResouceExt;
- let name = Resource::name(&foo);
- let ns = Resource::namespace(&foo).expect("foo is namespaced");
+ let name = ResourceExt::name(&foo);
+ let ns = ResourceExt::namespace(&foo).expect("foo is namespaced");
0.52.0 / 2021-03-31#
kube-derive: allow overriding#[kube(plural)]and#[kube(singular)]- #458 via #463kube: added tracing instrumentation for io operations inkube::Api- #455kube:DeleteParams'sPreconditionsis now public - #459 via #460kube: remove dependency on duplicatederive_accept_keyforws- #452kube: Properly verify websocket keys inwshandshake - #447kube: BREAKING: removed optional, and deprecatedruntimemodule - #454kube: BREAKING:ListParamsbookmarks default enabled - #226 via #445- renames member
::allow_bookmarksto::bookmarks ::default()setsbookmarktotrueto avoid bad bad defaults #219- method
::allow_bookmarks()replaced by::disable_bookmarks() kube:DynamicObjectandGroupVersionKindintroduced for full dynamic object supportkube-runtime: watchers/reflectors/controllers can be used with dynamic objects from api discoverykube: Pluralisation now only happens fork8s_openapiobjects by default #481- inflector dependency removed #471
- added internal pluralisation helper for
k8s_openapiobjects kube: BREAKING: Restructuring of low levelResourcerequest builder #474Resourcerenamed toRequestand requires only apath_urlto constructkube: BREAKING: Mostly internalMetatrait revamped to support dynamic typesMetarenamed tokube::Resourceto mimick8s_openapi::Resource#478- The trait now takes an optional associated type for runtime type info:
DynamicType#385 Api::all_with+Api::namespaced_withadded for querying with dynamic families- see
dynamic_watcher+dynamic_apifor example usage kube-runtime: BREAKING: lower level interface changes as a result ofkube::api::Metatrait:- THESE SHOULD NOT AFFECT YOU UNLESS YOU ARE IMPLEMENTING / CUSTOMISING LOW LEVEL TYPES DIRECTLY
ObjectRefnow generic overkube::Resourcerather thanRuntimeResourcereflector::{Writer, Store}takes akube::Resourcerather than ak8s_openapi::Resourcekube-derive: BREAKING: Generated type no longer generatesk8s-openapitraits- This allows correct pluralisation via
#[kube(plural = "mycustomplurals")]#467 via #481
0.52.0 Migration Guide#
While we had a few breaking changes. Most are to low level internal interfaces and should not change much, but some changes you might need to make:
kube#
- if using the old, low-level
kube::api::Resource, please consider the easierkube::Api, or look at tests inrequest.rsortyped.rsif you need the low level interface - search replace
kube::api::Metawithkube::Resourceif used - trait was renamed - if implementing the trait, add
type DynamicType = ();to the impl - remove calls to
ListParams::allow_bookmarks(allow default) - handle
WatchEvent::Bookmarkor setListParams::disable_bookmarks() - look at examples if replacing the long deprecated legacy runtime
kube-derive#
The following constants from k8s_openapi::Resource no longer exist. Please use kube::Resource and:
- replace Foo::KIND with Foo::kind(&())
- replace Foo::GROUP with Foo::group(&())
- replace Foo::VERSION with Foo::version(&())
- replace Foo::API_VERSION with Foo::api_version(&())
0.51.0 / 2021-02-28#
kubeConfignow allows arbirary extension objects - #425kubeConfignow allows multiple yaml documents per kubeconfig - #440 via #441kube-derivenow more robust and is usingdarling- #435- docs improvements to patch + runtime
0.50.1 / 2021-02-17#
0.50.0 / 2021-02-10#
- feat: added support for stacked kubeconfigs - #132 via #411
- refactor: authentication logic moved out of
kube::configand into intokube::service- #409 - BREAKING:
Config::get_auth_headerremoved - refactor: remove
hyperdependency fromkube::api- #410 - refactor:
kube::Servicesimpler auth and gzip handling - #405 + #408
0.49.0 / 2021-02-08#
- dependency on
reqwest+ removed in favour ofhyper+tower#394 - refactor:
kube::Clientnow useskube::Service(atower::Service<http::Request<hyper::Body>>) instead ofreqwest::Clientto handle all requests - refactor:
kube::Clientnow uses atokio_util::codecfor internal buffering - refactor:
async-tungstenitews feature dependency replaced withtokio-tungstenite.WebSocketStreamis now created from a connection upgraded withhyper - refactor:
oauth2module for GCP OAuth replaced with optionaltame-oauthdependency - BREAKING: GCP OAuth is now opt-in (
oauthfeature). Note that GCP provider with command based token source is supported by default. - BREAKING: Gzip decompression is now opt-in (
gzipfeature) because Kubernetes does not have compression enabled by default yet and this feature requires extra dependencies. #399 - BREAKING:
Client::newnow takes aServiceinstead ofConfig#400. Allows custom service for features not supported out of the box and testing. To create aClientfromConfig, useClient::try_frominstead. - BREAKING: Removed
Config::proxy. Proxy is no longer supported out of the box, but it should be possible by using a custom Service. - fix: Refreshable token from auth provider not refreshing
- fix: Panic when loading config with non-GCP provider #238
- feat: subresource support added for
Evictabletypes (marked forPod) - #393 kube: subresource marker traits renamed toLoggable,Executable,Attachable(previouslyLoggingObject,ExecutingObject,AttachableObject) - #395examplesshowcasingkubectl cplike behaviour #381 via #392
0.48.0 / 2021-01-23#
- bump
k8s-openapito0.11.0- #388 - breaking:
kube: no longer necessary to serialize patches yourself - #386PatchParamsremovesPatchStrategyApi::patch*methods now take an enumPatchtype- optional
jsonpatchfeature added forPatch::Json
0.47.0 / 2021-01-06#
- chore: upgrade
tokioto1.0- #363- BREAKING: This requires the whole application to upgrade to
tokio1.0 andreqwestto 0.11.0
- BREAKING: This requires the whole application to upgrade to
- docs: fix broken documentation in
kube0.46.0 #367 - bug:
kube: removed panics fromwsfeatures, fixrustlssupport + improve docs #369 via #370 + #373 - bug:
AttachParamsnow fixes owned method chaining (slightly breaks from 0.46 if using &mut ref before) - #364 - feat:
AttachParams::interactive_ttyconvenience method added - #364 - bug: fix
Runner(and thusControllerandapplier) not waking correctly when starting new tasks - #375
0.46.1 / 2021-01-06#
- maintenance release for 0.46 (last supported tokio 0.2 release) from
tokio02branch - bug backport: fix
Runner(and thusControllerandapplier) not waking correctly when starting new tasks - #375
0.46.0 / 2021-01-02#
- feat:
kubenow has optional websocket support withasync_tungsteniteunderwsandws-*-tlsfeatures #360 - feat:
AttachableObjectmarker trait added and implemented fork8s_openapi::api::core::v1::Pod#360 - feat:
AttachParamsadded forApi::execandApi::attachforAttachableObjects #360 - examples:
pod_shell,pod_attach,pod_execdemonstrating the new features #360
0.45.0 / 2020-12-26#
- feat:
kube-derivenow has a default enabledschemafeature- allows opting out of
schemarsdependency for handwriting crds - #355
- allows opting out of
- breaking:
kube-deriveattrstruct_namerenamed tostruct- #359 - docs: improvements on
kube,kube-runtime,kube-derive
0.44.0 / 2020-12-23#
- feat:
kube-derivenow generates openapi v3 schemas and is thus usable with v1CustomResourceDefinition- #129 and #264 via #348- BREAKING:
kube-derivetypes now requireJsonSchemaderived viaschemarslibray (not breaking if going to 0.45.0)
- BREAKING:
- feat:
kube_runtime::controller: now reconciles objects in parallel - #346- BREAKING:
kube_runtime::controller::appliernow requires that thereconciler'sFutureisUnpin,
Box::pinit or submit it to a runtime if this is not acceptable - BREAKING:
kube_runtime::controller::Controllernow requires that thereconciler'sFutureisSend + 'static,
use the low-levelapplierinterface instead if this is not acceptable
- BREAKING:
- bug:
kube-runtime: removed accidentally includedk8s-openapidefault features (you have to opt in to them yourself) - feat:
kube:TypeMetanow derives additionallyDebug, Eq, PartialEq, Hash - bump:
k8s-openapito0.10.0- #330 - bump:
serde_yaml- #349 - bump:
dirstodirs-next- #340
0.43.0 / 2020-10-08#
- bug:
kube-deriveattr#[kube(shortname)]now working correctly - bug:
kube-derivenow working with badly cased existing types - #313 - missing:
kubenow correctly exportsconfig::NamedAuthInfo- #323 - feat:
kube: exposeConfig::get_auth_headerfor istio use cases - #322 - feat:
kube: local config now tackles gcloud auth exec params - #328 and #84 kube-derivenow actually requires GVK (in particular#[kube(kind = "Foo")]which we sometimes inferred earlier, despite documenting the contrary)
0.42.0 / 2020-09-10#
- bug:
kube-derive'sDefaultderive now sets typemeta correctly - #315 - feat:
ListParamsnow supportscontinue_tokenandlimit- #320
0.41.0 / 2020-09-10#
- yanked release. failed publish.
0.40.0 / 2020-08-17#
DynamicResource::from_api_resourceadded to allow apiserver returned resources - #305 via #301Client::list_api_groupsaddedClient::list_ap_group_resourcesaddedClient::list_core_api_versionsaddedClient::list_core_api_resourcesaddedkube::DynamicResourceexposed at top level- Bug:
PatchParams::default_apply()now requires a manager and renamed toPatchParams::apply(manager: &str)for #300 - Bug:
DeleteParamsno longer missing forApi::delete_collection- #53 - Removed paramter
ListParams::include_uninitializeddeprecated since 1.14 - Added optional
PostParams::field_managerwas missing forApi::createcase
0.39.0 / 2020-08-05#
- Bug:
ObjectReftweak inkube-runtimeto allow controllers triggering across cluster and namespace scopes - #293 via #294 - Feature:
kubenow has aderivefeature which will re-exportkube::CustomResourcefromkube-derive::CustomResource. - Examples: revamp examples for
kube-runtime- #201
0.38.0 / 2020-07-23#
- Marked
kube::runtimemodule as deprecated - #281 Config::timeoutcan now be overridden toNone(with caveats) #280- Bug: reflector stores could have multiple copies inside datastore - #286
dashmapbackend Store driver downgraded - #286Store::itertemporarily removed
- Bug: Specialize WatchEvent::Bookmark so they can be deserialized - #285
- Docs: Tons of docs for kube-runtime
0.37.0 / 2020-07-20#
- Bump
k8s-openapito0.9.0 - All runtime components now require
Syncobjects - reflector/watcher/Controller streams can be shared in threaded environments
0.36.0 / 2020-07-19#
- https://gitlab.com/teozkr/kube-rt/ merged in for a new
kube-runtimecrate #258 Controller<K>added (#148 via #258)Reflectorapi redesigned (#102 via #258)- Migration release for
Informer->watcher+Reflector->reflector kube::api::CustomResourceremoved in favour ofkube::api::Resource::dynamicCrBuilderremoved in favour ofDynamicResource(with new error handling)- support level bumped to beta
0.35.1 / 2020-06-18#
- Fix in-cluster Client when using having multiple certs in the chain - #251
0.35.0 / 2020-06-15#
Config::proxysupport added - #246PartialEqcan be derived withkube-derive- #242- Windows builds no longer clashes with runtime - #240
- Rancher hosts (with path specifiers) now works - #244
0.34.0 / 2020-05-08#
- Bump
k8s-openapito0.8.0 Config::from_cluster_env<- renamed fromConfig::new_from_cluster_envConfig::from_kubeconfig<- renamed fromConfig::new_from_kubeconfigConfig::from_custom_kubeconfigadded - #236- Majorly overhauled error handlind in config module - #237
0.33.0 / 2020-04-27#
0.32.1 / 2020-04-15#
- add missing tokio
signalfeature as a dependency - upgrade all dependencies, including minor bumps to rustls and base64
0.32.0 / 2020-04-10#
- Major
config+clientmodule refactor Configis the newConfigurationstructClientis now just a configuredreqwest::Clientplus areqwest::Url- implement
From<Config> for reqwest::ClientBuilder - implement
TryFrom<Config> for Client Client::try_defaultorClient::newnow recommended constructors- People parsing
~/.kube/configmust use theKubeConfigstruct instead Reflector<K>now only takes anApi<K>to construct (.params method)Informer<K>now only takes anApi<K>to construct (.params method)Informer::init_from->Informer::set_versionReflectornow self-polls #151 + handles signals #152Reflector::pollmade private in favour ofReflector::runApi::watchno longer filters out error events (next->try_next)Api::watchreturnsResult<WatchEvent>rather thanWatchEventWatchEvent::Bookmarkadded to enumListParams::allow_bookmarksaddedPatchParams::default_applyctor addedPatchParamsbuilder mutators:::forceand::dry_runadded
0.31.0 / 2020-03-27#
- Expose
config::Configurationat root level - Add
Configuration::inferas a recommended constructor - Rename
client::APIClienttoclient::Client - Expose
client::Clientat root level Clientnow implementsFrom<Configuration>- Added comprehensive documentation on
Api - Rename
config::KubeConfigLoader->config::ConfigLoader - removed
futures-timerdependency fortokio(feature=timer)
0.30.0 / 2020-03-17#
- Fix
#[kube(printcolumn)]when#[kube(apiextensions = "v1beta1")] - Fix
#[kube(status)]causing serializes of empty optional statuses
0.29.0 / 2020-03-12#
Api::log->Api::logs(now matchesResource::logs)Object<FooSpec, FooStatus>back for ad-hoc ser/de- kube-derive now derives
Debug(requiresDebugon spec struct) - kube-derive now allows multiple derives per file
Api::createnow takes dataKrather than bytesApi::replacenow takes dataKrather than bytes- (note that
Resource::createandResource::replacestill takes bytes)
- (note that
0.28.1 / 2020-03-07#
#[derive(CustomResource)]now implements::newon the generatedKind- derived
Kindnow properly containsTypeMeta- #170
0.28.0 / 2020-03-05#
RawApiremoved ->ResourceaddedResourceimplementsk8s_openapi::Resource- ALL OBJECTS REMOVED -> Depening on light version of
k8s-openapinow- NB: should generally just mean a few import changes (+casings / unwraps)
openapifeature removed (light dependency mandatory now)- LIBRARY WORKS WITH ALL
k8s_openapiKUBERNETES OBJECTS KubeObjecttrait removed in favour ofMetatraitObject<FooSpec, FooStatus>removed -> types implementingk8s_openapi::Resourcerequired insteadkube-derivecrate added to derive this trait + other kubebuilder like codegen
0.27.0 / 2020-02-26#
Reflector+Informermoved fromkube::apitokube::runtimeInformernow resets the version to 0 rather than dropping events - #134- Removed
Informer::init, since it is now a no-op when building theInformer - Downgrade spurious log message when using service account auth
0.26.0 / 2020-02-25#
- Fix a large percentage of EOFs from watches #146
- => default timeout down to 290s from 300s
- =>
Reflectornow re-lists a lot less #146 - Fix decoder panic with async-compression (probably) #144
Informer::pollcan now be used withTryStream- Exposed
Config::readandConfig::read_from- #124 - Fix typo on
Api::StatefulSet - Fix typo on
Api::Endpoints - Add
Api::v1CustomResourceDefinitionwhen on k8s >= 1.17 - Renamed
VoidtoNotUsed
0.25.0 / 2020-02-09#
- initial rustls support #114 (some local kube config issues know #120)
- crate does better version checking against openapi features - #106
- initial
log_streamsupport - #109
0.24.0 / 2020-01-26#
- Add support for ServiceAccount, Role, ClusterRole, RoleBinding, Endpoint - #113 + #111
- Upgrade k8s-openapi to 0.7 => breaking changes: https://github.com/Arnavion/k8s-openapi/blob/master/CHANGELOG.md#v070-2020-01-23
0.23.0 / 2019-12-31#
- Bump tokio and reqwest to 0.2 and 0.10
- Fix bug in
logfetcher - #107 - Temporarily allow invalid certs when testing on macosx - #105
0.22.2 / 2019-12-04#
- Allow sharing Reflectors between threads - #97
- Fix Reflector pararall lock issue (
pollno longer blocksstate)
0.22.1 / 2019-11-30#
- Improve Reflector reset algorithm (clear history less)
0.22.0 / 2019-11-29#
- Default watch timeouts changed to 300s everywhere
- This increases efficiency of Informers and Reflectors by keeping the connection open longer.
- However, if your Reflector relies on frequent polling you can set
timeoutor hide thepoll()in a different context so it doesn't block your main work - Internal
RwLockchanged to afutures::Mutexfor soundness / proper non-blocking - #94 - blocking
Reflector::read()renamed toasync Reflector::state() - Expose
metadata.creation_timestampand.deletion_timestamp(behind openapi flag) - #93
0.21.0 / 2019-11-29#
0.20.1 / 2019-11-21#
- ObjectList now implements Iterator - #91
- openapi feature no longer accidentally hardcoded to v1.15 feature - #90
0.19.0 / 2019-11-15#
- kube::Error is now a proper error enum and not a Fail impl (thiserror)
- soft-tokio dependency removed for futures-timer
- gzip re-introduced
0.18.1 / 2019-11-11#
- Fix unpinned gzip dependency breakage - #87
0.18.0 / 2019-11-07#
- api converted to use async/await with 1.39.0 (primitively)
- hyper upgraded to 0.10-alpha
- synchronous sleep replaced with tokio timer
Logtrait removed in favour of internal marker trait
0.17.0 / 2019-10-22#
- Add support for oidc providerss with
auth-providerw/oaccess-token- #70 - Bump most dependencies to more recent versions
- Expose custom client creation
- Added support for
v1beta1Ingress - Expose incluster_config::load_default_ns - #74
0.16.1 / 2019-08-09#
- Add missing
uidfield onObjectMeta::ownerReferences
0.16.0 / 2019-08-09#
- Add
Reflector::getandReflector::get_withinas cheaper getters - Add support for OpenShift kube configs with multiple CAs - via #64
- Add missing
ObjectMeta::ownerReferences - Reduced memory consumption during compile with
k8s-openapi@0.5.1- #62
0.15.1 / 2019-08-18#
- Fix compile issue on
1.37.0withUtcserialization - Fix
Voidnot havingSerializederive
0.15.0 / 2019-08-11#
- Added support for
v1Jobresources - via #58 - Added support for
v1Namespace,v1DaemonSet,v1ReplicaSet,v1PersistentVolumeClaim,v1PersistentVolume,v1ResourceQuota,v1HorizontalPodAutoscaler- via #59 - Added support for
v1beta1CronJob,v1ReplicationController,v1VolumeAttachment,v1NetworkPolicy- via #60 k8s-openapioptional dependency bumped to0.5.0(for kube 1.14 structs)
0.14.0 / 2019-08-03#
Reflector::readnow returns aVec<K>`` rather than aVec<(name, K)>`:
This fixes an unsoundness bug internally - #56 via @gnieto
0.13.0 / 2019-07-22#
- Experimental oauth2 support for some providers - via #44 :
- a big cherry-pick from various prs upstream originally for GCP
- EKS works with setup in https://github.com/kube-rs/kube/pull/20#issuecomment-511767551
0.12.0 / 2019-07-18#
- Added support for
Logsubresource - via #50 - Added support for
v1ConfigMapwith example - via #49 - Demoted some spammy info messages from Reflector
0.11.0 / 2019-07-10#
- Added
PatchParamswithPatchStrategyto allow arbitrary patch types - #24 via @ragne Eventrenamed tov1Eventto match non-slowflake type namesv1Servicesupport added- Added
v1Secretsnowflake type and asecret_reflectorexample
0.10.0 / 2019-06-03#
Api<P, U>is nowApi<K>for someKubeObjectK:- Big change to allow snowflake objects (#35) - but also slightly nicer
- You want aliases
type Pod = Object<PodSpec, PodStatus> - This gives you the required
KubeObjecttrait impl for free
-
Added
Eventnative type to prove snowflakes can be handled - #35 -
ApiStatusrenamed toStatusto match kube api conventions #36 - Rename
MetadatatoObjectMeta#36 - Added
ListMetaforObjectListandStatus#36 - Added
TypeMetaobject which is flattened ontoObject, so:o.types.kindrather thano.kindo.types.versionrather thano.version
0.9.0 / 2019-06-02#
- Status subresource api commands added to
Api:patch_statusget_statusreplace_status
^ Seecrd_openapiorcrd_apiexamples
- Scale subresource commands added to
Api:patch_scaleget_scalereplace_scale
^ Seecrd_openapiexample
0.8.0 / 2019-05-31#
- Typed
Apivariant calledOpenApiintroduced (see crd_openapi example) - Revert
client.requestreturn type change (back to response only from pre-0.7.0 #28) deletenow returns `Eitherdelete_collectionnow returns `Either>, ApiStatus> - for bug#32 Informer::newrenamed toInformer::rawReflector::newrenamed toReflector::rawReflector::new+Informer::newadded for "openapi" compile time feature (does not require specifying the generic types)
0.7.0 / 2019-05-27#
- Expose list/watch parameters #11
- Many API struct renames:
ResourceMap->CacheResource->ObjectResourceList->ObjectListApiResource->Api
ResourceTypehas been removed in favour ofApi::v1Pod()sayObject::statusnow wrapped in anOption(not present everywhere)ObjectListexposed- Major API overhaul to support generic operations on
Object - Api can be used to perform generic actions on resources:
creategetdeletewatchlistpatchreplaceget_scale(when scale subresource exists)patch_scale(ditto)replace_scale(ditto)get_status(when status subresource exists)patch_status(ditto)replace_status(ditto)
- crd_api example added to track the action api
- Bunch of generic parameter structs exposed for common operations:
ListParamsexposedDeleteParamsexposedPostParamsexposed
- Errors from
Apiexposed inkube::Error:Error::api_error -> Option<ApiError>exposed- Various other error types also in there (but awkward setup atm)
client.requestnow returns a tuple(T, StatusCode)(before onlyT)
0.6.0 / 2019-05-12#
- Expose getter
Informer::version - Exose ctor
Informer::from_version - Expose more attributes in
Metadata Informer::resetconvenience method addedInformer::pollno longer returns events straight- an
Informernow cachesWatchEventelements into an internal queue Informer::poppops a single element from its internal queueReflector::refreshrenamed toReflector::reset(matchesInformer)Voidtype added so we can useReflector<ActualSpec, Void>- removes need for Spec/Status structs:
ReflectorSpec,ReflectorStatusremovedInformerSpec,InformerStatusremovedResourceSpecMap,ResourceStatusMapremoved
WatchEventsremovedWatchEventexposed, and now wraps `Resource``
0.5.0 / 2019-05-09#
- added
Informerstruct dedicated to handling events - Reflectors no longer cache
events- see #6
0.4.0 / 2019-05-09#
- ResourceMap now contains the full Resource
struct rather than a tuple as the value. => value.metadatais available in the cache. - Reflectors now also cache
eventsto allow apps to handle them
0.3.0 / 2019-05-09#
Namedtrait removed (inferring from metadata.name now)- Reflectors now take two type parameters (unless you use
ReflectorSpecorReflectorStatus) - see examples for usage - Native kube types supported via
ApiResource - Some native kube resources have easy converters to
ApiResource