Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/cargo/garde-0.21.0
Browse files Browse the repository at this point in the history
  • Loading branch information
clux authored Dec 23, 2024
2 parents 14cb2a3 + 76b4af6 commit df7f881
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/rust:1.77.2-bullseye
FROM docker.io/rust:1.81.0-bullseye

ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt upgrade -y
Expand Down
10 changes: 4 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,9 @@ jobs:
fail-fast: false
matrix:
# Run these tests against older clusters as well
k8s: [v1.26, v1.30]
k8s:
- "v1.28" # MK8SV
- "latest"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -184,10 +186,6 @@ jobs:
echo "mk8sv not set correctly in tests"
exit 1
fi
if ! grep "${{ steps.mk8sv.outputs.mk8svdash }}" e2e/Cargo.toml | grep mk8sv; then
echo "mk8sv not set correctly in e2e features"
exit 1
fi
- uses: dtolnay/rust-toolchain@stable
# Smart caching for Rust projects.
Expand All @@ -198,7 +196,7 @@ jobs:

- uses: nolar/setup-k3d-k3s@v1
with:
version: v1.26
version: "v1.28" # MK8SV
# k3d-kube
k3d-name: kube
# Used to avoid rate limits when fetching the releases from k3s repo.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
tool: [email protected]
- uses: nolar/setup-k3d-k3s@v1
with:
version: v1.26
version: "v1.28" # MK8SV
# k3d-kube
k3d-name: kube
# Used to avoid rate limits when fetching the releases from k3s repo.
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repository = "https://github.com/kube-rs/kube"
readme = "README.md"
license = "Apache-2.0"
edition = "2021"
rust-version = "1.77.2"
rust-version = "1.81.0"

[workspace.lints.rust]
unsafe_code = "forbid"
Expand Down Expand Up @@ -61,7 +61,7 @@ hyper-util = "0.1.9"
json-patch = "3"
jsonpath-rust = "0.7.3"
jsonptr = "0.6"
k8s-openapi = { version = "0.23.0", default-features = false }
k8s-openapi = { version = "0.24.0", default-features = false }
openssl = "0.10.36"
parking_lot = "0.12.0"
pem = "3.0.1"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# kube-rs

[![Crates.io](https://img.shields.io/crates/v/kube.svg)](https://crates.io/crates/kube)
[![Rust 1.77](https://img.shields.io/badge/MSRV-1.77-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/1.77.2)
[![Tested against Kubernetes v1_26 and above](https://img.shields.io/badge/MK8SV-v1_26-326ce5.svg)](https://kube.rs/kubernetes-version)
[![Rust 1.81](https://img.shields.io/badge/MSRV-1.81-dea584.svg)](https://github.com/rust-lang/rust/releases/tag/1.81.0)
[![Tested against Kubernetes v1.28 and above](https://img.shields.io/badge/MK8SV-v1.28-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_26"]
mk8sv = ["k8s-openapi/earliest"]
rustls = ["kube/rustls-tls"]
openssl = ["kube/openssl-tls"]

Expand Down
18 changes: 10 additions & 8 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -113,16 +113,18 @@ bump-msrv msrv:
sd "^.+badge/MSRV.+$" "${badge}" README.md
sd "rust:.*-bullseye" "rust:{{msrv}}-bullseye" .devcontainer/Dockerfile
# Increment the Kubernetes feature version from k8s-openapi for tests; "just bump-k8s"
# Sets the Kubernetes feature version from latest k8s-openapi.
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} - 5))
mk8svold=${latest::-2}$((${latest:3} - 6))
fastmod -m -d e2e -e toml "$mk8svold" "$mk8svnew"
fastmod -m -d .github/workflows -e yml "${mk8svold/_/\.}" "${mk8svnew/_/.}"
earliest=$(cargo info k8s-openapi --color=never 2> /dev/null |grep earliest | awk -F'[][]' '{print $2}')
latest=$(cargo info k8s-openapi --color=never 2> /dev/null |grep latest | awk -F'[][]' '{print $2}')
# pin mk8sv to k8s-openapi earliest
min_feat="${earliest::-2}${earliest:3}"
min_dots="${min_feat/_/.}"
echo "Setting MK8SV to $min_dots using feature $min_feat"
# workflow pins for k3s (any line with key/array suffixed by # MK8SV)
sd "(.*)([\:\-]{1}) .* # MK8SV$" "\$1\$2 \"${min_dots}\" # MK8SV" .github/workflows/*.yml
# bump mk8sv badge
badge="[![Tested against Kubernetes ${mk8svnew} and above](https://img.shields.io/badge/MK8SV-${mk8svnew}-326ce5.svg)](https://kube.rs/kubernetes-version)"
badge="[![Tested against Kubernetes ${min_dots} and above](https://img.shields.io/badge/MK8SV-${min_dots}-326ce5.svg)](https://kube.rs/kubernetes-version)"
sd "^.+badge/MK8SV.+$" "${badge}" README.md
echo "remember to bump kubernetes-version.md in kube-rs/website"

0 comments on commit df7f881

Please sign in to comment.