Skip to content

Commit 8dcd5c0

Browse files
authored
Bump k8s-openapi to 0.15 for kubernetes v1_24 and bump MSRV to 1.60 (#916)
* Bump k8s-openapi to 0.15 Signed-off-by: clux <[email protected]> * just bump-k8s to v1_24 Signed-off-by: clux <[email protected]> * better msrv automation Signed-off-by: clux <[email protected]> * bump msrv to 1.60 First bump since #746 Signed-off-by: clux <[email protected]>
1 parent 56b173f commit 8dcd5c0

File tree

12 files changed

+53
-60
lines changed

12 files changed

+53
-60
lines changed

.devcontainer/Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker.io/rust:1.56.0-bullseye
1+
FROM docker.io/rust:1.60.0-bullseye
22

33
ENV DEBIAN_FRONTEND=noninteractive
44
RUN apt update && apt upgrade -y

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# kube-rs
22

33
[![Crates.io](https://img.shields.io/crates/v/kube.svg)](https://crates.io/crates/kube)
4-
[![Rust 1.56](https://img.shields.io/badge/MSRV-1.56-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/1.56.0)
4+
[![Rust 1.60](https://img.shields.io/badge/MSRV-1.60-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/1.60.0)
55
[![Discord chat](https://img.shields.io/discord/500028886025895936.svg?logo=discord&style=plastic)](https://discord.gg/tokio)
66
[![Client Capabilities](https://img.shields.io/badge/Kubernetes%20client-Silver-blue.svg?style=plastic&colorB=C0C0C0&colorA=306CE8)](https://github.com/kubernetes/design-proposals-archive/blob/main/api-machinery/csi-new-client-library-procedure.md#client-capabilities)
77
[![Client Support Level](https://img.shields.io/badge/kubernetes%20client-beta-green.svg?style=plastic&colorA=306CE8)](https://github.com/kubernetes/design-proposals-archive/blob/main/api-machinery/csi-new-client-library-procedure.md#client-support-level)
@@ -18,7 +18,7 @@ Select a version of `kube` along with the generated [k8s-openapi](https://github
1818
```toml
1919
[dependencies]
2020
kube = { version = "0.72.0", features = ["runtime", "derive"] }
21-
k8s-openapi = { version = "0.14.0", features = ["v1_23"] }
21+
k8s-openapi = { version = "0.15.0", features = ["v1_24"] }
2222
```
2323

2424
[Features are available](https://github.com/kube-rs/kube-rs/blob/master/kube/Cargo.toml#L18).
@@ -154,7 +154,7 @@ Kube has basic support ([with caveats](https://github.com/kube-rs/kube-rs/issues
154154
```toml
155155
[dependencies]
156156
kube = { version = "0.72.0", default-features = false, features = ["client", "rustls-tls"] }
157-
k8s-openapi = { version = "0.14.0", features = ["v1_23"] }
157+
k8s-openapi = { version = "0.15.0", features = ["v1_24"] }
158158
```
159159

160160
This will pull in `rustls` and `hyper-rustls`.

e2e/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ anyhow = "1.0.44"
1818
env_logger = "0.9.0"
1919
futures = "0.3.17"
2020
kube = { path = "../kube", version = "^0.72.0", default-features = false, features = ["client", "rustls-tls"] }
21-
k8s-openapi = { version = "0.14.0", features = ["v1_23"], default-features = false }
21+
k8s-openapi = { version = "0.15.0", features = ["v1_24"], default-features = false }
2222
log = "0.4.11"
2323
serde_json = "1.0.68"
2424
tokio = { version = "1.14.0", features = ["full"] }

examples/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ openssl-tls = ["kube/client", "kube/openssl-tls"]
2020
rustls-tls = ["kube/client", "kube/rustls-tls"]
2121
runtime = ["kube/runtime"]
2222
ws = ["kube/ws"]
23-
latest = ["k8s-openapi/v1_23"]
23+
latest = ["k8s-openapi/v1_24"]
2424

2525
[dev-dependencies]
2626
tokio-util = "0.7.0"
@@ -31,7 +31,7 @@ futures = "0.3.17"
3131
jsonpath_lib = "0.3.0"
3232
kube = { path = "../kube", version = "^0.72.0", default-features = false, features = ["admission"] }
3333
kube-derive = { path = "../kube-derive", version = "^0.72.0", default-features = false } # only needed to opt out of schema
34-
k8s-openapi = { version = "0.14.0", default-features = false }
34+
k8s-openapi = { version = "0.15.0", default-features = false }
3535
serde = { version = "1.0.130", features = ["derive"] }
3636
serde_json = "1.0.68"
3737
serde_yaml = "0.8.21"

justfile

+22-2
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fmt:
1313
rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs)
1414

1515
doc:
16-
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_23 --open
16+
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_24 --open
1717

1818
# Unit tests
1919
test:
@@ -72,12 +72,32 @@ k3d:
7272
--k3s-arg '--kubelet-arg=eviction-hard=imagefs.available<1%,nodefs.available<1%@agent:*' \
7373
--k3s-arg '--kubelet-arg=eviction-minimum-reclaim=imagefs.available=1%,nodefs.available=1%@agent:*'
7474

75+
# Bump the msrv of kube; "just bump-msrv 1.60.0"
76+
bump-msrv msrv:
77+
#!/usr/bin/env bash
78+
oldmsrv="$(rg "rust-version = \"(.*)\"" -r '$1' kube/Cargo.toml)"
79+
fastmod -m -d . --extensions toml "rust-version = \"$oldmsrv\"" "rust-version = \"{{msrv}}\""
80+
# sanity
81+
if [[ $(cat ./*/Cargo.toml | grep "rust-version" | uniq | wc -l) -gt 1 ]]; then
82+
echo "inconsistent rust-version keys set in various kube-crates:"
83+
rg "rust-version" ./*/Cargo.toml
84+
exit 1
85+
fi
86+
fullmsrv="{{msrv}}"
87+
shortmsrv="${fullmsrv::-2}" # badge can use a short display version
88+
badge="[![Rust ${shortmsrv}](https://img.shields.io/badge/MSRV-${shortmsrv}-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/{{msrv}})"
89+
sd "^.+badge/MSRV.+$" "${badge}" README.md
90+
sd "${oldmsrv}" "{{msrv}}" .devcontainer/Dockerfile
91+
cargo msrv
92+
93+
# Increment the Kubernetes feature version from k8s-openapi for tests; "just bump-k8s"
7594
bump-k8s:
7695
#!/usr/bin/env bash
7796
current=$(cargo tree --format "{f}" -i k8s-openapi | head -n 1)
7897
next=${current::-2}$((${current:3} + 1))
7998
fastmod -m -d . --extensions toml "$current" "$next"
80-
fastmod -m README.md "$current" "$next"
99+
fastmod -m "$current" "$next" -- README.md
100+
fastmod -m "$current" "$next" -- justfile
81101

82102
# mode: makefile
83103
# End:

kube-client/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/kube-rs/kube-rs"
1212
readme = "../README.md"
1313
keywords = ["kubernetes", "client",]
1414
categories = ["web-programming::http-client"]
15-
rust-version = "1.56"
15+
rust-version = "1.60.0"
1616
edition = "2021"
1717

1818
[features]
@@ -32,7 +32,7 @@ config = ["__non_core", "pem", "dirs"]
3232
__non_core = ["tracing", "serde_yaml", "base64"]
3333

3434
[package.metadata.docs.rs]
35-
features = ["client", "native-tls", "rustls-tls", "openssl-tls", "ws", "oauth", "jsonpatch", "admission", "k8s-openapi/v1_23"]
35+
features = ["client", "native-tls", "rustls-tls", "openssl-tls", "ws", "oauth", "jsonpatch", "admission", "k8s-openapi/v1_24"]
3636
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
3737
rustdoc-args = ["--cfg", "docsrs"]
3838

@@ -73,7 +73,7 @@ tracing = { version = "0.1.29", features = ["log"], optional = true }
7373
hyper-openssl = { version = "0.9.2", optional = true }
7474

7575
[dependencies.k8s-openapi]
76-
version = "0.14.0"
76+
version = "0.15.0"
7777
default-features = false
7878
features = []
7979

@@ -86,6 +86,6 @@ tokio-test = "0.4.0"
8686
tower-test = "0.4.0"
8787

8888
[dev-dependencies.k8s-openapi]
89-
version = "0.14.0"
89+
version = "0.15.0"
9090
default-features = false
91-
features = ["v1_23"]
91+
features = ["v1_24"]

kube-core/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ authors = [
77
88
]
99
edition = "2021"
10-
rust-version = "1.56"
10+
rust-version = "1.60.0"
1111
license = "Apache-2.0"
1212
repository = "https://github.com/kube-rs/kube-rs"
1313
readme = "../README.md"
1414

1515
[package.metadata.docs.rs]
16-
features = ["ws", "admission", "jsonpatch", "k8s-openapi/v1_23"]
16+
features = ["ws", "admission", "jsonpatch", "k8s-openapi/v1_24"]
1717
rustdoc-args = ["--cfg", "docsrs"]
1818

1919
[features]
@@ -34,14 +34,14 @@ chrono = { version = "0.4.19", default-features = false, features = ["clock"] }
3434
schemars = { version = "0.8.6", optional = true }
3535

3636
[dependencies.k8s-openapi]
37-
version = "0.14.0"
37+
version = "0.15.0"
3838
default-features = false
3939
features = []
4040

4141
[dev-dependencies.k8s-openapi]
42-
version = "0.14.0"
42+
version = "0.15.0"
4343
default-features = false
44-
features = ["v1_23"]
44+
features = ["v1_24"]
4545

4646
[dev-dependencies]
4747
assert-json-diff = "2.0.1"

kube-derive/Cargo.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ authors = [
77
88
]
99
edition = "2021"
10-
rust-version = "1.56"
10+
rust-version = "1.60.0"
1111
license = "Apache-2.0"
1212
repository = "https://github.com/kube-rs/kube-rs"
1313
readme = "../README.md"
@@ -26,7 +26,7 @@ proc-macro = true
2626
serde = { version = "1.0.130", features = ["derive"] }
2727
serde_yaml = "0.8.21"
2828
kube = { path = "../kube", default-features = false, version = "<1.0.0, >=0.61.0", features = ["derive"] }
29-
k8s-openapi = { version = "0.14.0", default-features = false, features = ["v1_23"] }
29+
k8s-openapi = { version = "0.15.0", default-features = false, features = ["v1_24"] }
3030
schemars = { version = "0.8.6", features = ["chrono"] }
3131
validator = { version = "0.15.0", features = ["derive"] }
3232
chrono = { version = "0.4.19", default-features = false }

kube-runtime/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ repository = "https://github.com/kube-rs/kube-rs"
1111
readme = "../README.md"
1212
keywords = ["kubernetes", "runtime", "reflector", "watcher", "controller"]
1313
categories = ["web-programming::http-client"]
14-
rust-version = "1.56"
14+
rust-version = "1.60.0"
1515
edition = "2021"
1616

1717
[package.metadata.docs.rs]
18-
features = ["k8s-openapi/v1_23"]
18+
features = ["k8s-openapi/v1_24"]
1919
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
2020
rustdoc-args = ["--cfg", "docsrs"]
2121

@@ -37,7 +37,7 @@ thiserror = "1.0.29"
3737
backoff = "0.4.0"
3838

3939
[dependencies.k8s-openapi]
40-
version = "0.14.0"
40+
version = "0.15.0"
4141
default-features = false
4242

4343
[dev-dependencies]
@@ -48,6 +48,6 @@ rand = "0.8.0"
4848
schemars = "0.8.6"
4949

5050
[dev-dependencies.k8s-openapi]
51-
version = "0.14.0"
51+
version = "0.15.0"
5252
default-features = false
53-
features = ["v1_23"]
53+
features = ["v1_24"]

kube/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ repository = "https://github.com/kube-rs/kube-rs"
1212
readme = "../README.md"
1313
keywords = ["kubernetes", "client", "runtime"]
1414
categories = ["web-programming::http-client"]
15-
rust-version = "1.56"
15+
rust-version = "1.60.0"
1616
edition = "2021"
1717

1818
[features]
@@ -31,7 +31,7 @@ config = ["kube-client/config"]
3131
runtime = ["kube-runtime"]
3232

3333
[package.metadata.docs.rs]
34-
features = ["client", "native-tls", "rustls-tls", "openssl-tls", "derive", "ws", "oauth", "jsonpatch", "admission", "runtime", "k8s-openapi/v1_23"]
34+
features = ["client", "native-tls", "rustls-tls", "openssl-tls", "derive", "ws", "oauth", "jsonpatch", "admission", "runtime", "k8s-openapi/v1_24"]
3535
# Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature.
3636
rustdoc-args = ["--cfg", "docsrs"]
3737

@@ -44,7 +44,7 @@ kube-runtime = { path = "../kube-runtime", version = "=0.72.0", optional = true}
4444
# Not used directly, but required by resolver 2.0 to ensure that the k8s-openapi dependency
4545
# is considered part of the "deps" graph rather than just the "dev-deps" graph
4646
[dependencies.k8s-openapi]
47-
version = "0.14.0"
47+
version = "0.15.0"
4848
default-features = false
4949

5050
[dev-dependencies]
@@ -56,6 +56,6 @@ serde = { version = "1.0.130", features = ["derive"] }
5656
schemars = "0.8.6"
5757

5858
[dev-dependencies.k8s-openapi]
59-
version = "0.14.0"
59+
version = "0.15.0"
6060
default-features = false
61-
features = ["v1_23"]
61+
features = ["v1_24"]

release.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# 0. (optional) cargo release minor ; verify readme + changelog bumped; then git reset --hard
66
# 1. PUBLISH_GRACE_SLEEP=20 cargo release minor --execute
7-
# 1X. - on failure: follow plan manually, cd into next dirs and publish insequence with cargo publish --features=k8s-openapi/v1_23
7+
# 1X. - on failure: follow plan manually, cd into next dirs and publish insequence with cargo publish --features=k8s-openapi/v1_24
88
# 2. check consolidated commit
99
# 2X. - on failure: git commit --amend and insert version
1010
# 3. ./scripts/release-post.sh
@@ -21,4 +21,4 @@ push = false
2121
tag = false
2222
# A Kubernetes version is normally supplied by the application consuming the library in the end.
2323
# Since we don't have that when verifying, supply one ourselves.
24-
enable-features = ["k8s-openapi/v1_23"]
24+
enable-features = ["k8s-openapi/v1_24"]

scripts/msrv.sh

-27
This file was deleted.

0 commit comments

Comments
 (0)