From 4074ab920c4f26384a3ab5b749899b1ce7ddc2c3 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Sun, 26 Apr 2026 14:20:14 +0200 Subject: [PATCH 1/2] chore: Upgrade stackable-operator to 0.110.1 --- CHANGELOG.md | 5 + Cargo.lock | 76 +++++++------ Cargo.nix | 127 +++++++++++----------- Cargo.toml | 2 +- crate-hashes.json | 23 ++-- extra/crds.yaml | 68 +++++++++--- rust/operator-binary/src/config/jvm.rs | 19 ++-- rust/operator-binary/src/crd/mod.rs | 52 +++++++-- rust/operator-binary/src/crd/security.rs | 31 ++++-- rust/operator-binary/src/discovery.rs | 2 +- rust/operator-binary/src/listener.rs | 2 +- rust/operator-binary/src/main.rs | 6 +- rust/operator-binary/src/service.rs | 4 +- rust/operator-binary/src/zk_controller.rs | 64 +++++------ 14 files changed, 274 insertions(+), 207 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b6c0074d..7ff1d78b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,8 +7,13 @@ All notable changes to this project will be documented in this file. ### Changed - Document Helm deployed RBAC permissions and remove unnecessary permissions ([#1020]). +- BREAKING: `configOverrides` now only accepts the known config files (`zoo.cfg` and + `security.properties`). + Previously, arbitrary file names were silently accepted and ignored ([#1027]). +- Bump `stackable-operator` to 0.110.1 ([#1027]). [#1020]: https://github.com/stackabletech/zookeeper-operator/pull/1020 +[#1027]: https://github.com/stackabletech/zookeeper-operator/pull/1027 ## [26.3.0] - 2026-03-16 diff --git a/Cargo.lock b/Cargo.lock index d762752d..2e272db3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1117,6 +1117,12 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +[[package]] +name = "humantime" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" + [[package]] name = "hyper" version = "1.8.1" @@ -1505,17 +1511,18 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "darling", "regex", - "snafu 0.8.9", + "snafu 0.9.0", ] [[package]] name = "kube" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acc5a6a69da2975ed9925d56b5dcfc9cc739b66f37add06785b7c9f6d1e88741" dependencies = [ "k8s-openapi", "kube-client", @@ -1526,8 +1533,9 @@ dependencies = [ [[package]] name = "kube-client" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fcaf2d1f1a91e1805d4cd82e8333c022767ae8ffd65909bbef6802733a7dd40" dependencies = [ "base64", "bytes", @@ -1560,8 +1568,9 @@ dependencies = [ [[package]] name = "kube-core" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f126d2db7a8b532ec1d839ece2a71e2485dc3bbca6cc3c3f929becaa810e719e" dependencies = [ "derive_more", "form_urlencoded", @@ -1578,8 +1587,9 @@ dependencies = [ [[package]] name = "kube-derive" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b9b97e121fce957f9cafc6da534abc4276983ab03190b76c09361e2df849fa" dependencies = [ "darling", "proc-macro2", @@ -1591,8 +1601,9 @@ dependencies = [ [[package]] name = "kube-runtime" -version = "3.0.1" -source = "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c072737075826ee74d3e615e80334e41e617ca3d14fb46ef7cdfda822d6f15f2" dependencies = [ "ahash", "async-broadcast", @@ -2819,7 +2830,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "const-oid", "ecdsa", @@ -2831,7 +2842,7 @@ dependencies = [ "rsa", "sha2", "signature", - "snafu 0.8.9", + "snafu 0.9.0", "stackable-shared", "tokio", "tokio-rustls", @@ -2842,9 +2853,10 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.108.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +version = "0.110.1" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ + "base64", "clap", "const_format", "delegate", @@ -2859,13 +2871,14 @@ dependencies = [ "k8s-openapi", "kube", "product-config", + "rand 0.9.2", "regex", "schemars", "semver", "serde", "serde_json", "serde_yaml", - "snafu 0.8.9", + "snafu 0.9.0", "stackable-operator-derive", "stackable-shared", "stackable-telemetry", @@ -2882,7 +2895,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "darling", "proc-macro2", @@ -2893,7 +2906,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "jiff", "k8s-openapi", @@ -2902,15 +2915,15 @@ dependencies = [ "semver", "serde", "serde_yaml", - "snafu 0.8.9", + "snafu 0.9.0", "strum", "time", ] [[package]] name = "stackable-telemetry" -version = "0.6.2" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +version = "0.6.3" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "axum", "clap", @@ -2921,7 +2934,7 @@ dependencies = [ "opentelemetry-semantic-conventions", "opentelemetry_sdk", "pin-project", - "snafu 0.8.9", + "snafu 0.9.0", "strum", "tokio", "tower", @@ -2933,21 +2946,21 @@ dependencies = [ [[package]] name = "stackable-versioned" -version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +version = "0.9.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "schemars", "serde", "serde_json", "serde_yaml", - "snafu 0.8.9", + "snafu 0.9.0", "stackable-versioned-macros", ] [[package]] name = "stackable-versioned-macros" -version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +version = "0.9.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "convert_case", "convert_case_extras", @@ -2964,13 +2977,14 @@ dependencies = [ [[package]] name = "stackable-webhook" -version = "0.9.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#7486017f60827d1d769d7bf17bf56adb21f8bb02" +version = "0.9.1" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" dependencies = [ "arc-swap", "async-trait", "axum", "futures-util", + "humantime", "hyper", "hyper-util", "k8s-openapi", @@ -2980,7 +2994,7 @@ dependencies = [ "rand 0.9.2", "serde", "serde_json", - "snafu 0.8.9", + "snafu 0.9.0", "stackable-certs", "stackable-shared", "stackable-telemetry", diff --git a/Cargo.nix b/Cargo.nix index 96c68c7b..196f376a 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -3480,6 +3480,14 @@ rec { ]; }; + "humantime" = rec { + crateName = "humantime"; + version = "2.3.0"; + edition = "2021"; + sha256 = "092lpipp32ayz4kyyn4k3vz59j9blng36wprm5by0g2ykqr14nqk"; + features = { + }; + }; "hyper" = rec { crateName = "hyper"; version = "1.8.1"; @@ -4802,8 +4810,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; libName = "k8s_version"; authors = [ @@ -4821,7 +4829,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.8.9"; + packageId = "snafu 0.9.0"; } ]; features = { @@ -4832,14 +4840,9 @@ rec { }; "kube" = rec { crateName = "kube"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "0hc7x38zdjdphmkx1b9pdyv3kiwwzkfbamjxjbcmx5x2knkadidc"; authors = [ "clux " "Natalie Klestrup Röijezon " @@ -4910,14 +4913,9 @@ rec { }; "kube-client" = rec { crateName = "kube-client"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "0h6xlwrjg07npsdr0rgxiyp6f9q27hryi0ndsh2ih7m9y78z5jhg"; libName = "kube_client"; authors = [ "clux " @@ -5043,7 +5041,7 @@ rec { name = "tokio"; packageId = "tokio"; optional = true; - features = [ "time" "signal" "sync" ]; + features = [ "time" "signal" "sync" "rt" ]; } { name = "tokio-util"; @@ -5143,14 +5141,9 @@ rec { }; "kube-core" = rec { crateName = "kube-core"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "17ki1s0smv4vj8zkrk56phxxr1943sky5v1rv30jwlwbgbdx49pi"; libName = "kube_core"; authors = [ "clux " @@ -5230,14 +5223,9 @@ rec { }; "kube-derive" = rec { crateName = "kube-derive"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "1yj9z0niwdh9djvr0cdh7ac7chmw999xmimgkizrbkhz29zbkffn"; procMacro = true; libName = "kube_derive"; authors = [ @@ -5284,14 +5272,9 @@ rec { }; "kube-runtime" = rec { crateName = "kube-runtime"; - version = "3.0.1"; + version = "3.1.0"; edition = "2024"; - workspace_member = null; - src = pkgs.fetchgit { - url = "https://github.com/kube-rs/kube-rs"; - rev = "fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5"; - sha256 = "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n"; - }; + sha256 = "1whmdwnq5nnzgkpldyql7p51grj19qrq0pk17r6yfvl2fmq76wn0"; libName = "kube_runtime"; authors = [ "clux " @@ -9349,8 +9332,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; libName = "stackable_certs"; authors = [ @@ -9408,7 +9391,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.8.9"; + packageId = "snafu 0.9.0"; } { name = "stackable-shared"; @@ -9447,19 +9430,23 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.108.0"; + version = "0.110.1"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; libName = "stackable_operator"; authors = [ "Stackable GmbH " ]; dependencies = [ + { + name = "base64"; + packageId = "base64"; + } { name = "clap"; packageId = "clap"; @@ -9523,6 +9510,10 @@ rec { name = "product-config"; packageId = "product-config"; } + { + name = "rand"; + packageId = "rand 0.9.2"; + } { name = "regex"; packageId = "regex"; @@ -9551,7 +9542,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.8.9"; + packageId = "snafu 0.9.0"; } { name = "stackable-operator-derive"; @@ -9624,8 +9615,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -9659,8 +9650,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; libName = "stackable_shared"; authors = [ @@ -9704,7 +9695,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.8.9"; + packageId = "snafu 0.9.0"; } { name = "strum"; @@ -9735,13 +9726,13 @@ rec { }; "stackable-telemetry" = rec { crateName = "stackable-telemetry"; - version = "0.6.2"; + version = "0.6.3"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; libName = "stackable_telemetry"; authors = [ @@ -9792,7 +9783,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.8.9"; + packageId = "snafu 0.9.0"; } { name = "strum"; @@ -9845,13 +9836,13 @@ rec { }; "stackable-versioned" = rec { crateName = "stackable-versioned"; - version = "0.8.3"; + version = "0.9.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; libName = "stackable_versioned"; authors = [ @@ -9878,7 +9869,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.8.9"; + packageId = "snafu 0.9.0"; } { name = "stackable-versioned-macros"; @@ -9889,13 +9880,13 @@ rec { }; "stackable-versioned-macros" = rec { crateName = "stackable-versioned-macros"; - version = "0.8.3"; + version = "0.9.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -9957,13 +9948,13 @@ rec { }; "stackable-webhook" = rec { crateName = "stackable-webhook"; - version = "0.9.0"; + version = "0.9.1"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7486017f60827d1d769d7bf17bf56adb21f8bb02"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; + sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; }; libName = "stackable_webhook"; authors = [ @@ -9987,6 +9978,10 @@ rec { name = "futures-util"; packageId = "futures-util"; } + { + name = "humantime"; + packageId = "humantime"; + } { name = "hyper"; packageId = "hyper"; @@ -10031,7 +10026,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.8.9"; + packageId = "snafu 0.9.0"; } { name = "stackable-certs"; diff --git a/Cargo.toml b/Cargo.toml index e45ef952..8beeee65 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/zookeeper-operator" [workspace.dependencies] product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" } -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.108.0", features = ["webhook"] } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.110.1", features = ["webhook"] } anyhow = "1.0" built = { version = "0.8", features = ["chrono", "git2"] } diff --git a/crate-hashes.json b/crate-hashes.json index 2148b36f..e19b553d 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,17 +1,12 @@ { - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-client@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-core@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-derive@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-runtime@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#k8s-version@0.1.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-certs@0.4.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator-derive@0.3.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-operator@0.108.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-shared@0.1.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-telemetry@0.6.2": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned-macros@0.8.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-versioned@0.8.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.108.0#stackable-webhook@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#k8s-version@0.1.3": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-certs@0.4.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-operator-derive@0.3.1": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-operator@0.110.1": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-shared@0.1.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-telemetry@0.6.3": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-versioned-macros@0.9.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-versioned@0.9.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-webhook@0.9.1": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file diff --git a/extra/crds.yaml b/extra/crds.yaml index aed281b6..7a4969ca 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -296,7 +296,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -376,7 +376,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -456,7 +456,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -509,7 +509,7 @@ spec: type: object type: object enableVectorAgent: - description: Wether or not to deploy a container with the Vector log agent. + description: Whether or not to deploy a container with the Vector log agent. nullable: true type: boolean type: object @@ -637,17 +637,33 @@ spec: type: integer type: object configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} description: |- The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides) and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product. + properties: + security.properties: + additionalProperties: + type: string + default: {} + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + type: object + zoo.cfg: + additionalProperties: + type: string + default: {} + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + type: object type: object envOverrides: additionalProperties: @@ -835,7 +851,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -915,7 +931,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -995,7 +1011,7 @@ spec: type: string type: object custom: - description: Custom log configuration provided in a ConfigMap + description: Log configuration provided in a ConfigMap properties: configMap: description: ConfigMap containing the log configuration files @@ -1048,7 +1064,7 @@ spec: type: object type: object enableVectorAgent: - description: Wether or not to deploy a container with the Vector log agent. + description: Whether or not to deploy a container with the Vector log agent. nullable: true type: boolean type: object @@ -1176,17 +1192,33 @@ spec: type: integer type: object configOverrides: - additionalProperties: - additionalProperties: - type: string - type: object - default: {} description: |- The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides) and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product. + properties: + security.properties: + additionalProperties: + type: string + default: {} + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + type: object + zoo.cfg: + additionalProperties: + type: string + default: {} + description: |- + Flat key-value overrides for `*.properties`, Hadoop XML, etc. + + This is backwards-compatible with the existing flat key-value YAML format + used by `HashMap`. + type: object type: object envOverrides: additionalProperties: diff --git a/rust/operator-binary/src/config/jvm.rs b/rust/operator-binary/src/config/jvm.rs index ebcc178b..87f975b7 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -1,15 +1,13 @@ use snafu::{OptionExt, ResultExt, Snafu}; use stackable_operator::{ memory::{BinaryMultiple, MemoryQuantity}, - role_utils::{self, JavaCommonConfig, JvmArgumentOverrides, Role}, + role_utils::{self, JvmArgumentOverrides}, }; use crate::crd::{ JMX_METRICS_PORT, JVM_SECURITY_PROPERTIES_FILE, LOG4J_CONFIG_FILE, LOGBACK_CONFIG_FILE, - LoggingFramework, STACKABLE_CONFIG_DIR, STACKABLE_LOG_CONFIG_DIR, - v1alpha1::{ - ZookeeperCluster, ZookeeperConfig, ZookeeperConfigFragment, ZookeeperServerRoleConfig, - }, + LoggingFramework, STACKABLE_CONFIG_DIR, STACKABLE_LOG_CONFIG_DIR, ZookeeperServerRoleType, + v1alpha1::{ZookeeperCluster, ZookeeperConfig}, }; const JAVA_HEAP_FACTOR: f32 = 0.8; @@ -31,7 +29,7 @@ pub enum Error { /// All JVM arguments. fn construct_jvm_args( zk: &ZookeeperCluster, - role: &Role, + role: &ZookeeperServerRoleType, role_group: &str, product_version: &str, ) -> Result, Error> { @@ -66,7 +64,7 @@ fn construct_jvm_args( /// [`construct_zk_server_heap_env`]). pub fn construct_non_heap_jvm_args( zk: &ZookeeperCluster, - role: &Role, + role: &ZookeeperServerRoleType, role_group: &str, product_version: &str, ) -> Result { @@ -103,10 +101,7 @@ fn is_heap_jvm_argument(jvm_argument: &str) -> bool { #[cfg(test)] mod tests { use super::*; - use crate::crd::{ - ZookeeperRole, - v1alpha1::{ZookeeperConfig, ZookeeperServerRoleConfig}, - }; + use crate::crd::ZookeeperRole; #[test] fn test_construct_jvm_arguments_defaults() { @@ -203,7 +198,7 @@ mod tests { ) -> ( ZookeeperCluster, ZookeeperConfig, - Role, + ZookeeperServerRoleType, String, ) { let zookeeper: ZookeeperCluster = diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index c3f3053c..e5c13488 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -16,6 +16,7 @@ use stackable_operator::{ fragment::{self, Fragment, ValidationError}, merge::Merge, }, + config_overrides::{KeyValueConfigOverrides, KeyValueOverridesProvider}, crd::ClusterRef, deep_merger::ObjectOverrides, k8s_openapi::{ @@ -52,6 +53,34 @@ pub const FIELD_MANAGER: &str = "zookeeper-operator"; pub const ZOOKEEPER_PROPERTIES_FILE: &str = "zoo.cfg"; pub const JVM_SECURITY_PROPERTIES_FILE: &str = "security.properties"; +/// Typed config overrides for ZooKeeper. Each field corresponds to a known config file. +#[derive(Clone, Debug, Default, Deserialize, JsonSchema, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ZookeeperConfigOverrides { + #[serde(rename = "zoo.cfg", default)] + pub zoo_cfg: KeyValueConfigOverrides, + + #[serde(rename = "security.properties", default)] + pub security_properties: KeyValueConfigOverrides, +} + +impl KeyValueOverridesProvider for ZookeeperConfigOverrides { + fn get_key_value_overrides(&self, file: &str) -> BTreeMap> { + match file { + ZOOKEEPER_PROPERTIES_FILE => self.zoo_cfg.as_product_config_overrides(), + JVM_SECURITY_PROPERTIES_FILE => self.security_properties.as_product_config_overrides(), + _ => BTreeMap::new(), + } + } +} + +pub type ZookeeperServerRoleType = Role< + v1alpha1::ZookeeperConfigFragment, + ZookeeperConfigOverrides, + ZookeeperServerRoleConfig, + JavaCommonConfig, +>; + pub const ZOOKEEPER_SERVER_PORT_NAME: &str = "zk"; pub const ZOOKEEPER_LEADER_PORT_NAME: &str = "zk-leader"; pub const ZOOKEEPER_LEADER_PORT: u16 = 2888; @@ -158,8 +187,14 @@ pub mod versioned { // no doc - it's in the struct. #[serde(skip_serializing_if = "Option::is_none")] - pub servers: - Option>, + pub servers: Option< + Role< + ZookeeperConfigFragment, + ZookeeperConfigOverrides, + ZookeeperServerRoleConfig, + JavaCommonConfig, + >, + >, } #[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] @@ -564,13 +599,7 @@ impl v1alpha1::ZookeeperCluster { } /// Returns a reference to the role. Raises an error if the role is not defined. - pub fn role( - &self, - role_variant: &ZookeeperRole, - ) -> Result< - &Role, - Error, - > { + pub fn role(&self, role_variant: &ZookeeperRole) -> Result<&ZookeeperServerRoleType, Error> { match role_variant { ZookeeperRole::Server => self.spec.servers.as_ref(), } @@ -583,7 +612,10 @@ impl v1alpha1::ZookeeperCluster { pub fn rolegroup( &self, rolegroup_ref: &RoleGroupRef, - ) -> Result, Error> { + ) -> Result< + RoleGroup, + Error, + > { let role_variant = ZookeeperRole::from_str(&rolegroup_ref.role).with_context(|_| { UnknownZookeeperRoleSnafu { role: rolegroup_ref.role.to_owned(), diff --git a/rust/operator-binary/src/crd/security.rs b/rust/operator-binary/src/crd/security.rs index 8e2d8965..12964cc4 100644 --- a/rust/operator-binary/src/crd/security.rs +++ b/rust/operator-binary/src/crd/security.rs @@ -20,6 +20,7 @@ use stackable_operator::{ }, }, client::Client, + commons::secret_class::SecretClassVolumeProvisionParts, crd::authentication::core, k8s_openapi::api::core::v1::Volume, shared::time::Duration, @@ -316,12 +317,15 @@ impl ZookeeperSecurity { ) -> Result { let volume = VolumeBuilder::new(volume_name) .ephemeral( - SecretOperatorVolumeSourceBuilder::new(secret_class_name) - .with_listener_volume_scope(LISTENER_VOLUME_NAME) - .with_format(SecretFormat::TlsPkcs12) - .with_auto_tls_cert_lifetime(*requested_secret_lifetime) - .build() - .context(BuildTlsVolumeSnafu { volume_name })?, + SecretOperatorVolumeSourceBuilder::new( + secret_class_name, + SecretClassVolumeProvisionParts::PublicPrivate, + ) + .with_listener_volume_scope(LISTENER_VOLUME_NAME) + .with_format(SecretFormat::TlsPkcs12) + .with_auto_tls_cert_lifetime(*requested_secret_lifetime) + .build() + .context(BuildTlsVolumeSnafu { volume_name })?, ) .build(); @@ -338,12 +342,15 @@ impl ZookeeperSecurity { ) -> Result { let volume = VolumeBuilder::new(volume_name) .ephemeral( - SecretOperatorVolumeSourceBuilder::new(secret_class_name) - .with_pod_scope() - .with_format(SecretFormat::TlsPkcs12) - .with_auto_tls_cert_lifetime(*requested_secret_lifetime) - .build() - .context(BuildTlsVolumeSnafu { volume_name })?, + SecretOperatorVolumeSourceBuilder::new( + secret_class_name, + SecretClassVolumeProvisionParts::PublicPrivate, + ) + .with_pod_scope() + .with_format(SecretFormat::TlsPkcs12) + .with_auto_tls_cert_lifetime(*requested_secret_lifetime) + .build() + .context(BuildTlsVolumeSnafu { volume_name })?, ) .build(); diff --git a/rust/operator-binary/src/discovery.rs b/rust/operator-binary/src/discovery.rs index 3e0f0631..f5e90a83 100644 --- a/rust/operator-binary/src/discovery.rs +++ b/rust/operator-binary/src/discovery.rs @@ -101,7 +101,7 @@ pub fn build_discovery_configmap( .with_context(|_| ObjectMissingMetadataForOwnerRefSnafu { zk: ObjectRef::from_obj(zk), })? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( owner, controller_name, &resolved_product_image.app_version_label_value, diff --git a/rust/operator-binary/src/listener.rs b/rust/operator-binary/src/listener.rs index e56902e8..06bb407f 100644 --- a/rust/operator-binary/src/listener.rs +++ b/rust/operator-binary/src/listener.rs @@ -59,7 +59,7 @@ pub fn build_role_listener( // in turn requires RoleGroup stuff) // TODO (@NickLarsenNZ): Make separate functions for with_recommended_labels with/without rolegroups // .with_labels(manual_labels).build() - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( zk, ZK_CONTROLLER_NAME, &resolved_product_image.app_version_label_value, diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 2e450fd4..75ec00e1 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -69,9 +69,9 @@ async fn main() -> anyhow::Result<()> { match opts.cmd { Command::Crd => { ZookeeperCluster::merged_crd(ZookeeperClusterVersion::V1Alpha1)? - .print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?; + .print_yaml_schema(built_info::PKG_VERSION, &SerializeOptions::default())?; ZookeeperZnode::merged_crd(ZookeeperZnodeVersion::V1Alpha1)? - .print_yaml_schema(built_info::PKG_VERSION, SerializeOptions::default())?; + .print_yaml_schema(built_info::PKG_VERSION, &SerializeOptions::default())?; } Command::Run(RunArguments { operator_environment, @@ -102,7 +102,7 @@ async fn main() -> anyhow::Result<()> { let sigterm_watcher = SignalWatcher::sigterm()?; let eos_checker = - EndOfSupportChecker::new(built_info::BUILT_TIME_UTC, maintenance.end_of_support)? + EndOfSupportChecker::new(built_info::BUILT_TIME_UTC, &maintenance.end_of_support)? .run(sigterm_watcher.handle()) .map(anyhow::Ok); diff --git a/rust/operator-binary/src/service.rs b/rust/operator-binary/src/service.rs index 1e7e4ecf..b79cac39 100644 --- a/rust/operator-binary/src/service.rs +++ b/rust/operator-binary/src/service.rs @@ -61,7 +61,7 @@ pub(crate) fn build_server_rolegroup_headless_service( .name(rolegroup.rolegroup_headless_service_name()) .ownerreference_from_resource(zk, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( zk, ZK_CONTROLLER_NAME, &resolved_product_image.app_version_label_value, @@ -119,7 +119,7 @@ pub(crate) fn build_server_rolegroup_metrics_service( .name(rolegroup.rolegroup_metrics_service_name()) .ownerreference_from_resource(zk, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( zk, ZK_CONTROLLER_NAME, &resolved_product_image.app_version_label_value, diff --git a/rust/operator-binary/src/zk_controller.rs b/rust/operator-binary/src/zk_controller.rs index 2851cb6c..5600bb01 100644 --- a/rust/operator-binary/src/zk_controller.rs +++ b/rust/operator-binary/src/zk_controller.rs @@ -378,24 +378,20 @@ pub async fn reconcile_zk( ) .context(CreateClusterResourcesSnafu)?; + let roles = HashMap::from([( + ZookeeperRole::Server.to_string(), + ( + vec![ + PropertyNameKind::Env, + PropertyNameKind::File(ZOOKEEPER_PROPERTIES_FILE.to_string()), + PropertyNameKind::File(JVM_SECURITY_PROPERTIES_FILE.to_string()), + ], + zk.spec.servers.clone().context(NoServerRoleSnafu)?, + ), + )]); let validated_config = validate_all_roles_and_groups_config( &resolved_product_image.product_version, - &transform_all_roles_to_config( - zk, - [( - ZookeeperRole::Server.to_string(), - ( - vec![ - PropertyNameKind::Env, - PropertyNameKind::File(ZOOKEEPER_PROPERTIES_FILE.to_string()), - PropertyNameKind::File(JVM_SECURITY_PROPERTIES_FILE.to_string()), - ], - zk.spec.servers.clone().context(NoServerRoleSnafu)?, - ), - )] - .into(), - ) - .context(GenerateProductConfigSnafu)?, + &transform_all_roles_to_config(zk, &roles).context(GenerateProductConfigSnafu)?, &ctx.product_config, false, false, @@ -627,7 +623,7 @@ fn build_server_rolegroup_config_map( .name(rolegroup.object_name()) .ownerreference_from_resource(zk, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( zk, ZK_CONTROLLER_NAME, &resolved_product_image.app_version_label_value, @@ -727,7 +723,7 @@ fn build_server_rolegroup_statefulset( let mut pod_builder = PodBuilder::new(); // Used for PVC templates that cannot be modified once they are deployed - let unversioned_recommended_labels = Labels::recommended(build_recommended_labels( + let unversioned_recommended_labels = Labels::recommended(&build_recommended_labels( zk, ZK_CONTROLLER_NAME, // A version value is required, but we need to use something constant so that we don't run into immutabile field issues. @@ -902,7 +898,7 @@ fn build_server_rolegroup_statefulset( .build(); let pb_metadata = ObjectMetaBuilder::new() - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( zk, ZK_CONTROLLER_NAME, &resolved_product_image.app_version_label_value, @@ -1016,7 +1012,7 @@ fn build_server_rolegroup_statefulset( .name(rolegroup_ref.object_name()) .ownerreference_from_resource(zk, None, Some(true)) .context(ObjectMissingMetadataForOwnerRefSnafu)? - .with_recommended_labels(build_recommended_labels( + .with_recommended_labels(&build_recommended_labels( zk, ZK_CONTROLLER_NAME, &resolved_product_image.app_version_label_value, @@ -1152,24 +1148,20 @@ mod tests { .resolve(DOCKER_IMAGE_BASE_NAME, "0.0.0-dev") .expect("test resolved product image is always valid"); + let roles = HashMap::from([( + ZookeeperRole::Server.to_string(), + ( + vec![ + PropertyNameKind::Env, + PropertyNameKind::File(ZOOKEEPER_PROPERTIES_FILE.to_string()), + PropertyNameKind::File(JVM_SECURITY_PROPERTIES_FILE.to_string()), + ], + zookeeper.spec.servers.clone().unwrap(), + ), + )]); let validated_config = validate_all_roles_and_groups_config( &resolved_product_image.product_version, - &transform_all_roles_to_config( - &zookeeper, - [( - ZookeeperRole::Server.to_string(), - ( - vec![ - PropertyNameKind::Env, - PropertyNameKind::File(ZOOKEEPER_PROPERTIES_FILE.to_string()), - PropertyNameKind::File(JVM_SECURITY_PROPERTIES_FILE.to_string()), - ], - zookeeper.spec.servers.clone().unwrap(), - ), - )] - .into(), - ) - .unwrap(), + &transform_all_roles_to_config(&zookeeper, &roles).unwrap(), // Using this instead of ProductConfigManager::from_yaml_file, as that did not find the file &ProductConfigManager::from_str(include_str!( "../../../deploy/config-spec/properties.yaml" From 8a47f0aee9a9f1cd4e32ea935c92f70af5a63a87 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Sun, 26 Apr 2026 14:35:06 +0200 Subject: [PATCH 2/2] chore: Upgrade rustls-webpki --- Cargo.lock | 4 ++-- Cargo.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2e272db3..6ae28425 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2443,9 +2443,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", "rustls-pki-types", diff --git a/Cargo.nix b/Cargo.nix index 196f376a..01f016ce 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -8163,9 +8163,9 @@ rec { }; "rustls-webpki" = rec { crateName = "rustls-webpki"; - version = "0.103.9"; + version = "0.103.13"; edition = "2021"; - sha256 = "0lwg1nnyv7pp2lfwwjhy81bxm233am99jnsp3iymdhd6k8827pyp"; + sha256 = "0vkm7z9pnxz5qz66p2kmyy2pwx0g4jnsbqk5xzfhs4czcjl2ki31"; libName = "webpki"; dependencies = [ {