Skip to content

Commit

Permalink
sync 0.96.0
Browse files Browse the repository at this point in the history
Signed-off-by: clux <[email protected]>
  • Loading branch information
clux committed Oct 9, 2024
1 parent eba16de commit 3b67c62
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
24 changes: 23 additions & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,29 @@
<!-- DO NOT touch the headers, UNRELEAS'D line, or compare url manually - they are sed'd -->
<!-- next-header -->
## Unreleased
* see https://github.com/kube-rs/kube/compare/0.95.0...main
* see https://github.com/kube-rs/kube/compare/0.96.0...main

## [0.96.0](https://github.com/kube-rs/kube/releases/tag/0.96.0) / 2024-10-09
<!-- Release notes generated using configuration in .github/release.yml at 0.96.0 -->
## Highlights
- **[Features](https://kube.rs/features/)**: `webpki-roots` added #1323, and [predicates](https://docs.rs/kube/latest/kube/runtime/utils/predicates/index.html) no longer require `unstable-runtime` #1578
- **Local auth**: improve leniency/kubectl-alignment #1595, remove http proxy vars #1520
- **Dependencies**: upgrades to `tower` and `secrecy`, and `derivative` swapped for `educe`

## 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::from` as alias for `::from_obj` by @nightkr in https://github.com/kube-rs/kube/pull/1598
### Changed
* Bump `secrecy` to 0.10 by @clux in https://github.com/kube-rs/kube/pull/1588
* Upgrades `tower` to 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](https://github.com/kube-rs/kube/releases/tag/0.95.0) / 2024-09-16
<!-- Release notes generated using configuration in .github/release.yml at 0.95.0 -->
Expand Down
9 changes: 5 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Select a version of `kube` along with the generated [k8s-openapi](https://github

```toml
[dependencies]
kube = { version = "0.95.0", features = ["runtime", "derive"] }
kube = { version = "0.96.0", features = ["runtime", "derive"] }
k8s-openapi = { version = "0.23.0", features = ["latest"] }
```

Expand All @@ -33,7 +33,7 @@ For real world projects see [ADOPTERS](https://kube.rs/adopters/).

## Api

The [`Api`](https://docs.rs/kube/*/kube/struct.Api.html) is what interacts with Kubernetes resources, and is generic over [`Resource`](https://docs.rs/kube/*/kube/trait.Resource.html):
The [`Api`](https://docs.rs/kube/latest/kube/struct.Api.html) is what interacts with Kubernetes resources, and is generic over [`Resource`](https://docs.rs/kube/latest/kube/trait.Resource.html):

```rust
use k8s_openapi::api::core::v1::Pod;
Expand Down Expand Up @@ -92,7 +92,7 @@ A streaming interface (similar to informers) that presents [`watcher::Event`](ht

```rust
let api = Api::<Pod>::default_namespaced(client);
let stream = watcher(api, Config::default()).applied_objects();
let stream = watcher(api, Config::default()).default_backoff().applied_objects();
```

This now gives a continual stream of events and you do not need to care about the watch having to restart, or connections dropping.
Expand All @@ -103,6 +103,7 @@ while let Some(event) = stream.try_next().await? {
}
```


Note the base items from a `watcher` stream are an abstraction above the native `WatchEvent` to allow for store buffering. If you are following along to "see what changed", you can use utilities from [`WatchStreamExt`](https://docs.rs/kube/latest/kube/runtime/trait.WatchStreamExt.html), such as `applied_objects` to get a more conventional stream.

## Reflectors
Expand Down Expand Up @@ -145,7 +146,7 @@ By default [rustls](https://github.com/rustls/rustls) is used for TLS, but `open

```toml
[dependencies]
kube = { version = "0.95.0", default-features = false, features = ["client", "openssl-tls"] }
kube = { version = "0.96.0", default-features = false, features = ["client", "openssl-tls"] }
k8s-openapi = { version = "0.23.0", features = ["latest"] }
```

Expand Down

0 comments on commit 3b67c62

Please sign in to comment.