From 51759b4c50a063214cebd76c573ac46f8660c7e1 Mon Sep 17 00:00:00 2001 From: Eirik A Date: Mon, 6 May 2024 14:40:17 +0100 Subject: [PATCH] Upgrade `k8s-openapi` to 0.22 and bump MK8SV to 1.25 (#1485) * Bump k8s-openapi to 0.22.0 Signed-off-by: clux * bump mk8sv and fix logic? weirdly it tried to increment two versions which is wrong Signed-off-by: clux * more recent k3s ver Signed-off-by: clux * try a tag that actually exists Signed-off-by: clux * try using consistent k3s actions everywhere Signed-off-by: clux --------- Signed-off-by: clux --- .github/workflows/ci.yml | 4 ++-- .github/workflows/coverage.yml | 16 +++++++++------- Cargo.toml | 2 +- README.md | 2 +- e2e/Cargo.toml | 2 +- justfile | 4 ++-- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8812743d9..78d90e1bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -137,7 +137,7 @@ jobs: fail-fast: false matrix: # Run these tests against older clusters as well - k8s: [v1.24, latest] + k8s: [v1.25, latest] steps: - uses: actions/checkout@v4 - uses: actions-rs/toolchain@v1 @@ -211,7 +211,7 @@ jobs: - uses: nolar/setup-k3d-k3s@v1 with: - version: v1.24 + version: v1.25 # k3d-kube k3d-name: kube # Used to avoid rate limits when fetching the releases from k3s repo. diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ddc8615f2..0b1d89f31 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -23,14 +23,16 @@ jobs: uses: taiki-e/install-action@v2 with: tool: cargo-tarpaulin@0.28.0 - - uses: AbsaOSS/k3d-action@v2 - name: "Create Single Cluster" + - uses: nolar/setup-k3d-k3s@v1 with: - cluster-name: "test-cluster-1" - args: >- - --image docker.io/rancher/k3s:v1.24.4-k3s1 - -p 10250:10250 - --k3s-arg "--no-deploy=traefik,servicelb,metrics-server@server:*" + version: v1.25 + # k3d-kube + k3d-name: kube + # Used to avoid rate limits when fetching the releases from k3s repo. + # Anonymous access is limited to 60 requests / hour / worker + # github-token: ${{ secrets.GITHUB_TOKEN }} + k3d-args: "-p 10250:10250 --no-rollback --k3s-arg --disable=traefik,servicelb,metrics-server@server:*" + - name: Run cargo-tarpaulin run: | rustup run stable cargo tarpaulin -o xml --skip-clean diff --git a/Cargo.toml b/Cargo.toml index 8f7ef0dab..f7e1ffd97 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,7 +59,7 @@ hyper-socks2 = { version = "0.9.0", default-features = false } hyper-timeout = "0.5.1" json-patch = "1.0.0" jsonpath-rust = "0.5.0" -k8s-openapi = { version = "0.21.0", default-features = false } +k8s-openapi = { version = "0.22.0", default-features = false } openssl = "0.10.36" parking_lot = "0.12.0" pem = "3.0.1" diff --git a/README.md b/README.md index ff00b67d8..b01576282 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Crates.io](https://img.shields.io/crates/v/kube.svg)](https://crates.io/crates/kube) [![Rust 1.75](https://img.shields.io/badge/MSRV-1.75-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/1.75.0) -[![Tested against Kubernetes v1_24 and above](https://img.shields.io/badge/MK8SV-v1_24-326ce5.svg)](https://kube.rs/kubernetes-version) +[![Tested against Kubernetes v1_25 and above](https://img.shields.io/badge/MK8SV-v1_25-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) diff --git a/e2e/Cargo.toml b/e2e/Cargo.toml index 864de3223..b0cc8959c 100644 --- a/e2e/Cargo.toml +++ b/e2e/Cargo.toml @@ -19,7 +19,7 @@ path = "boot.rs" [features] latest = ["k8s-openapi/latest"] -mk8sv = ["k8s-openapi/v1_24"] +mk8sv = ["k8s-openapi/v1_25"] rustls = ["kube/rustls-tls"] openssl = ["kube/openssl-tls"] diff --git a/justfile b/justfile index 4f33d6393..3c3adf9d8 100644 --- a/justfile +++ b/justfile @@ -107,8 +107,8 @@ bump-k8s: #!/usr/bin/env bash latest=$(cargo tree --format "{f}" -i k8s-openapi | head -n 1 | choose -f ',' 1) # bumping supported version also bumps our mk8sv - mk8svnew=${latest::-2}$((${latest:3} - 4)) - mk8svold=${latest::-2}$((${latest:3} - 5)) + mk8svnew=${latest::-2}$((${latest:3} - 5)) + mk8svold=${latest::-2}$((${latest:3} - 6)) fastmod -m -d e2e -e toml "$mk8svold" "$mk8svnew" fastmod -m -d .github/workflows -e yml "${mk8svold/_/\.}" "${mk8svnew/_/.}" # bump mk8sv badge