From 360da1ec52c54cf9757fa249b738d82ccc0c1491 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 4 May 2024 22:11:12 +0100 Subject: [PATCH 1/5] Bump k8s-openapi to 0.22.0 Signed-off-by: clux --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From 2a20daa9126db4ccc158c670889dd1d88b7377c2 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 4 May 2024 22:20:45 +0100 Subject: [PATCH 2/5] bump mk8sv and fix logic? weirdly it tried to increment two versions which is wrong Signed-off-by: clux --- .github/workflows/ci.yml | 4 ++-- .github/workflows/coverage.yml | 2 +- README.md | 2 +- e2e/Cargo.toml | 2 +- justfile | 4 ++-- 5 files changed, 7 insertions(+), 7 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..f65f2db41 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,7 @@ jobs: with: cluster-name: "test-cluster-1" args: >- - --image docker.io/rancher/k3s:v1.24.4-k3s1 + --image docker.io/rancher/k3s:v1.25.4-k3s1 -p 10250:10250 --k3s-arg "--no-deploy=traefik,servicelb,metrics-server@server:*" - name: Run cargo-tarpaulin 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 From 3fd0acfb6c270309c24788414d09750040fa109c Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 4 May 2024 22:21:49 +0100 Subject: [PATCH 3/5] more recent k3s ver Signed-off-by: clux --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index f65f2db41..ce17bb8fe 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,7 @@ jobs: with: cluster-name: "test-cluster-1" args: >- - --image docker.io/rancher/k3s:v1.25.4-k3s1 + --image docker.io/rancher/k3s:v1.25.16-k3s1 -p 10250:10250 --k3s-arg "--no-deploy=traefik,servicelb,metrics-server@server:*" - name: Run cargo-tarpaulin From b2bb73821b45b730d3b7b85a560f5e5861a28c18 Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 4 May 2024 22:33:48 +0100 Subject: [PATCH 4/5] try a tag that actually exists Signed-off-by: clux --- .github/workflows/coverage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ce17bb8fe..bdea3efcd 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,7 @@ jobs: with: cluster-name: "test-cluster-1" args: >- - --image docker.io/rancher/k3s:v1.25.16-k3s1 + --image docker.io/rancher/k3s:v1.25.16-k3s1-amd64 -p 10250:10250 --k3s-arg "--no-deploy=traefik,servicelb,metrics-server@server:*" - name: Run cargo-tarpaulin From 08a4303969b12bee4c18cce676e7cb3a1c26e17e Mon Sep 17 00:00:00 2001 From: clux Date: Sat, 4 May 2024 22:38:16 +0100 Subject: [PATCH 5/5] try using consistent k3s actions everywhere Signed-off-by: clux --- .github/workflows/coverage.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index bdea3efcd..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.25.16-k3s1-amd64 - -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