Skip to content

Commit

Permalink
chore: Merge branch 'main' into feat/derive-typed-scale-arg
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Jan 23, 2025
2 parents d93d708 + 6a980c6 commit a5dfa97
Show file tree
Hide file tree
Showing 29 changed files with 1,193 additions and 188 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/rust:1.77.2-bullseye
FROM docker.io/rust:1.81.0-bullseye

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ jobs:
fail-fast: false
matrix:
# Run these tests against older clusters as well
k8s: [v1.26, v1.30]
k8s:
- "v1.28" # MK8SV
- "latest"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -184,10 +186,6 @@ jobs:
echo "mk8sv not set correctly in tests"
exit 1
fi
if ! grep "${{ steps.mk8sv.outputs.mk8svdash }}" e2e/Cargo.toml | grep mk8sv; then
echo "mk8sv not set correctly in e2e features"
exit 1
fi
- uses: dtolnay/rust-toolchain@stable
# Smart caching for Rust projects.
Expand All @@ -198,7 +196,7 @@ jobs:

- uses: nolar/setup-k3d-k3s@v1
with:
version: v1.26
version: "v1.28" # MK8SV
# k3d-kube
k3d-name: kube
# Used to avoid rate limits when fetching the releases from k3s repo.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
tool: [email protected]
- uses: nolar/setup-k3d-k3s@v1
with:
version: v1.26
version: "v1.28" # MK8SV
# k3d-kube
k3d-name: kube
# Used to avoid rate limits when fetching the releases from k3s repo.
Expand Down
44 changes: 35 additions & 9 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,33 @@
<!-- next-header -->
UNRELEASED
===================
* see https://github.com/kube-rs/kube/compare/0.97.0...main
* see https://github.com/kube-rs/kube/compare/0.98.0...main

[0.98.0](https://github.com/kube-rs/kube/releases/tag/0.98.0) / 2024-12-23
===================
<!-- Release notes generated using configuration in .github/release.yml at 0.98.0 -->

## Highlights

- [Kubernetes `v1_32`](https://kubernetes.io/blog/2024/12/11/kubernetes-v1-32-release/) support via `k8s-openapi` [0.24](https://github.com/Arnavion/k8s-openapi/releases/tag/v0.24.0)
* Please [upgrade k8s-openapi along with kube](https://kube.rs/upgrading/) to avoid conflicts.
* New minimum versions: [MSRV](https://kube.rs/rust-version/) 1.81.0, [MK8SV](https://kube.rs/kubernetes-version/): 1.28
- `kube-derive` additions:
* A [`CELSchema`](https://docs.rs/kube/latest/kube/derive.CELSchema.html) derive macro wrapper around [`JsonSchema`](https://docs.rs/schemars/latest/schemars/trait.JsonSchema.html) for injecting [cel validations](https://kubernetes.io/docs/reference/using-api/cel/) into the schema [#1649](https://github.com/kube-rs/kube/pull/1649)
* Allow overriding `served` and `storage` booleans for [multiple versions](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#specify-multiple-versions) of [`CustomResource`](https://docs.rs/kube/latest/kube/derive.CustomResource.html) derives: [#1644](https://github.com/kube-rs/kube/pull/1644)
- `kube-runtime` event [`Recorder`](https://docs.rs/kube/latest/kube/runtime/events/struct.Recorder.html) now aggregates repeat events [#1655](https://github.com/kube-rs/kube/pull/1655) (some breaking changes, see [controller-rs#116](https://github.com/kube-rs/controller-rs/pull/116))
- `kube-client` UTF-16 edge case handling for windows [#1654](https://github.com/kube-rs/kube/pull/1654)

## What's Changed
### Added
* Add `storage` and `served` argument 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 `runtime` event recorder by @pando85 in https://github.com/kube-rs/kube/pull/1655
* Bump `k8s-openapi` for Kubernetes `v1_32` support 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](https://github.com/kube-rs/kube/releases/tag/0.97.0) / 2024-11-20
===================
Expand All @@ -14,22 +40,22 @@ UNRELEASED
## Highlights

- [`CustomResource`](https://docs.rs/kube/latest/kube/derive.CustomResource.html) derive added features for crd yaml output:
* selectable fields #1605 + #1610
* annotations and labels #1631
* selectable fields [#1605](https://github.com/kube-rs/kube/issues/1605) + [#1610](https://github.com/kube-rs/kube/issues/1610)
* annotations and labels [#1631](https://github.com/kube-rs/kube/issues/1631)
- Configuration edge cases:
* Avoid double installations of `aws-lc-rs` (rustls crypto) provider #1617
* Kubeconfig fix for `null` user; #1608
* Default runtime watcher backoff alignment with `client-go` #1603
* Avoid double installations of `aws-lc-rs` (rustls crypto) provider [#1617](https://github.com/kube-rs/kube/issues/1617)
* Kubeconfig fix for `null` user; [#1608](https://github.com/kube-rs/kube/issues/1608)
* Default runtime watcher backoff alignment with `client-go` [#1603](https://github.com/kube-rs/kube/issues/1603)
- Feature use:
* Client proxy feature-set misuse prevention #1626
* Allow disabling `gzip` via `Config` #1627
* Client proxy feature-set misuse prevention [#1626](https://github.com/kube-rs/kube/issues/1626)
* Allow disabling `gzip` via `Config` [#1627](https://github.com/kube-rs/kube/issues/1627)
- Depedency minors: `thiserror`, `hashbrown`, `jsonptr`, `json-patch`. Killed `lazy_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
* Feature: Add config setting to disable gzip compression [#1627](https://github.com/kube-rs/kube/issues/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
Expand Down
16 changes: 9 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members = [
]

[workspace.package]
version = "0.97.0"
version = "0.98.0"
authors = [
"clux <[email protected]>",
"Natalie Klestrup Röijezon <[email protected]>",
Expand All @@ -24,7 +24,7 @@ repository = "https://github.com/kube-rs/kube"
readme = "README.md"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.81.0"

[workspace.lints.rust]
unsafe_code = "forbid"
Expand All @@ -48,19 +48,20 @@ form_urlencoded = "1.2.0"
futures = { version = "0.3.17", default-features = false }
hashbrown = "0.15.0"
home = "0.5.4"
hostname = "0.4"
http = "1.1.0"
http-body = "1.0.1"
http-body-util = "0.1.2"
hyper = "1.2.0"
hyper-util = "0.1.9"
hyper-openssl = "0.10.2"
hyper-rustls = { version = "0.27.1", default-features = false }
hyper-socks2 = { version = "0.9.0", default-features = false }
hyper-timeout = "0.5.1"
hyper-util = "0.1.9"
json-patch = "3"
jsonptr = "0.6"
jsonpath-rust = "0.7.3"
k8s-openapi = { version = "0.23.0", default-features = false }
jsonptr = "0.6"
k8s-openapi = { version = "0.24.0", default-features = false }
openssl = "0.10.36"
parking_lot = "0.12.0"
pem = "3.0.1"
Expand All @@ -74,19 +75,20 @@ schemars = "0.8.6"
secrecy = "0.10.2"
serde = "1.0.130"
serde_json = "1.0.68"
serde-value = "0.7.0"
serde_yaml = "0.9.19"
serde-value = "0.7.0"
syn = "2.0.38"
tame-oauth = "0.10.0"
tempfile = "3.1.0"
thiserror = "2.0.3"
tokio = "1.14.0"
tokio-test = "0.4.0"
tokio-tungstenite = "0.24.0"
tokio-tungstenite = "0.26.1"
tokio-util = "0.7.0"
tower = "0.5.1"
tower-http = "0.6.1"
tower-test = "0.4.0"
tracing = "0.1.36"
tracing-subscriber = "0.3.17"
trybuild = "1.0.48"
prettyplease = "0.2.25"
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# kube-rs

[![Crates.io](https://img.shields.io/crates/v/kube.svg)](https://crates.io/crates/kube)
[![Rust 1.77](https://img.shields.io/badge/MSRV-1.77-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/1.77.2)
[![Tested against Kubernetes v1_26 and above](https://img.shields.io/badge/MK8SV-v1_26-326ce5.svg)](https://kube.rs/kubernetes-version)
[![Rust 1.81](https://img.shields.io/badge/MSRV-1.81-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/1.81.0)
[![Tested against Kubernetes v1.28 and above](https://img.shields.io/badge/MK8SV-v1.28-326ce5.svg)](https://kube.rs/kubernetes-version)
[![Best Practices](https://bestpractices.coreinfrastructure.org/projects/5413/badge)](https://bestpractices.coreinfrastructure.org/projects/5413)
[![Discord chat](https://img.shields.io/discord/500028886025895936.svg?logo=discord&style=plastic)](https://discord.gg/tokio)

Expand All @@ -16,8 +16,8 @@ Select a version of `kube` along with the generated [k8s-openapi](https://github

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

See [features](https://kube.rs/features/) for a quick overview of default-enabled / opt-in functionality.
Expand Down Expand Up @@ -156,8 +156,8 @@ By default [rustls](https://github.com/rustls/rustls) is used for TLS, but `open

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

This will pull in `openssl` and `hyper-openssl`. If `default-features` is left enabled, you will pull in two TLS stacks, and the default will remain as `rustls`.
Expand Down
4 changes: 2 additions & 2 deletions e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ path = "boot.rs"

[features]
latest = ["k8s-openapi/latest"]
mk8sv = ["k8s-openapi/v1_26"]
mk8sv = ["k8s-openapi/earliest"]
rustls = ["kube/rustls-tls"]
openssl = ["kube/openssl-tls"]

[dependencies]
anyhow.workspace = true
tracing.workspace = true
tracing-subscriber.workspace = true
kube = { path = "../kube", version = "^0.97.0", default-features = false, features = ["client", "runtime", "ws", "admission", "gzip"] }
kube = { path = "../kube", version = "^0.98.0", default-features = false, features = ["client", "runtime", "ws", "admission", "gzip"] }
k8s-openapi.workspace = true
serde_json.workspace = true
tokio = { workspace = true, features = ["full"] }
6 changes: 3 additions & 3 deletions examples/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ latest = ["k8s-openapi/latest"]
[dev-dependencies]
tokio-util.workspace = true
assert-json-diff.workspace = true
garde = { version = "0.20.0", default-features = false, features = ["derive"] }
garde = { version = "0.21.0", default-features = false, features = ["derive"] }
anyhow.workspace = true
futures = { workspace = true, features = ["async-await"] }
jsonpath-rust.workspace = true
jsonptr.workspace = true
kube = { path = "../kube", version = "^0.97.0", default-features = false, features = ["admission"] }
kube-derive = { path = "../kube-derive", version = "^0.97.0", default-features = false } # only needed to opt out of schema
kube = { path = "../kube", version = "^0.98.0", default-features = false, features = ["admission"] }
kube-derive = { path = "../kube-derive", version = "^0.98.0", default-features = false } # only needed to opt out of schema
k8s-openapi.workspace = true
serde = { workspace = true, features = ["derive"] }
serde_json.workspace = true
Expand Down
Loading

0 comments on commit a5dfa97

Please sign in to comment.