From 382552a54803efa000d21631a5895772de22ee4b Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Mon, 12 Jan 2026 14:21:14 +0100 Subject: [PATCH 1/4] chore: Bump to stackable-operator 0.101.2 --- Cargo.lock | 95 +++++--- Cargo.nix | 223 ++++++++++++++---- Cargo.toml | 5 +- crate-hashes.json | 23 +- extra/crds.yaml | 1 - rust/operator-binary/src/main.rs | 26 +- .../src/webhooks/conversion.rs | 44 ++-- 7 files changed, 284 insertions(+), 133 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5266e0a5..a1cbbc5a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -498,9 +498,9 @@ dependencies = [ [[package]] name = "convert_case" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" dependencies = [ "unicode-segmentation", ] @@ -605,8 +605,18 @@ version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cdf337090841a411e2a7f3deb9187445851f91b309c0c0a29e05f74a00a48c0" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.21.3", + "darling_macro 0.21.3", +] + +[[package]] +name = "darling" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" +dependencies = [ + "darling_core 0.23.0", + "darling_macro 0.23.0", ] [[package]] @@ -623,13 +633,37 @@ dependencies = [ "syn 2.0.107", ] +[[package]] +name = "darling_core" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.107", +] + [[package]] name = "darling_macro" version = "0.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ - "darling_core", + "darling_core 0.21.3", + "quote", + "syn 2.0.107", +] + +[[package]] +name = "darling_macro" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" +dependencies = [ + "darling_core 0.23.0", "quote", "syn 2.0.107", ] @@ -1644,9 +1678,9 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ - "darling", + "darling 0.23.0", "regex", "snafu 0.8.9", ] @@ -1672,8 +1706,7 @@ dependencies = [ [[package]] name = "kube" version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e7bb0b6a46502cc20e4575b6ff401af45cfea150b34ba272a3410b78aa014e" +source = "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#26543e85dc7daaf82d8f7dbd902b26775798879e" dependencies = [ "k8s-openapi", "kube-client", @@ -1685,8 +1718,7 @@ dependencies = [ [[package]] name = "kube-client" version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4987d57a184d2b5294fdad3d7fc7f278899469d21a4da39a8f6ca16426567a36" +source = "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#26543e85dc7daaf82d8f7dbd902b26775798879e" dependencies = [ "base64", "bytes", @@ -1721,8 +1753,7 @@ dependencies = [ [[package]] name = "kube-core" version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914bbb770e7bb721a06e3538c0edd2babed46447d128f7c21caa68747060ee73" +source = "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#26543e85dc7daaf82d8f7dbd902b26775798879e" dependencies = [ "chrono", "derive_more", @@ -1740,10 +1771,9 @@ dependencies = [ [[package]] name = "kube-derive" version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03dee8252be137772a6ab3508b81cd797dee62ee771112a2453bc85cbbe150d2" +source = "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#26543e85dc7daaf82d8f7dbd902b26775798879e" dependencies = [ - "darling", + "darling 0.21.3", "proc-macro2", "quote", "serde", @@ -1754,8 +1784,7 @@ dependencies = [ [[package]] name = "kube-runtime" version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aea4de4b562c5cc89ab10300bb63474ae1fa57ff5a19275f2e26401a323e3fd" +source = "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#26543e85dc7daaf82d8f7dbd902b26775798879e" dependencies = [ "ahash", "async-broadcast", @@ -3365,7 +3394,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "const-oid", "ecdsa", @@ -3408,8 +3437,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.100.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +version = "0.101.2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "chrono", "clap", @@ -3434,7 +3463,7 @@ dependencies = [ "snafu 0.8.9", "stackable-operator-derive", "stackable-shared", - "stackable-telemetry 0.6.1 (git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3)", + "stackable-telemetry 0.6.1 (git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2)", "stackable-versioned", "stackable-webhook", "strum", @@ -3448,9 +3477,9 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ - "darling", + "darling 0.23.0", "proc-macro2", "quote", "syn 2.0.107", @@ -3529,7 +3558,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "chrono", "k8s-openapi", @@ -3546,7 +3575,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "axum", "clap", @@ -3594,7 +3623,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "schemars", "serde", @@ -3607,10 +3636,10 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "convert_case", - "darling", + "darling 0.23.0", "indoc", "itertools 0.14.0", "k8s-openapi", @@ -3623,10 +3652,11 @@ dependencies = [ [[package]] name = "stackable-webhook" -version = "0.7.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#d74c0ce53a12375876c489996c262f6037c099d2" +version = "0.8.1" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" dependencies = [ "arc-swap", + "async-trait", "axum", "futures-util", "hyper", @@ -3636,11 +3666,12 @@ dependencies = [ "opentelemetry 0.31.0", "opentelemetry-semantic-conventions 0.31.0", "rand 0.9.2", + "serde", "serde_json", "snafu 0.8.9", "stackable-certs", "stackable-shared", - "stackable-telemetry 0.6.1 (git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3)", + "stackable-telemetry 0.6.1 (git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2)", "tokio", "tokio-rustls", "tower", diff --git a/Cargo.nix b/Cargo.nix index 0a890cd1..66f1b854 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -1631,9 +1631,9 @@ rec { }; "convert_case" = rec { crateName = "convert_case"; - version = "0.8.0"; + version = "0.10.0"; edition = "2021"; - sha256 = "17zqy79xlr1n7nc0n1mlnw5qpp8l2nbxrk13jixrhlavrbna1ams"; + sha256 = "1fff1x78mp2c233g68my0ag0zrmjdbym8bfyahjbfy4cxza5hd33"; authors = [ "rutrum " ]; @@ -1643,10 +1643,7 @@ rec { packageId = "unicode-segmentation"; } ]; - features = { - "rand" = [ "dep:rand" ]; - "random" = [ "rand" ]; - }; + }; "core-foundation 0.10.1" = rec { crateName = "core-foundation"; @@ -1929,7 +1926,7 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; - "darling" = rec { + "darling 0.21.3" = rec { crateName = "darling"; version = "0.21.3"; edition = "2021"; @@ -1940,11 +1937,37 @@ rec { dependencies = [ { name = "darling_core"; - packageId = "darling_core"; + packageId = "darling_core 0.21.3"; + } + { + name = "darling_macro"; + packageId = "darling_macro 0.21.3"; + } + ]; + features = { + "default" = [ "suggestions" ]; + "diagnostics" = [ "darling_core/diagnostics" ]; + "serde" = [ "darling_core/serde" ]; + "suggestions" = [ "darling_core/suggestions" ]; + }; + resolvedDefaultFeatures = [ "default" "suggestions" ]; + }; + "darling 0.23.0" = rec { + crateName = "darling"; + version = "0.23.0"; + edition = "2021"; + sha256 = "179fj6p6ajw4dnkrik51wjhifxwy02x5zhligyymcb905zd17bi5"; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "darling_core"; + packageId = "darling_core 0.23.0"; } { name = "darling_macro"; - packageId = "darling_macro"; + packageId = "darling_macro 0.23.0"; } ]; features = { @@ -1955,7 +1978,7 @@ rec { }; resolvedDefaultFeatures = [ "default" "suggestions" ]; }; - "darling_core" = rec { + "darling_core 0.21.3" = rec { crateName = "darling_core"; version = "0.21.3"; edition = "2021"; @@ -1998,7 +2021,46 @@ rec { }; resolvedDefaultFeatures = [ "strsim" "suggestions" ]; }; - "darling_macro" = rec { + "darling_core 0.23.0" = rec { + crateName = "darling_core"; + version = "0.23.0"; + edition = "2021"; + sha256 = "1c033vrks38vpw8kwgd5w088dsr511kfz55n9db56prkgh7sarcq"; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "ident_case"; + packageId = "ident_case"; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "strsim"; + packageId = "strsim"; + optional = true; + } + { + name = "syn"; + packageId = "syn 2.0.107"; + features = [ "full" "extra-traits" ]; + } + ]; + features = { + "serde" = [ "dep:serde" ]; + "strsim" = [ "dep:strsim" ]; + "suggestions" = [ "strsim" ]; + }; + resolvedDefaultFeatures = [ "strsim" "suggestions" ]; + }; + "darling_macro 0.21.3" = rec { crateName = "darling_macro"; version = "0.21.3"; edition = "2021"; @@ -2010,7 +2072,32 @@ rec { dependencies = [ { name = "darling_core"; - packageId = "darling_core"; + packageId = "darling_core 0.21.3"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.107"; + } + ]; + + }; + "darling_macro 0.23.0" = rec { + crateName = "darling_macro"; + version = "0.23.0"; + edition = "2021"; + sha256 = "13fvzji9xyp304mgq720z5l0xgm54qj68jibwscagkynggn88fdc"; + procMacro = true; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "darling_core"; + packageId = "darling_core 0.23.0"; } { name = "quote"; @@ -3517,15 +3604,15 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-telemetry@0.6.1" = rec { + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-telemetry@0.6.1" = rec { crateName = "stackable-telemetry"; version = "0.6.1"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_telemetry"; authors = [ @@ -5459,8 +5546,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "k8s_version"; authors = [ @@ -5469,7 +5556,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.23.0"; optional = true; } { @@ -5542,7 +5629,12 @@ rec { crateName = "kube"; version = "2.0.1"; edition = "2024"; - sha256 = "0kh1m9w0nhd3fai4pcshl7z5rx0s83zvcxa51v12ql26d85vprs8"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/kube-rs"; + rev = "26543e85dc7daaf82d8f7dbd902b26775798879e"; + sha256 = "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf"; + }; authors = [ "clux " "Natalie Klestrup Röijezon " @@ -5609,13 +5701,18 @@ rec { "webpki-roots" = [ "kube-client/webpki-roots" "client" ]; "ws" = [ "kube-client/ws" "kube-core/ws" ]; }; - resolvedDefaultFeatures = [ "client" "config" "derive" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "ring" "runtime" "rustls-tls" ]; + resolvedDefaultFeatures = [ "admission" "client" "config" "derive" "jsonpatch" "kube-client" "kube-derive" "kube-runtime" "ring" "runtime" "rustls-tls" ]; }; "kube-client" = rec { crateName = "kube-client"; version = "2.0.1"; edition = "2024"; - sha256 = "0dksaqk698bciyda6k8ss9lr92bqyb3pygddzna54asd31xdb1s9"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/kube-rs"; + rev = "26543e85dc7daaf82d8f7dbd902b26775798879e"; + sha256 = "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf"; + }; libName = "kube_client"; authors = [ "clux " @@ -5848,7 +5945,12 @@ rec { crateName = "kube-core"; version = "2.0.1"; edition = "2024"; - sha256 = "0wzfc1q78s5a3k1gfa6i8xjd9gmssbnw0f1mdsh23dvv1rvvnjwi"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/kube-rs"; + rev = "26543e85dc7daaf82d8f7dbd902b26775798879e"; + sha256 = "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf"; + }; libName = "kube_core"; authors = [ "clux " @@ -5924,13 +6026,18 @@ rec { "schema" = [ "schemars" ]; "schemars" = [ "dep:schemars" ]; }; - resolvedDefaultFeatures = [ "json-patch" "jsonpatch" "schema" "schemars" ]; + resolvedDefaultFeatures = [ "admission" "json-patch" "jsonpatch" "schema" "schemars" ]; }; "kube-derive" = rec { crateName = "kube-derive"; version = "2.0.1"; edition = "2024"; - sha256 = "1ljhw6xmrj1v8ni144bpxrifwzbrrn0qnl5kd8m7fdz15cjyiph3"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/kube-rs"; + rev = "26543e85dc7daaf82d8f7dbd902b26775798879e"; + sha256 = "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf"; + }; procMacro = true; libName = "kube_derive"; authors = [ @@ -5941,7 +6048,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.21.3"; } { name = "proc-macro2"; @@ -5979,7 +6086,12 @@ rec { crateName = "kube-runtime"; version = "2.0.1"; edition = "2024"; - sha256 = "1zg34fih2r72y9sr58gmgyjizbkl6jv0nc0hmf4wrib2npj4vska"; + workspace_member = null; + src = pkgs.fetchgit { + url = "https://github.com/stackabletech/kube-rs"; + rev = "26543e85dc7daaf82d8f7dbd902b26775798879e"; + sha256 = "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf"; + }; libName = "kube_runtime"; authors = [ "clux " @@ -11456,8 +11568,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_certs"; authors = [ @@ -11484,7 +11596,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "p256"; @@ -11637,13 +11749,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.100.3"; + version = "0.101.2"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_operator"; authors = [ @@ -11688,7 +11800,7 @@ rec { } { name = "stackable-telemetry"; - packageId = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-telemetry@0.6.1"; + packageId = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-telemetry@0.6.1"; optional = true; features = [ "clap" ]; } @@ -11714,7 +11826,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "product-config"; @@ -11816,8 +11928,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -11827,7 +11939,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.23.0"; } { name = "proc-macro2"; @@ -12146,8 +12258,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_shared"; authors = [ @@ -12170,7 +12282,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "schemars"; @@ -12228,8 +12340,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_versioned"; authors = [ @@ -12272,8 +12384,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -12287,7 +12399,7 @@ rec { } { name = "darling"; - packageId = "darling"; + packageId = "darling 0.23.0"; } { name = "indoc"; @@ -12312,7 +12424,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "proc-macro2"; @@ -12331,13 +12443,13 @@ rec { }; "stackable-webhook" = rec { crateName = "stackable-webhook"; - version = "0.7.1"; + version = "0.8.1"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "d74c0ce53a12375876c489996c262f6037c099d2"; - sha256 = "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb"; + rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; + sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; }; libName = "stackable_webhook"; authors = [ @@ -12348,6 +12460,10 @@ rec { name = "arc-swap"; packageId = "arc-swap"; } + { + name = "async-trait"; + packageId = "async-trait"; + } { name = "axum"; packageId = "axum"; @@ -12359,7 +12475,7 @@ rec { } { name = "stackable-telemetry"; - packageId = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-telemetry@0.6.1"; + packageId = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-telemetry@0.6.1"; } { name = "hyper"; @@ -12380,7 +12496,7 @@ rec { name = "kube"; packageId = "kube"; usesDefaultFeatures = false; - features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" "ring" ]; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; } { name = "opentelemetry"; @@ -12394,6 +12510,11 @@ rec { name = "rand"; packageId = "rand 0.9.2"; } + { + name = "serde"; + packageId = "serde"; + features = [ "derive" ]; + } { name = "serde_json"; packageId = "serde_json"; diff --git a/Cargo.toml b/Cargo.toml index 701c2290..e37a2bfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ edition = "2021" repository = "https://github.com/stackabletech/secret-operator" [workspace.dependencies] -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = ["time", "telemetry", "versioned", "webhook"], tag = "stackable-operator-0.100.3" } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.101.2", features = ["time", "telemetry", "versioned", "webhook"] } krb5 = { git = "https://github.com/stackabletech/krb5-rs.git", tag = "v0.1.0" } anyhow = "1.0" @@ -23,7 +23,8 @@ const_format = "0.2.34" futures = { version = "0.3", features = ["compat"] } h2 = "0.4" hex = "0.4" -kube-runtime = { version = "2.0", features = ["unstable-runtime-stream-control"] } +# This version needs to match the kube version that is re-exported by stackable-operator! +kube-runtime = { git = "https://github.com/stackabletech/kube-rs", branch = "2.0.1-fix-schema-hoisting", version = "=2.0.1", features = ["unstable-runtime-stream-control"] } ldap3 = { version = "0.11", default-features = false, features = ["gssapi", "tls"] } libc = "0.2" native-tls = "0.2" diff --git a/crate-hashes.json b/crate-hashes.json index ac2c4653..892056f1 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,15 +1,20 @@ { "git+https://github.com/stackabletech/krb5-rs.git?tag=v0.1.0#krb5-sys@0.1.0": "148zr0q04163hpirkrff5q7cbxqgwzzxh0091zr4g23x7l64jh39", "git+https://github.com/stackabletech/krb5-rs.git?tag=v0.1.0#krb5@0.1.0": "148zr0q04163hpirkrff5q7cbxqgwzzxh0091zr4g23x7l64jh39", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#k8s-version@0.1.3": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-certs@0.4.0": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-operator-derive@0.3.1": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-operator@0.100.3": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-shared@0.0.3": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-telemetry@0.6.1": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-versioned-macros@0.8.3": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-versioned@0.8.3": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.100.3#stackable-webhook@0.7.1": "0w54yii3chcw18lkl3bm1ay504vf0m8ais8mrifzvas2vcxibbzb", + "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-client@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", + "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-core@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", + "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-derive@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", + "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-runtime@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", + "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#k8s-version@0.1.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-certs@0.4.0": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-operator-derive@0.3.1": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-operator@0.101.2": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-shared@0.0.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-telemetry@0.6.1": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-versioned-macros@0.8.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-versioned@0.8.3": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#stackable-webhook@0.8.1": "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j", "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-telemetry-0.6.1#stackable-telemetry@0.6.1": "0hiymhr40ix4jv9dmvp5d009xs6v0frvllr2xkf5mw43rcg44mgd", "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 79abcc4a..9244e613 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -901,7 +901,6 @@ spec: - tls-pem - tls-pkcs12 - kerberos - - null nullable: true type: string secretClassName: diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index a819793a..2ee55d02 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -33,7 +33,7 @@ use utils::{TonicUnixStream, uds_bind_private}; use crate::{ crd::{SecretClass, SecretClassVersion, TrustStore, TrustStoreVersion, v1alpha2}, - webhooks::conversion::create_webhook_and_maintainer, + webhooks::conversion::create_webhook_server, }; mod backend; @@ -202,21 +202,16 @@ async fn main() -> anyhow::Result<()> { RunMode::Controller(ControllerArguments { tls_secretclass_ca_secret_namespace, }) => { - let (conversion_webhook, crd_maintainer, initial_reconcile_rx) = - create_webhook_and_maintainer( - &operator_environment, - maintenance.disable_crd_maintenance, - client.as_kube_client(), - ) - .await?; - - let conversion_webhook = conversion_webhook - .run() - .map_err(|err| anyhow!(err).context("failed to run conversion webhook")); + let (webhook_server, initial_reconcile_rx) = create_webhook_server( + &operator_environment, + maintenance.disable_crd_maintenance, + client.as_kube_client(), + ) + .await?; - let crd_maintainer = crd_maintainer + let webhook_server = webhook_server .run() - .map_err(|err| anyhow!(err).context("failed to run CRD maintainer")); + .map_err(|err| anyhow!(err).context("failed to run webhook server")); let ca_secret_namespace = tls_secretclass_ca_secret_namespace .unwrap_or(operator_environment.operator_namespace.clone()); @@ -236,8 +231,7 @@ async fn main() -> anyhow::Result<()> { try_join!( truststore_controller, default_secretclass, - conversion_webhook, - crd_maintainer, + webhook_server, eos_checker, )?; } diff --git a/rust/operator-binary/src/webhooks/conversion.rs b/rust/operator-binary/src/webhooks/conversion.rs index b681cb8e..0a33c36c 100644 --- a/rust/operator-binary/src/webhooks/conversion.rs +++ b/rust/operator-binary/src/webhooks/conversion.rs @@ -3,8 +3,8 @@ use stackable_operator::{ cli::OperatorEnvironmentOptions, kube::{Client, core::crd::MergeError}, webhook::{ - maintainer::CustomResourceDefinitionMaintainer, - servers::{ConversionWebhookError, ConversionWebhookServer}, + WebhookServer, WebhookServerError, WebhookServerOptions, + webhooks::{ConversionWebhook, ConversionWebhookOptions}, }, }; use tokio::sync::oneshot; @@ -22,23 +22,16 @@ pub enum Error { MergeCrd { source: MergeError }, #[snafu(display("failed to create conversion webhook server"))] - CreateConversionWebhook { source: ConversionWebhookError }, + CreateWebhookServer { source: WebhookServerError }, } /// Creates and returns a [`ConversionWebhookServer`] and a [`CustomResourceDefinitionMaintainer`]. -pub async fn create_webhook_and_maintainer<'a>( +pub async fn create_webhook_server<'a>( operator_environment: &'a OperatorEnvironmentOptions, disable_crd_maintenance: bool, client: Client, -) -> Result< - ( - ConversionWebhookServer, - CustomResourceDefinitionMaintainer<'a>, - oneshot::Receiver<()>, - ), - Error, -> { - let crds_and_handlers = [ +) -> Result<(WebhookServer, oneshot::Receiver<()>), Error> { + let crds_and_handlers = vec![ ( SecretClass::merged_crd(SecretClassVersion::V1Alpha2).context(MergeCrdSnafu)?, SecretClass::try_convert as fn(_) -> _, @@ -49,14 +42,21 @@ pub async fn create_webhook_and_maintainer<'a>( ), ]; - ConversionWebhookServer::with_maintainer( - crds_and_handlers, - &operator_environment.operator_service_name, - &operator_environment.operator_namespace, - FIELD_MANAGER, + let conversion_webhook_options = ConversionWebhookOptions { disable_crd_maintenance, - client, - ) - .await - .context(CreateConversionWebhookSnafu) + field_manager: FIELD_MANAGER.to_owned(), + }; + let (conversion_webhook, initial_reconcile_rx) = + ConversionWebhook::new(crds_and_handlers, client, conversion_webhook_options); + + let webhook_options = WebhookServerOptions { + socket_addr: WebhookServer::DEFAULT_SOCKET_ADDRESS, + webhook_namespace: operator_environment.operator_namespace.to_owned(), + webhook_service_name: operator_environment.operator_service_name.to_owned(), + }; + let webhook_server = WebhookServer::new(vec![Box::new(conversion_webhook)], webhook_options) + .await + .context(CreateWebhookServerSnafu)?; + + Ok((webhook_server, initial_reconcile_rx)) } From 2b98848a0ac61c51e775741621529c9f0414af90 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 13 Jan 2026 09:09:43 +0100 Subject: [PATCH 2/4] clippy --- rust/operator-binary/src/webhooks/conversion.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/operator-binary/src/webhooks/conversion.rs b/rust/operator-binary/src/webhooks/conversion.rs index 0a33c36c..2a99dbba 100644 --- a/rust/operator-binary/src/webhooks/conversion.rs +++ b/rust/operator-binary/src/webhooks/conversion.rs @@ -26,8 +26,8 @@ pub enum Error { } /// Creates and returns a [`ConversionWebhookServer`] and a [`CustomResourceDefinitionMaintainer`]. -pub async fn create_webhook_server<'a>( - operator_environment: &'a OperatorEnvironmentOptions, +pub async fn create_webhook_server( + operator_environment: &OperatorEnvironmentOptions, disable_crd_maintenance: bool, client: Client, ) -> Result<(WebhookServer, oneshot::Receiver<()>), Error> { From 34a854b76583a0931ddfd65b06001a97b145a031 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 13 Jan 2026 09:19:47 +0100 Subject: [PATCH 3/4] A little bit of templating (from operator-templating) --- .gitignore | 1 - .pre-commit-config.yaml | 3 +-- scripts/run-tests | 2 -- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index abc7ff9a..2dbc7ab0 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,6 @@ result image.tar tilt_options.json -local_values.yaml .direnv/ .direnvrc diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5461297f..e338a62d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,8 +15,7 @@ repos: - id: detect-private-key - repo: https://github.com/EmbarkStudios/cargo-deny - # Failing to compile cargo-deny with version >0.18.3, needs rust 1.88.0 - rev: baa02b0a0c54e0578aae6bb7c7181ad00dc290af # 0.18.3 + rev: 8d76e7e991107da82c4a59cdc362a2739539f55d # 0.18.9 hooks: - id: cargo-deny args: ["--all-features", "check", "advisories", "bans", "licenses", "sources"] diff --git a/scripts/run-tests b/scripts/run-tests index 7fa07fc5..00639f45 100755 --- a/scripts/run-tests +++ b/scripts/run-tests @@ -11,7 +11,6 @@ import shutil import subprocess import sys import tempfile -import time __version__ = "0.0.1" @@ -452,7 +451,6 @@ def main(argv) -> int: gen_tests(opts.test_suite, opts.namespace, opts.work_dir) with release_file(opts.operator, opts.skip_operator) as f: maybe_install_release(opts.skip_release, f, opts.listener_class_preset) - time.sleep(10) if opts.skip_tests: logging.info("Skip running tests.") else: From bce432cd23792cdde8466ad4e55ba0e29828afcc Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 13 Jan 2026 09:26:21 +0100 Subject: [PATCH 4/4] Fix rustdoc --- rust/operator-binary/src/webhooks/conversion.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust/operator-binary/src/webhooks/conversion.rs b/rust/operator-binary/src/webhooks/conversion.rs index 2a99dbba..0316e259 100644 --- a/rust/operator-binary/src/webhooks/conversion.rs +++ b/rust/operator-binary/src/webhooks/conversion.rs @@ -25,7 +25,8 @@ pub enum Error { CreateWebhookServer { source: WebhookServerError }, } -/// Creates and returns a [`ConversionWebhookServer`] and a [`CustomResourceDefinitionMaintainer`]. +/// Creates and returns a [`WebhookServer`] and a [`oneshot::Receiver`] that is fired once the CRDs +/// are initially reconciled. pub async fn create_webhook_server( operator_environment: &OperatorEnvironmentOptions, disable_crd_maintenance: bool,