From 41154af8c61b7e61d456aa610f59209b5e88f191 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 5 Feb 2026 12:13:43 +0100 Subject: [PATCH 1/5] feat: Add graceful shutdown --- Cargo.lock | 73 +++++----------- Cargo.nix | 142 ++++++++----------------------- Cargo.toml | 2 +- crate-hashes.json | 18 ++-- rust/operator-binary/src/main.rs | 21 +++-- 5 files changed, 80 insertions(+), 176 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3f0c5d37..37e153d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1376,7 +1376,7 @@ dependencies = [ "js-sys", "log", "wasm-bindgen", - "windows-core 0.62.2", + "windows-core", ] [[package]] @@ -1648,7 +1648,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "darling 0.23.0", "regex", @@ -2509,7 +2509,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" dependencies = [ "anyhow", - "itertools 0.14.0", + "itertools 0.13.0", "proc-macro2", "quote", "syn 2.0.108", @@ -3177,7 +3177,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "const-oid", "ecdsa", @@ -3275,8 +3275,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.101.2" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +version = "0.105.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "chrono", "clap", @@ -3315,7 +3315,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "darling 0.23.0", "proc-macro2", @@ -3326,7 +3326,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "chrono", "k8s-openapi", @@ -3343,7 +3343,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "axum", "clap", @@ -3367,7 +3367,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "schemars", "serde", @@ -3380,7 +3380,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "convert_case", "darling 0.23.0", @@ -3396,8 +3396,8 @@ dependencies = [ [[package]] name = "stackable-webhook" -version = "0.8.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.101.2#13cf69454684ccf105d7377ca369d62b7b07250c" +version = "0.9.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" dependencies = [ "arc-swap", "async-trait", @@ -4141,7 +4141,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ "windows-collections", - "windows-core 0.61.2", + "windows-core", "windows-future", "windows-link 0.1.3", "windows-numerics", @@ -4153,7 +4153,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" dependencies = [ - "windows-core 0.61.2", + "windows-core", ] [[package]] @@ -4165,21 +4165,8 @@ dependencies = [ "windows-implement", "windows-interface", "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link 0.2.1", - "windows-result 0.4.1", - "windows-strings 0.5.1", + "windows-result", + "windows-strings", ] [[package]] @@ -4188,7 +4175,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link 0.1.3", "windows-threading", ] @@ -4233,7 +4220,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" dependencies = [ - "windows-core 0.61.2", + "windows-core", "windows-link 0.1.3", ] @@ -4244,8 +4231,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" dependencies = [ "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", + "windows-result", + "windows-strings", ] [[package]] @@ -4257,15 +4244,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows-strings" version = "0.4.2" @@ -4275,15 +4253,6 @@ dependencies = [ "windows-link 0.1.3", ] -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link 0.2.1", -] - [[package]] name = "windows-sys" version = "0.52.0" diff --git a/Cargo.nix b/Cargo.nix index bb5bca64..4bc02c0b 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4441,7 +4441,7 @@ rec { } { name = "windows-core"; - packageId = "windows-core 0.62.2"; + packageId = "windows-core"; target = { target, features }: ("windows" == target."os" or null); } ]; @@ -4968,6 +4968,7 @@ rec { "default" = [ "use_std" ]; "use_std" = [ "use_alloc" "either/use_std" ]; }; + resolvedDefaultFeatures = [ "default" "use_alloc" "use_std" ]; }; "itertools 0.14.0" = rec { crateName = "itertools"; @@ -5244,8 +5245,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; libName = "k8s_version"; authors = [ @@ -8247,7 +8248,7 @@ rec { } { name = "itertools"; - packageId = "itertools 0.14.0"; + packageId = "itertools 0.13.0"; } { name = "proc-macro2"; @@ -10580,8 +10581,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; libName = "stackable_certs"; authors = [ @@ -10980,13 +10981,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.101.2"; + version = "0.105.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; libName = "stackable_operator"; authors = [ @@ -11159,8 +11160,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -11194,8 +11195,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; libName = "stackable_shared"; authors = [ @@ -11276,8 +11277,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; libName = "stackable_telemetry"; authors = [ @@ -11386,8 +11387,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; libName = "stackable_versioned"; authors = [ @@ -11430,8 +11431,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -11489,13 +11490,13 @@ rec { }; "stackable-webhook" = rec { crateName = "stackable-webhook"; - version = "0.8.1"; + version = "0.9.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "13cf69454684ccf105d7377ca369d62b7b07250c"; - sha256 = "09nmd5pqrmc49dzm7y26qlh1np528d9xq4q8vm4d04sd8z9rd46j"; + rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; + sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; }; libName = "stackable_webhook"; authors = [ @@ -14456,7 +14457,7 @@ rec { } { name = "windows-core"; - packageId = "windows-core 0.61.2"; + packageId = "windows-core"; usesDefaultFeatures = false; } { @@ -15180,7 +15181,7 @@ rec { dependencies = [ { name = "windows-core"; - packageId = "windows-core 0.61.2"; + packageId = "windows-core"; usesDefaultFeatures = false; } ]; @@ -15188,7 +15189,7 @@ rec { "default" = [ "std" ]; }; }; - "windows-core 0.61.2" = rec { + "windows-core" = rec { crateName = "windows-core"; version = "0.61.2"; edition = "2021"; @@ -15215,51 +15216,12 @@ rec { } { name = "windows-result"; - packageId = "windows-result 0.3.4"; + packageId = "windows-result"; usesDefaultFeatures = false; } { name = "windows-strings"; - packageId = "windows-strings 0.4.2"; - usesDefaultFeatures = false; - } - ]; - features = { - "default" = [ "std" ]; - "std" = [ "windows-result/std" "windows-strings/std" ]; - }; - resolvedDefaultFeatures = [ "std" ]; - }; - "windows-core 0.62.2" = rec { - crateName = "windows-core"; - version = "0.62.2"; - edition = "2021"; - sha256 = "1swxpv1a8qvn3bkxv8cn663238h2jccq35ff3nsj61jdsca3ms5q"; - libName = "windows_core"; - dependencies = [ - { - name = "windows-implement"; - packageId = "windows-implement"; - usesDefaultFeatures = false; - } - { - name = "windows-interface"; - packageId = "windows-interface"; - usesDefaultFeatures = false; - } - { - name = "windows-link"; - packageId = "windows-link 0.2.1"; - usesDefaultFeatures = false; - } - { - name = "windows-result"; - packageId = "windows-result 0.4.1"; - usesDefaultFeatures = false; - } - { - name = "windows-strings"; - packageId = "windows-strings 0.5.1"; + packageId = "windows-strings"; usesDefaultFeatures = false; } ]; @@ -15278,7 +15240,7 @@ rec { dependencies = [ { name = "windows-core"; - packageId = "windows-core 0.61.2"; + packageId = "windows-core"; usesDefaultFeatures = false; } { @@ -15378,7 +15340,7 @@ rec { dependencies = [ { name = "windows-core"; - packageId = "windows-core 0.61.2"; + packageId = "windows-core"; usesDefaultFeatures = false; } { @@ -15408,12 +15370,12 @@ rec { } { name = "windows-result"; - packageId = "windows-result 0.3.4"; + packageId = "windows-result"; usesDefaultFeatures = false; } { name = "windows-strings"; - packageId = "windows-strings 0.4.2"; + packageId = "windows-strings"; usesDefaultFeatures = false; } ]; @@ -15423,7 +15385,7 @@ rec { }; resolvedDefaultFeatures = [ "default" "std" ]; }; - "windows-result 0.3.4" = rec { + "windows-result" = rec { crateName = "windows-result"; version = "0.3.4"; edition = "2021"; @@ -15444,25 +15406,7 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; - "windows-result 0.4.1" = rec { - crateName = "windows-result"; - version = "0.4.1"; - edition = "2021"; - sha256 = "1d9yhmrmmfqh56zlj751s5wfm9a2aa7az9rd7nn5027nxa4zm0bp"; - libName = "windows_result"; - dependencies = [ - { - name = "windows-link"; - packageId = "windows-link 0.2.1"; - usesDefaultFeatures = false; - } - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "std" ]; - }; - "windows-strings 0.4.2" = rec { + "windows-strings" = rec { crateName = "windows-strings"; version = "0.4.2"; edition = "2021"; @@ -15483,24 +15427,6 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; - "windows-strings 0.5.1" = rec { - crateName = "windows-strings"; - version = "0.5.1"; - edition = "2021"; - sha256 = "14bhng9jqv4fyl7lqjz3az7vzh8pw0w4am49fsqgcz67d67x0dvq"; - libName = "windows_strings"; - dependencies = [ - { - name = "windows-link"; - packageId = "windows-link 0.2.1"; - usesDefaultFeatures = false; - } - ]; - features = { - "default" = [ "std" ]; - }; - resolvedDefaultFeatures = [ "std" ]; - }; "windows-sys 0.52.0" = rec { crateName = "windows-sys"; version = "0.52.0"; diff --git a/Cargo.toml b/Cargo.toml index e2e0689b..8629efab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ repository = "https://github.com/stackabletech/opa-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.101.2", features = [ +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.105.0", features = [ "telemetry", "versioned", "webhook", diff --git a/crate-hashes.json b/crate-hashes.json index be5b7d64..3d12a214 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -6,14 +6,14 @@ "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-operator-0.105.0#k8s-version@0.1.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-certs@0.4.0": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-operator-derive@0.3.1": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-operator@0.105.0": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-shared@0.0.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-telemetry@0.6.1": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-versioned-macros@0.8.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-versioned@0.8.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-webhook@0.9.0": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", "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/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index eba41803..fd0b154e 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -1,7 +1,7 @@ // TODO: Look into how to properly resolve `clippy::result_large_err`. // This will need changes in our and upstream error types. #![allow(clippy::result_large_err)] -use std::sync::Arc; +use std::{future::Future, sync::Arc}; use anyhow::anyhow; use clap::Parser; @@ -29,7 +29,7 @@ use stackable_operator::{ namespace::WatchNamespace, shared::yaml::SerializeOptions, telemetry::Tracing, - utils::cluster_info::KubernetesClusterInfo, + utils::{cluster_info::KubernetesClusterInfo, signal::SignalWatcher}, }; use crate::{ @@ -103,9 +103,13 @@ async fn main() -> anyhow::Result<()> { description = built_info::PKG_DESCRIPTION ); + // Watches for the SIGTERM signal and sends a signal to all receivers, which gracefully + // shuts down all concurrent tasks below (EoS checker, controller). + let sigterm_watcher = SignalWatcher::sigterm()?; + let eos_checker = EndOfSupportChecker::new(built_info::BUILT_TIME_UTC, maintenance.end_of_support)? - .run() + .run(sigterm_watcher.handle()) .map(anyhow::Ok); let product_config = product_config.load(&[ @@ -127,7 +131,7 @@ async fn main() -> anyhow::Result<()> { .await?; let webhook_server = webhook_server - .run() + .run(sigterm_watcher.handle()) .map_err(|err| anyhow!(err).context("failed to run webhook server")); let controller = create_controller( @@ -137,6 +141,7 @@ async fn main() -> anyhow::Result<()> { operator_image.clone(), operator_image, kubernetes_cluster_info, + sigterm_watcher.handle(), ) .map(anyhow::Ok); @@ -150,14 +155,17 @@ async fn main() -> anyhow::Result<()> { /// This creates an instance of a [`Controller`] which waits for incoming events and reconciles them. /// /// This is an async method and the returned future needs to be consumed to make progress. -async fn create_controller( +async fn create_controller( client: Client, product_config: ProductConfigManager, watch_namespace: WatchNamespace, opa_bundle_builder_image: String, user_info_fetcher_image: String, cluster_info: KubernetesClusterInfo, -) { + shutdown_signal: F, +) where + F: Future + Send + Sync + 'static, +{ let opa_api: Api> = watch_namespace.get_api(&client); let daemonsets_api: Api> = watch_namespace.get_api(&client); let configmaps_api: Api> = watch_namespace.get_api(&client); @@ -176,6 +184,7 @@ async fn create_controller( }, )); controller + .graceful_shutdown_on(shutdown_signal) .run( controller::reconcile_opa, controller::error_policy, From a28cd77a93fe8b9c91fdc4430f5ced9284321e28 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 5 Feb 2026 12:13:57 +0100 Subject: [PATCH 2/5] chore: Update CRD documentation --- extra/crds.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/extra/crds.yaml b/extra/crds.yaml index c096690c..aec9f053 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -824,7 +824,7 @@ spec: default: {} description: |- In the `podOverrides` property you can define a - [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core) + [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podtemplatespec-v1-core) to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides) @@ -1058,7 +1058,7 @@ spec: default: {} description: |- In the `podOverrides` property you can define a - [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core) + [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podtemplatespec-v1-core) to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides) @@ -1940,7 +1940,7 @@ spec: default: {} description: |- In the `podOverrides` property you can define a - [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core) + [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podtemplatespec-v1-core) to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides) @@ -2174,7 +2174,7 @@ spec: default: {} description: |- In the `podOverrides` property you can define a - [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core) + [PodTemplateSpec](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.34/#podtemplatespec-v1-core) to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides) From 5adfdad80b9982b1ee014054940e4a43903689d7 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 5 Feb 2026 12:14:25 +0100 Subject: [PATCH 3/5] chore: Bump bytes crate to 1.11.1 Fixes RUSTSEC-2026-0007. --- Cargo.lock | 4 ++-- Cargo.nix | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 37e153d5..b7679ea8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -333,9 +333,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" +checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" diff --git a/Cargo.nix b/Cargo.nix index 4bc02c0b..8babd942 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -1087,9 +1087,9 @@ rec { }; "bytes" = rec { crateName = "bytes"; - version = "1.10.1"; - edition = "2018"; - sha256 = "0smd4wi2yrhp5pmq571yiaqx84bjqlm1ixqhnvfwzzc6pqkn26yp"; + version = "1.11.1"; + edition = "2021"; + sha256 = "0czwlhbq8z29wq0ia87yass2mzy1y0jcasjb8ghriiybnwrqfx0y"; authors = [ "Carl Lerche " "Sean McArthur " From f8fa16ba86ad52996991d69b9a294e10f685a5ca Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 5 Feb 2026 12:15:15 +0100 Subject: [PATCH 4/5] chore: Bump git2 crate to 0.20.4 Fixes RUSTSEC-2026-0008. --- Cargo.lock | 8 ++++---- Cargo.nix | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b7679ea8..802822f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1111,9 +1111,9 @@ dependencies = [ [[package]] name = "git2" -version = "0.20.2" +version = "0.20.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2deb07a133b1520dc1a5690e9bd08950108873d7ed5de38dcc74d3b5ebffa110" +checksum = "7b88256088d75a56f8ecfa070513a775dd9107f6530ef14919dac831af9cfe2b" dependencies = [ "bitflags", "libc", @@ -1830,9 +1830,9 @@ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" [[package]] name = "libgit2-sys" -version = "0.18.2+1.9.1" +version = "0.18.3+1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c42fe03df2bd3c53a3a9c7317ad91d80c81cd1fb0caec8d7cc4cd2bfa10c222" +checksum = "c9b3acc4b91781bb0b3386669d325163746af5f6e4f73e6d2d630e09a35f3487" dependencies = [ "cc", "libc", diff --git a/Cargo.nix b/Cargo.nix index 8babd942..8be57e4c 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -3491,9 +3491,9 @@ rec { }; "git2" = rec { crateName = "git2"; - version = "0.20.2"; + version = "0.20.4"; edition = "2018"; - sha256 = "0451zzmvblvlrj6y6pgdsxrqh42hi789n3k9lp0hslmi6fhhgsrd"; + sha256 = "0azykjpk3j6s354z23jkyq3r3pbmlw9ha1zsxkw5cnnpi1h2b23v"; authors = [ "Josh Triplett " "Alex Crichton " @@ -6078,10 +6078,10 @@ rec { }; "libgit2-sys" = rec { crateName = "libgit2-sys"; - version = "0.18.2+1.9.1"; - edition = "2018"; + version = "0.18.3+1.9.2"; + edition = "2021"; links = "git2"; - sha256 = "08n223x2pkf4gj6yrjmh3z6q236qj6nifwww78xcblrbvw1zwhhw"; + sha256 = "11rlbyihj3k35mnkxxz4yvsnlx33a4r9srl66c5vp08pp72arcy9"; libName = "libgit2_sys"; libPath = "lib.rs"; authors = [ From cf25c7f20e036f01368aa1e46676bbffe9357145 Mon Sep 17 00:00:00 2001 From: Techassi Date: Thu, 5 Feb 2026 12:19:34 +0100 Subject: [PATCH 5/5] chore: Add changelog entry --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4935550..f5e0ff82 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ All notable changes to this project will be documented in this file. ### Changed +- Gracefully shutdown all concurrent tasks by forwarding the SIGTERM signal ([#804]). - Introduce `v1alpha2` OpaCluster and mark UIF Entra backend as non-experimental ([#801]). - Deprecate OPA 1.8.0 ([#797]). - user-info-fetcher: Move backend initialization and credential resolution into backend-specific implementations ([#782]). @@ -35,6 +36,7 @@ All notable changes to this project will be documented in this file. [#799]: https://github.com/stackabletech/opa-operator/pull/799 [#801]: https://github.com/stackabletech/opa-operator/pull/801 [#803]: https://github.com/stackabletech/opa-operator/pull/803 +[#804]: https://github.com/stackabletech/opa-operator/pull/804 ## [25.11.0] - 2025-11-07