Skip to content

Commit

Permalink
Upgrade k8s-openapi to 0.22 and bump MK8SV to 1.25 (#1485)
Browse files Browse the repository at this point in the history
* Bump k8s-openapi to 0.22.0

Signed-off-by: clux <[email protected]>

* bump mk8sv and fix logic?

weirdly it tried to increment two versions which is wrong

Signed-off-by: clux <[email protected]>

* more recent k3s ver

Signed-off-by: clux <[email protected]>

* try a tag that actually exists

Signed-off-by: clux <[email protected]>

* try using consistent k3s actions everywhere

Signed-off-by: clux <[email protected]>

---------

Signed-off-by: clux <[email protected]>
  • Loading branch information
clux authored May 6, 2024
1 parent 96053fd commit 51759b4
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
Expand Down
16 changes: 9 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ jobs:
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- 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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion e2e/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

Expand Down
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 51759b4

Please sign in to comment.