diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml index fb75a421f..660011767 100644 --- a/.github/workflows/audit.yml +++ b/.github/workflows/audit.yml @@ -9,7 +9,7 @@ jobs: if: ${{ github.repository_owner == 'kube-rs' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e850002be..56296ce75 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: override: true @@ -123,7 +123,7 @@ jobs: # Run these tests against older clusters as well k8s: [v1.23, latest] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: override: true @@ -161,7 +161,7 @@ jobs: # comile check e2e tests against mk8sv runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Find MK8SV id: mk8sv @@ -225,7 +225,7 @@ jobs: matrix: tls: [openssl, rustls] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions/cache@v2 with: path: | diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index a372df5f2..3e4864341 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -10,7 +10,7 @@ jobs: clippy_nightly: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 with: toolchain: nightly diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 0f01fc239..00f85dcb6 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: diff --git a/.github/workflows/devcontainer.yml b/.github/workflows/devcontainer.yml index 5e9cee987..1f7be07f3 100644 --- a/.github/workflows/devcontainer.yml +++ b/.github/workflows/devcontainer.yml @@ -14,5 +14,5 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - run: docker build .devcontainer diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 902dee9cb..1d63fcbe9 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: continue-on-error: ${{ matrix.checks == 'advisories' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: EmbarkStudios/cargo-deny-action@v1 with: command: check ${{ matrix.checks }} @@ -29,7 +29,7 @@ jobs: name: rustfmt runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1.0.7 with: profile: minimal diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 63d286f51..1b44a3f7d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: if: ${{ github.repository_owner == 'kube-rs' }} steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Generate release info run: ./scripts/release-gh.sh - name: Release diff --git a/.github/workflows/rustfmt.yml b/.github/workflows/rustfmt.yml index 427365375..280a9b6f6 100644 --- a/.github/workflows/rustfmt.yml +++ b/.github/workflows/rustfmt.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install nightly toolchain with rustfmt available uses: actions-rs/toolchain@v1 diff --git a/README.md b/README.md index daa95bb3a..e8cac0b4b 100644 --- a/README.md +++ b/README.md @@ -12,12 +12,12 @@ These crates build upon Kubernetes [apimachinery](https://github.com/kubernetes/ ## Installation -Select a version of `kube` along with the generated [k8s-openapi](https://github.com/Arnavion/k8s-openapi) types corresponding for your cluster version: +Select a version of `kube` along with the generated [k8s-openapi](https://github.com/Arnavion/k8s-openapi) structs at your chosen [Kubernetes version](https://kube.rs/kubernetes-version/): ```toml [dependencies] kube = { version = "0.86.0", features = ["runtime", "derive"] } -k8s-openapi = { version = "0.20.0", features = ["v1_28"] } +k8s-openapi = { version = "0.20.0", features = ["latest"] } ``` [Features are available](https://github.com/kube-rs/kube/blob/main/kube/Cargo.toml#L18). @@ -153,7 +153,7 @@ By default [rustls](https://github.com/ctz/rustls) is used for TLS, but `openssl ```toml [dependencies] kube = { version = "0.86.0", default-features = false, features = ["client", "openssl-tls"] } -k8s-openapi = { version = "0.20.0", features = ["v1_28"] } +k8s-openapi = { version = "0.20.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`. diff --git a/e2e/Cargo.toml b/e2e/Cargo.toml index 69604a740..492a131f8 100644 --- a/e2e/Cargo.toml +++ b/e2e/Cargo.toml @@ -18,7 +18,7 @@ name = "boot" path = "boot.rs" [features] -latest = ["k8s-openapi/v1_28"] +latest = ["k8s-openapi/latest"] mk8sv = ["k8s-openapi/v1_23"] rustls = ["kube/rustls-tls"] openssl = ["kube/openssl-tls"] diff --git a/examples/Cargo.toml b/examples/Cargo.toml index a88f68acb..d9fc4a8c7 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -21,7 +21,7 @@ rustls-tls = ["kube/client", "kube/rustls-tls"] runtime = ["kube/runtime", "kube/unstable-runtime"] refresh = ["kube/oauth", "kube/oidc"] ws = ["kube/ws"] -latest = ["k8s-openapi/v1_28"] +latest = ["k8s-openapi/latest"] [dev-dependencies] tokio-util = "0.7.0" diff --git a/justfile b/justfile index c3d12d55c..445a5e888 100644 --- a/justfile +++ b/justfile @@ -15,7 +15,7 @@ fmt: rustfmt +nightly --edition 2021 $(find . -type f -iname *.rs) doc: - RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,oidc,jsonpatch,client,derive,runtime,admission,k8s-openapi/v1_28,unstable-runtime --open + RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --lib --workspace --features=derive,ws,oauth,oidc,jsonpatch,client,derive,runtime,admission,k8s-openapi/latest,unstable-runtime --open deny: # might require rm Cargo.lock first to match CI @@ -114,14 +114,10 @@ bump-msrv msrv: # Increment the Kubernetes feature version from k8s-openapi for tests; "just bump-k8s" bump-k8s: #!/usr/bin/env bash - current=$(cargo tree --format "{f}" -i k8s-openapi | head -n 1) - next=${current::-2}$((${current:3} + 1)) - fastmod -m -d . -e toml "$current" "$next" - fastmod -m "$current" "$next" -- README.md - fastmod -m "$current" "$next" -- justfile + latest=$(cargo tree --format "{f}" -i k8s-openapi | head -n 1 | choose -f ',' 1) # bumping supported version also bumps our mk8sv - mk8svnew=${current::-2}$((${current:3} - 4)) - mk8svold=${current::-2}$((${current:3} - 5)) + mk8svnew=${latest::-2}$((${latest:3} - 4)) + mk8svold=${latest::-2}$((${latest:3} - 5)) fastmod -m -d e2e -e toml "$mk8svold" "$mk8svnew" fastmod -m -d .github/workflows -e yml "${mk8svold/_/\.}" "${mk8svnew/_/.}" # bump mk8sv badge diff --git a/kube-client/Cargo.toml b/kube-client/Cargo.toml index 9a18b4e46..c19433e47 100644 --- a/kube-client/Cargo.toml +++ b/kube-client/Cargo.toml @@ -32,7 +32,7 @@ config = ["__non_core", "pem", "home"] __non_core = ["tracing", "serde_yaml", "base64"] [package.metadata.docs.rs] -features = ["client", "rustls-tls", "openssl-tls", "ws", "oauth", "oidc", "jsonpatch", "admission", "k8s-openapi/v1_28"] +features = ["client", "rustls-tls", "openssl-tls", "ws", "oauth", "oidc", "jsonpatch", "admission", "k8s-openapi/latest"] # Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature. rustdoc-args = ["--cfg", "docsrs"] @@ -87,4 +87,4 @@ tower-test = "0.4.0" [dev-dependencies.k8s-openapi] version = "0.20.0" default-features = false -features = ["v1_28"] +features = ["latest"] diff --git a/kube-core/Cargo.toml b/kube-core/Cargo.toml index 90e9fd8a6..e78a3e1f9 100644 --- a/kube-core/Cargo.toml +++ b/kube-core/Cargo.toml @@ -15,7 +15,7 @@ repository = "https://github.com/kube-rs/kube" readme = "../README.md" [package.metadata.docs.rs] -features = ["ws", "admission", "jsonpatch", "k8s-openapi/v1_28"] +features = ["ws", "admission", "jsonpatch", "k8s-openapi/latest"] rustdoc-args = ["--cfg", "docsrs"] [features] @@ -43,7 +43,7 @@ features = [] [dev-dependencies.k8s-openapi] version = "0.20.0" default-features = false -features = ["v1_28"] +features = ["latest"] [dev-dependencies] assert-json-diff = "2.0.1" diff --git a/kube-derive/Cargo.toml b/kube-derive/Cargo.toml index b2ffa1c9e..2f07b23f8 100644 --- a/kube-derive/Cargo.toml +++ b/kube-derive/Cargo.toml @@ -29,7 +29,7 @@ proc-macro = true serde = { version = "1.0.130", features = ["derive"] } serde_yaml = "0.9.19" kube = { path = "../kube", version = "<1.0.0, >=0.61.0", features = ["derive", "client"] } -k8s-openapi = { version = "0.20.0", default-features = false, features = ["v1_28"] } +k8s-openapi = { version = "0.20.0", default-features = false, features = ["latest"] } schemars = { version = "0.8.6", features = ["chrono"] } chrono = { version = "0.4.19", default-features = false } trybuild = "1.0.48" diff --git a/kube-runtime/Cargo.toml b/kube-runtime/Cargo.toml index 1bd963bee..1404d4855 100644 --- a/kube-runtime/Cargo.toml +++ b/kube-runtime/Cargo.toml @@ -22,7 +22,7 @@ unstable-runtime-stream-control = [] unstable-runtime-reconcile-on = [] [package.metadata.docs.rs] -features = ["k8s-openapi/v1_28", "unstable-runtime"] +features = ["k8s-openapi/latest", "unstable-runtime"] # Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature. rustdoc-args = ["--cfg", "docsrs"] @@ -60,4 +60,4 @@ tracing-subscriber = "0.3.17" [dev-dependencies.k8s-openapi] version = "0.20.0" default-features = false -features = ["v1_28"] +features = ["latest"] diff --git a/kube/Cargo.toml b/kube/Cargo.toml index 71114bc02..92af9cb6e 100644 --- a/kube/Cargo.toml +++ b/kube/Cargo.toml @@ -38,7 +38,7 @@ runtime = ["kube-runtime"] unstable-runtime = ["kube-runtime/unstable-runtime"] [package.metadata.docs.rs] -features = ["client", "rustls-tls", "openssl-tls", "derive", "ws", "oauth", "jsonpatch", "admission", "runtime", "k8s-openapi/v1_28", "unstable-runtime"] +features = ["client", "rustls-tls", "openssl-tls", "derive", "ws", "oauth", "jsonpatch", "admission", "runtime", "k8s-openapi/latest", "unstable-runtime"] # Define the configuration attribute `docsrs`. Used to enable `doc_cfg` feature. rustdoc-args = ["--cfg", "docsrs"] @@ -68,4 +68,4 @@ anyhow = "1.0.71" [dev-dependencies.k8s-openapi] version = "0.20.0" default-features = false -features = ["v1_28"] +features = ["latest"] diff --git a/release.toml b/release.toml index 43042b141..de2078a2c 100644 --- a/release.toml +++ b/release.toml @@ -4,7 +4,7 @@ # # 0. (optional) cargo release minor ; verify readme + changelog bumped; then git reset --hard # 1. PUBLISH_GRACE_SLEEP=20 cargo release minor --execute -# 1X. - on failure: follow plan manually, cd into next dirs and publish insequence with cargo publish --features=k8s-openapi/v1_28 +# 1X. - on failure: follow plan manually, cd into next dirs and publish insequence with cargo publish --features=k8s-openapi/latest # 2. check consolidated commit # 2X. - on failure: git commit --amend and insert version # 3. ./scripts/release-post.sh @@ -21,4 +21,4 @@ push = false tag = false # A Kubernetes version is normally supplied by the application consuming the library in the end. # Since we don't have that when verifying, supply one ourselves. -enable-features = ["k8s-openapi/v1_28"] +enable-features = ["k8s-openapi/latest"]