From e99bc2e2ddff2efc2d572665f92fde8bbd20c22c Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Tue, 9 Sep 2025 11:50:46 +0100 Subject: [PATCH] bump kube, k8s-openapi, and rust versions, and edition to 2024 --- .github/workflows/pr.yml | 14 +++++++------- Cargo.toml | 12 ++++++------ rustfmt.toml | 2 +- src/controller.rs | 6 +++--- src/lib.rs | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 3dbad8a..43fb3ed 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -13,27 +13,27 @@ jobs: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.83.0 + toolchain: 1.89.0 components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: - toolchain: 1.83.0 + toolchain: 1.89.0 command: fmt args: -- --check - uses: actions-rs/cargo@v1 with: - toolchain: 1.83.0 + toolchain: 1.89.0 command: clippy args: -- --deny warnings - uses: actions-rs/cargo@v1 with: - toolchain: 1.83.0 + toolchain: 1.89.0 command: install args: --locked cargo-deny --version=0.16.2 - uses: actions-rs/cargo@v1 with: - toolchain: 1.83.0 + toolchain: 1.89.0 command: deny args: check test: @@ -42,9 +42,9 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - toolchain: 1.83.0 + toolchain: 1.89.0 - uses: Swatinem/rust-cache@v2 - uses: actions-rs/cargo@v1 with: - toolchain: 1.83.0 + toolchain: 1.89.0 command: test diff --git a/Cargo.toml b/Cargo.toml index fe062f9..71991f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "k8s-controller" -version = "0.5.0" -edition = "2021" -rust-version = "1.83.0" +version = "0.6.0" +edition = "2024" +rust-version = "1.89.0" description = "lightweight framework for writing kubernetes controllers" repository = "https://github.com/MaterializeInc/k8s-controller" @@ -13,12 +13,12 @@ include = ["src/**/*", "LICENSE", "README.md", "CHANGELOG.md"] [dependencies] async-trait = "0.1" futures = "0.3" -kube = { version = "1.1.0", default-features = false, features = ["client"] } -kube-runtime = "1.1.0" +kube = { version = "2.0.0", default-features = false, features = ["client"] } +kube-runtime = "2.0.0" rand = "0.9.0" serde = "1" tracing = "0.1" [dev-dependencies] -k8s-openapi = { version = "0.25.0", default-features = false, features = ["v1_31"] } +k8s-openapi = { version = "0.26.0", default-features = false, features = ["v1_31"] } tokio = "1" diff --git a/rustfmt.toml b/rustfmt.toml index 79f8a99..f8d084c 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,2 +1,2 @@ -edition = "2021" +edition = "2024" tab_spaces = 4 diff --git a/src/controller.rs b/src/controller.rs index 3740f78..802bbff 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -9,10 +9,10 @@ use kube::api::Api; use kube::core::{ClusterResourceScope, NamespaceResourceScope}; use kube::{Client, Resource, ResourceExt}; use kube_runtime::controller::Action; -use kube_runtime::finalizer::{finalizer, Event}; +use kube_runtime::finalizer::{Event, finalizer}; use kube_runtime::watcher; -use rand::{rng, Rng}; -use tracing::{event, Level}; +use rand::{Rng, rng}; +use tracing::{Level, event}; /// The [`Controller`] watches a set of resources, calling methods on the /// provided [`Context`] when events occur. diff --git a/src/lib.rs b/src/lib.rs index 66ee722..9d5952d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,7 +30,7 @@ #![warn(clippy::useless_conversion)] #![warn(clippy::builtin_type_shadow)] #![warn(clippy::duplicate_underscore_argument)] -#![warn(clippy::double_neg)] +#![warn(double_negations)] #![warn(clippy::unnecessary_mut_passed)] #![warn(clippy::wildcard_in_or_patterns)] #![warn(clippy::crosspointer_transmute)]