Skip to content

Commit 77293f3

Browse files
sbernauerTechassi
andauthored
chore: Dependecy updates, such as kube 0.95.0 and Kubernetes 0.31 (#867)
* Minor bumps * Bump kube and k8s * Update all but opentelemetry * changelog * Apply suggestions from code review Co-authored-by: Techassi <git@techassi.dev> --------- Co-authored-by: Techassi <git@techassi.dev>
1 parent 1487096 commit 77293f3

File tree

9 files changed

+198
-185
lines changed

9 files changed

+198
-185
lines changed

Cargo.lock

Lines changed: 165 additions & 157 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,25 +13,25 @@ product-config = { git = "https://github.com/stackabletech/product-config.git",
1313

1414
axum = "0.7.5"
1515
chrono = { version = "0.4.38", default-features = false }
16-
clap = { version = "4.5.13", features = ["derive", "cargo", "env"] }
17-
const_format = "0.2.32"
16+
clap = { version = "4.5.17", features = ["derive", "cargo", "env"] }
17+
const_format = "0.2.33"
1818
const-oid = "0.9.6"
1919
convert_case = "0.6.0"
2020
darling = "0.20.10"
21-
delegate = "0.12.0"
21+
delegate = "0.13.0"
2222
derivative = "2.2.0"
2323
dockerfile-parser = "0.8.0"
2424
ecdsa = { version = "0.16.9", features = ["digest", "pem"] }
2525
either = "1.13.0"
2626
futures = "0.3.30"
2727
futures-util = "0.3.30"
2828
hyper = { version = "1.4.1", features = ["full"] }
29-
hyper-util = "0.1.6"
29+
hyper-util = "0.1.8"
3030
itertools = "0.13.0"
3131
json-patch = "2.0.0"
32-
k8s-openapi = { version = "0.22.0", default-features = false, features = ["schemars", "v1_30"] }
33-
# We use rustls instead of openssl for easier portablitly, e.g. so that we can build stackablectl without the need to vendor (build from source) openssl
34-
kube = { version = "0.93.1", default-features = false, features = ["client", "jsonpatch", "runtime", "derive", "rustls-tls"] }
32+
k8s-openapi = { version = "0.23.0", default-features = false, features = ["schemars", "v1_31"] }
33+
# We use rustls instead of openssl for easier portability, e.g. so that we can build stackablectl without the need to vendor (build from source) openssl
34+
kube = { version = "0.95.0", default-features = false, features = ["client", "jsonpatch", "runtime", "derive", "rustls-tls"] }
3535
opentelemetry = "0.23.0"
3636
opentelemetry_sdk = { version = "0.23.0", features = ["rt-tokio"] }
3737
opentelemetry-appender-tracing = "0.4.0"
@@ -41,7 +41,7 @@ opentelemetry-semantic-conventions = "0.15.0"
4141
p256 = { version = "0.13.2", features = ["ecdsa"] }
4242
pin-project = "1.1.5"
4343
proc-macro2 = "1.0.86"
44-
quote = "1.0.36"
44+
quote = "1.0.37"
4545
rand = "0.8.5"
4646
rand_core = "0.6.4"
4747
regex = "1.10.6"
@@ -50,21 +50,21 @@ rstest = "0.22.0"
5050
rstest_reuse = "0.7.0"
5151
schemars = { version = "0.8.21", features = ["url"] }
5252
semver = "1.0.23"
53-
serde = { version = "1.0.204", features = ["derive"] }
54-
serde_json = "1.0.122"
53+
serde = { version = "1.0.210", features = ["derive"] }
54+
serde_json = "1.0.128"
5555
serde_yaml = "0.9.34" # This is the last available version, see https://github.com/dtolnay/serde-yaml/releases/tag/0.9.34 for details
5656
sha2 = { version = "0.10.8", features = ["oid"] }
5757
signature = "2.2.0"
5858
snafu = "0.8.4"
5959
stackable-operator-derive = { path = "stackable-operator-derive" }
6060
strum = { version = "0.26.3", features = ["derive"] }
6161
syn = "2.0.77"
62-
tempfile = "3.11.0"
62+
tempfile = "3.12.0"
6363
time = { version = "0.3.36" }
64-
tokio = { version = "1.39.2", features = ["macros", "rt-multi-thread", "fs"] }
64+
tokio = { version = "1.40.0", features = ["macros", "rt-multi-thread", "fs"] }
6565
tokio-rustls = "0.26.0"
6666
tokio-test = "0.4.4"
67-
tower = "0.4.13"
67+
tower = { version = "0.5.1", features = ["util"] }
6868
tower-http = { version = "0.5.2", features = ["trace"] }
6969
tracing = "0.1.40"
7070
tracing-appender = "0.2.3"

crates/stackable-operator/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file.
1313

1414
- BREAKING: `validation` module now uses typed errors ([#851]).
1515
- Set `checkIncrement` to 5 seconds in Logback config ([#853]).
16+
- Bump Rust dependencies and enable Kubernetes 1.31 (via `kube` 0.95.0) ([#867]).
1617

1718
### Fixed
1819

@@ -26,6 +27,7 @@ All notable changes to this project will be documented in this file.
2627
[#855]: https://github.com/stackabletech/operator-rs/pull/855
2728
[#858]: https://github.com/stackabletech/operator-rs/pull/858
2829
[#862]: https://github.com/stackabletech/operator-rs/pull/862
30+
[#867]: https://github.com/stackabletech/operator-rs/pull/867
2931

3032
## [0.74.0] - 2024-08-22
3133

crates/stackable-operator/src/builder/pod/container.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ impl ContainerBuilder {
124124
name,
125125
EnvVarSource {
126126
secret_key_ref: Some(SecretKeySelector {
127-
name: Some(secret_name.into()),
127+
name: secret_name.into(),
128128
key: secret_key.into(),
129129
..Default::default()
130130
}),
@@ -145,7 +145,7 @@ impl ContainerBuilder {
145145
name,
146146
EnvVarSource {
147147
config_map_key_ref: Some(ConfigMapKeySelector {
148-
name: Some(config_map_name.into()),
148+
name: config_map_name.into(),
149149
key: config_map_key.into(),
150150
..Default::default()
151151
}),
@@ -400,10 +400,10 @@ mod tests {
400400
matches!(container.env.as_ref().unwrap().first(), Some(EnvVar {name, value: Some(value), ..}) if name == "foo" && value == "bar")
401401
);
402402
assert!(
403-
matches!(container.env.as_ref().unwrap().get(1), Some(EnvVar {name, value_from: Some(EnvVarSource {config_map_key_ref: Some(ConfigMapKeySelector {name: Some(config_map_name), key: config_map_key, ..}), ..}), ..}) if name == "envFromConfigMap" && config_map_name == "my-configmap" && config_map_key == "my-key")
403+
matches!(container.env.as_ref().unwrap().get(1), Some(EnvVar {name, value_from: Some(EnvVarSource {config_map_key_ref: Some(ConfigMapKeySelector {name: config_map_name, key: config_map_key, ..}), ..}), ..}) if name == "envFromConfigMap" && config_map_name == "my-configmap" && config_map_key == "my-key")
404404
);
405405
assert!(
406-
matches!(container.env.as_ref().unwrap().get(2), Some(EnvVar {name, value_from: Some(EnvVarSource {secret_key_ref: Some(SecretKeySelector {name: Some(secret_name), key: secret_key, ..}), ..}), ..}) if name == "envFromSecret" && secret_name == "my-secret" && secret_key == "my-key")
406+
matches!(container.env.as_ref().unwrap().get(2), Some(EnvVar {name, value_from: Some(EnvVarSource {secret_key_ref: Some(SecretKeySelector {name: secret_name, key: secret_key, ..}), ..}), ..}) if name == "envFromSecret" && secret_name == "my-secret" && secret_key == "my-key")
407407
);
408408
assert_eq!(container.volume_mounts.as_ref().unwrap().len(), 1);
409409
assert!(

crates/stackable-operator/src/builder/pod/mod.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ impl PodBuilder {
456456
) -> &mut Self {
457457
self.image_pull_secrets
458458
.get_or_insert_with(Vec::new)
459-
.extend(secrets.map(|s| LocalObjectReference { name: Some(s) }));
459+
.extend(secrets.map(|name| LocalObjectReference { name }));
460460
self
461461
}
462462

@@ -699,7 +699,8 @@ mod tests {
699699
pod_spec.volumes.as_ref().and_then(|volumes| volumes
700700
.first()
701701
.as_ref()
702-
.and_then(|volume| volume.config_map.as_ref()?.name.clone())),
702+
.and_then(|volume| volume.config_map.as_ref())
703+
.map(|cm| cm.name.clone())),
703704
Some("configmap".to_string())
704705
);
705706
assert_eq!(pod_spec.termination_grace_period_seconds, Some(42));
@@ -715,7 +716,7 @@ mod tests {
715716
assert_eq!(
716717
pod.spec.unwrap().image_pull_secrets.unwrap(),
717718
vec![LocalObjectReference {
718-
name: Some("company-registry-secret".to_string())
719+
name: "company-registry-secret".to_string()
719720
}]
720721
);
721722
}

crates/stackable-operator/src/builder/pod/security.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,9 @@ mod tests {
399399
// Because we support older Kubernetes versions as well, we can
400400
// not use it for now, as we would not work on older Kubernetes
401401
// clusters.
402-
app_armor_profile: None
402+
app_armor_profile: None,
403+
// This attribute is supported starting with Kubernetes 1.31.
404+
supplemental_groups_policy: None,
403405
}
404406
);
405407
}

crates/stackable-operator/src/builder/pod/volume.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ impl VolumeBuilder {
6262

6363
pub fn with_config_map(&mut self, name: impl Into<String>) -> &mut Self {
6464
self.volume_source = VolumeSource::ConfigMap(ConfigMapVolumeSource {
65-
name: Some(name.into()),
65+
name: name.into(),
6666
..ConfigMapVolumeSource::default()
6767
});
6868
self
@@ -565,7 +565,7 @@ mod tests {
565565

566566
assert_eq!(vol.name, "name".to_string());
567567
assert_eq!(
568-
vol.config_map.and_then(|cm| cm.name),
568+
vol.config_map.map(|cm| cm.name),
569569
Some("configmap".to_string())
570570
);
571571

crates/stackable-operator/src/commons/authentication/oidc.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ impl AuthenticationProvider {
181181
value_from: Some(EnvVarSource {
182182
secret_key_ref: Some(SecretKeySelector {
183183
key: CLIENT_ID_SECRET_KEY.to_string(),
184-
name: Some(secret_name.clone()),
184+
name: secret_name.clone(),
185185
..Default::default()
186186
}),
187187
..Default::default()
@@ -193,7 +193,7 @@ impl AuthenticationProvider {
193193
value_from: Some(EnvVarSource {
194194
secret_key_ref: Some(SecretKeySelector {
195195
key: CLIENT_SECRET_SECRET_KEY.to_string(),
196-
name: Some(secret_name),
196+
name: secret_name,
197197
..Default::default()
198198
}),
199199
..Default::default()
@@ -360,12 +360,12 @@ mod test {
360360
vec![
361361
SecretKeySelector {
362362
key: CLIENT_ID_SECRET_KEY.to_string(),
363-
name: Some(secret_name.to_string()),
363+
name: secret_name.to_string(),
364364
optional: None,
365365
},
366366
SecretKeySelector {
367367
key: CLIENT_SECRET_SECRET_KEY.to_string(),
368-
name: Some(secret_name.to_string()),
368+
name: secret_name.to_string(),
369369
optional: None,
370370
}
371371
],

crates/stackable-operator/src/commons/product_image_selection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ mod tests {
411411
app_version_label: "1.4.1-latest-and-greatest".to_string(),
412412
product_version: "1.4.1".to_string(),
413413
image_pull_policy: "Always".to_string(),
414-
pull_secrets: Some(vec![LocalObjectReference{name: Some("myPullSecrets1".to_string())}, LocalObjectReference{name: Some("myPullSecrets2".to_string())}]),
414+
pull_secrets: Some(vec![LocalObjectReference{name: "myPullSecrets1".to_string()}, LocalObjectReference{name: "myPullSecrets2".to_string()}]),
415415
}
416416
)]
417417
fn test_correct_resolved_image(

0 commit comments

Comments
 (0)