Skip to content

Commit 7dd74ff

Browse files
Bump kube to 1.1.0 and k8s-openapi to 0.25.0, feature 1_31
1 parent e4c568e commit 7dd74ff

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44

55
env:
66
DOCKER_BUILDKIT: "1"
7-
K8S_OPENAPI_ENABLED_VERSION: "1.30"
7+
K8S_OPENAPI_ENABLED_VERSION: "1.31"
88

99
jobs:
1010
lint:

Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "k8s-controller"
3-
version = "0.4.1"
3+
version = "0.5.0"
44
edition = "2021"
55
rust-version = "1.83.0"
66

@@ -13,12 +13,12 @@ include = ["src/**/*", "LICENSE", "README.md", "CHANGELOG.md"]
1313
[dependencies]
1414
async-trait = "0.1"
1515
futures = "0.3"
16-
kube = { version = "0.98.0", default-features = false, features = ["client"] }
17-
kube-runtime = "0.98.0"
18-
rand = "0.8"
16+
kube = { version = "1.1.0", default-features = false, features = ["client"] }
17+
kube-runtime = "1.1.0"
18+
rand = "0.9.0"
1919
serde = "1"
2020
tracing = "0.1"
2121

2222
[dev-dependencies]
23-
k8s-openapi = { version = "0.24", default-features = false, features = ["v1_30"] }
23+
k8s-openapi = { version = "0.25.0", default-features = false, features = ["v1_31"] }
2424
tokio = "1"

deny.toml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ targets = [
99
[advisories]
1010
version = 2
1111
ignore = [
12-
# Dependency of kube, and has no known version without it.
13-
# This is just saying the "instant" crate is unmaintained, but nothing is
14-
# actively dangerous yet.
15-
"RUSTSEC-2024-0384",
1612
]
1713

1814
[bans]
1915
multiple-versions = "deny"
2016
skip = [
17+
{ name = "getrandom", version = "0.2.15" },
2118
{ name = "thiserror", version = "1.0.69" },
2219
{ name = "thiserror-impl", version = "1.0.69" },
2320
]
@@ -35,7 +32,6 @@ name = "rustls"
3532
version = 2
3633
allow = [
3734
"Apache-2.0",
38-
"BSD-3-Clause",
3935
"MIT",
4036
"Unicode-3.0",
4137
"Zlib",

src/controller.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use kube::{Client, Resource, ResourceExt};
1111
use kube_runtime::controller::Action;
1212
use kube_runtime::finalizer::{finalizer, Event};
1313
use kube_runtime::watcher;
14-
use rand::{thread_rng, Rng};
14+
use rand::{rng, Rng};
1515
use tracing::{event, Level};
1616

1717
/// The [`Controller`] watches a set of resources, calling methods on the
@@ -251,7 +251,7 @@ pub trait Context {
251251
// use a better name for the parameter name in the docs
252252
let _resource = resource;
253253

254-
Action::requeue(Duration::from_secs(thread_rng().gen_range(2400..3600)))
254+
Action::requeue(Duration::from_secs(rng().random_range(2400..3600)))
255255
}
256256

257257
/// This method is called when a call to [`apply`](Self::apply) or
@@ -273,7 +273,7 @@ pub trait Context {
273273

274274
let seconds = 2u64.pow(consecutive_errors.min(7) + 1);
275275
Action::requeue(Duration::from_millis(
276-
thread_rng().gen_range((seconds * 500)..(seconds * 1000)),
276+
rng().random_range((seconds * 500)..(seconds * 1000)),
277277
))
278278
}
279279

0 commit comments

Comments
 (0)