From 41caf91f01c3287b251a4aa0bdace72755f4eb63 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Thu, 6 Aug 2026 14:29:09 +0200 Subject: [PATCH 1/5] chore: Remove role and role group labels where they don't apply --- CHANGELOG.md | 3 + Cargo.lock | 528 ++++++-- Cargo.nix | 1149 ++++++++++++++--- Cargo.toml | 4 +- crate-hashes.json | 18 +- extra/crds.yaml | 7 +- rust/operator-binary/src/controller/apply.rs | 10 +- .../src/controller/build/mod.rs | 81 +- .../controller/build/resource/config_map.rs | 7 +- .../src/controller/build/resource/executor.rs | 24 +- .../src/controller/build/resource/listener.rs | 19 +- .../src/controller/build/resource/pdb.rs | 10 +- .../src/controller/build/resource/rbac.rs | 23 +- .../src/controller/build/resource/service.rs | 19 +- .../controller/build/resource/statefulset.rs | 30 +- rust/operator-binary/src/controller/mod.rs | 118 +- rust/operator-binary/src/crd/mod.rs | 60 +- 17 files changed, 1560 insertions(+), 550 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fd53da5d..829bc6d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,12 +19,15 @@ the logger as well, because a logger discards records before any handler can filter them, so in that direction the UI and the other destinations open up together and cannot be set apart ([#829]). +- Remove the `app.kubernetes.io/component` and `app.kubernetes.io/role-group` labels from the + resources they don't apply to (previously set to `none`) ([#838]). [#814]: https://github.com/stackabletech/airflow-operator/pull/814 [#821]: https://github.com/stackabletech/airflow-operator/pull/821 [#827]: https://github.com/stackabletech/airflow-operator/pull/827 [#828]: https://github.com/stackabletech/airflow-operator/pull/828 [#829]: https://github.com/stackabletech/airflow-operator/pull/829 +[#838]: https://github.com/stackabletech/airflow-operator/pull/838 ## [26.7.0] - 2026-07-21 diff --git a/Cargo.lock b/Cargo.lock index 6aaa2b0a..cbab6c44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -163,13 +163,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.89" +version = "0.1.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" +checksum = "ae36dc4177970ef04fde5178d3e2429882def40e57a451f919c098f72baa6cec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] @@ -259,6 +259,12 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac07cdecf99051d9a5238b80f35af32cdeba5b336e55d957b318b50137e18da5" + [[package]] name = "base64ct" version = "1.8.3" @@ -326,6 +332,17 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures 0.3.0", + "rand_core 0.10.1", +] + [[package]] name = "chrono" version = "0.4.45" @@ -339,9 +356,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.1" +version = "4.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +checksum = "301b56658598e48f3648647ac6fc887be7e7108eddfa4e9b63fcf3ec58c0cadf" dependencies = [ "clap_builder", "clap_derive", @@ -349,9 +366,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "94a65403d1a1bd28f7dc68eb8506e8874808ee5eecb59298de588e2e1407a078" dependencies = [ "anstream", "anstyle", @@ -361,14 +378,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.1" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] @@ -383,6 +400,16 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d07550c9036bf2ae0c684c4297d503f838287c83c53686d05370d0e139ae570" +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "concurrent-queue" version = "2.5.0" @@ -462,6 +489,15 @@ dependencies = [ "libc", ] +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.5.0" @@ -514,8 +550,18 @@ version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ - "darling_core", - "darling_macro", + "darling_core 0.23.0", + "darling_macro 0.23.0", +] + +[[package]] +name = "darling" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88490bf1b990d87eaaa7ac8aa887f629a08e7359765b4911faf63c3763347d23" +dependencies = [ + "darling_core 0.24.0", + "darling_macro 0.24.0", ] [[package]] @@ -531,17 +577,41 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "darling_core" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "084e274f91c482280130e1e34e0b8d6e66776a060d7b6de7b84289ca778868c4" +dependencies = [ + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 3.0.3", +] + [[package]] name = "darling_macro" version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ - "darling_core", + "darling_core 0.23.0", "quote", "syn 2.0.118", ] +[[package]] +name = "darling_macro" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68f5792fa0d41cd2325ce0ffa64f0a340eaebd4971a3a0c5e1ffd2cc488a355e" +dependencies = [ + "darling_core 0.24.0", + "quote", + "syn 3.0.3", +] + [[package]] name = "defmt" version = "1.1.1" @@ -710,11 +780,23 @@ dependencies = [ "syn 2.0.118", ] +[[package]] +name = "educe" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e451fac8dd8dece16234604bf1efce6e90fddd8ab6ad4d66eec0eca5160959dd" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 3.0.3", +] + [[package]] name = "either" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" [[package]] name = "elliptic-curve" @@ -887,9 +969,9 @@ checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" [[package]] name = "futures" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218" dependencies = [ "futures-channel", "futures-core", @@ -902,9 +984,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" dependencies = [ "futures-core", "futures-sink", @@ -912,15 +994,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" [[package]] name = "futures-executor" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" dependencies = [ "futures-core", "futures-task", @@ -929,15 +1011,15 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" [[package]] name = "futures-macro" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" dependencies = [ "proc-macro2", "quote", @@ -946,15 +1028,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" [[package]] name = "futures-timer" @@ -964,9 +1046,9 @@ checksum = "af43fadb8a98512d547e37b4e92e0ced13e205c061b87b4623eff01d918d6968" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ "futures 0.1.31", "futures-channel", @@ -1026,6 +1108,7 @@ dependencies = [ "cfg-if", "libc", "r-efi 6.0.0", + "rand_core 0.10.1", ] [[package]] @@ -1060,9 +1143,9 @@ dependencies = [ [[package]] name = "granit-parser" -version = "0.0.3" +version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50ba32164f9e098d5da618776a32afbb32270adcbe3d3d006107dae11e37c91" +checksum = "d03f81ad4732830d85cfd417a9f62cde6dadda4354d37d078a6084a19560aa2d" dependencies = [ "arraydeque", "smallvec", @@ -1143,9 +1226,9 @@ dependencies = [ [[package]] name = "http" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", "itoa", @@ -1194,9 +1277,9 @@ checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15" [[package]] name = "hyper" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" dependencies = [ "atomic-waker", "bytes", @@ -1250,7 +1333,7 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-util", @@ -1468,11 +1551,12 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.31" +version = "0.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccfe6121cbe750cf81efa362d85c0bde7ea298ec43092d3a193baca59cdbd634" +checksum = "668b7183bd07af9a4885f5c35b0cc5c83c4607a913c16b7e17291832910d2dcc" dependencies = [ "defmt", + "jiff-core", "jiff-static", "jiff-tzdb-platform", "log", @@ -1482,12 +1566,22 @@ dependencies = [ "windows-link", ] +[[package]] +name = "jiff-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7feca88439efe53da3754500c1851dedf3cb36c524dd5cf8225cc0794de95d09" +dependencies = [ + "defmt", +] + [[package]] name = "jiff-static" -version = "0.2.31" +version = "0.2.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e165e897f662d428f3cd3828a919dbe067c2d42bb1031eede74ef9d27ecdedd2" +checksum = "3a69dcb3a21cfb32ce1cd056169337ca284af0766dd766e7878819b251a49204" dependencies = [ + "jiff-core", "proc-macro2", "quote", "syn 2.0.118", @@ -1508,6 +1602,55 @@ dependencies = [ "jiff-tzdb", ] +[[package]] +name = "jni" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5efd9a482cf3a427f00d6b35f14332adc7902ce91efb778580e180ff90fa3498" +dependencies = [ + "cfg-if", + "combine", + "jni-macros", + "jni-sys", + "log", + "simd_cesu8", + "thiserror 2.0.18", + "walkdir", + "windows-link", +] + +[[package]] +name = "jni-macros" +version = "0.22.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a00109accc170f0bdb141fed3e393c565b6f5e072365c3bd58f5b062591560a3" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "simd_cesu8", + "syn 2.0.118", +] + +[[package]] +name = "jni-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6377a88cb3910bee9b0fa88d4f42e1d2da8e79915598f65fb0c7ee14c878af2" +dependencies = [ + "jni-sys-macros", +] + +[[package]] +name = "jni-sys-macros" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38c0b942f458fe50cdac086d2f946512305e5631e720728f2a61aabcd47a6264" +dependencies = [ + "quote", + "syn 2.0.118", +] + [[package]] name = "jobserver" version = "0.1.35" @@ -1571,7 +1714,7 @@ version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9c6922f6afe80418dd6019818af5d0d34584c371780ff09b9752370c25b4abb" dependencies = [ - "base64", + "base64 0.22.1", "jiff", "schemars", "serde", @@ -1581,11 +1724,11 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ - "darling", + "darling 0.24.0", "regex", - "snafu 0.9.1", + "snafu 0.9.2", ] [[package]] @@ -1605,9 +1748,9 @@ checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" [[package]] name = "kube" -version = "4.0.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bb9108095346a7096d11feeaff419c75dddcac1b2f59acb38d7bf3d13c3e146" +checksum = "208d7fe1380066abb194812a8a8e303cb896a33bb3d7b3177b71bd03ff39bf18" dependencies = [ "k8s-openapi", "kube-client", @@ -1618,14 +1761,14 @@ dependencies = [ [[package]] name = "kube-client" -version = "4.0.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f628e05bc2264c21fe10d3d675117dc9b43ea3bf4fb07262a222679757537b" +checksum = "31e940a73033a7c5c7918b5ece7851d84571b58be25e937198da37fa13f116d3" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "either", - "futures 0.3.32", + "futures 0.3.33", "http", "http-body", "http-body-util", @@ -1639,6 +1782,7 @@ dependencies = [ "kube-core", "pem", "rustls", + "rustls-platform-verifier", "secrecy", "serde", "serde-saphyr", @@ -1653,9 +1797,9 @@ dependencies = [ [[package]] name = "kube-core" -version = "4.0.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1b02f5933ba06140d58c7d6727f6c319f0962ec6a344aa5e21e475e891deaa8" +checksum = "a9d2353c118cf3462c352ee0b5bd5b0cf17990af456dfd8662d136ff9812eeb4" dependencies = [ "derive_more", "form_urlencoded", @@ -1672,11 +1816,11 @@ dependencies = [ [[package]] name = "kube-derive" -version = "4.0.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe171898707dadf1818ef94e81ef57f6beb7edf9ba87b9e814c045dad356c7aa" +checksum = "92141c19e1fa83bf91633c1234c66b03375c29aa8ca5486331ddb47e3a3da9c0" dependencies = [ - "darling", + "darling 0.23.0", "proc-macro2", "quote", "serde", @@ -1686,16 +1830,16 @@ dependencies = [ [[package]] name = "kube-runtime" -version = "4.0.0" +version = "4.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ddec66c540c7cf29a5b41fe4a657a53687f95c346e03bdf00585b70a1bab21" +checksum = "3eb064ef71c7bea55e934a443960da9e9ec31fbb2ba63e47e4aeca32603d5cc7" dependencies = [ "ahash", "async-broadcast", "async-stream", "backon", - "educe", - "futures 0.3.32", + "educe 0.6.0", + "futures 0.3.33", "hashbrown 0.16.1", "hostname", "json-patch", @@ -2061,7 +2205,7 @@ version = "3.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d30c53c26bc5b31a98cd02d20f25a7c8567146caf63ed593a9d87b2775291be" dependencies = [ - "base64", + "base64 0.22.1", "serde_core", ] @@ -2234,9 +2378,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -2275,9 +2419,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -2314,6 +2458,17 @@ dependencies = [ "rand_core 0.9.5", ] +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "chacha20", + "getrandom 0.4.3", + "rand_core 0.10.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -2352,6 +2507,12 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "redox_syscall" version = "0.5.18" @@ -2383,9 +2544,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.4" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" dependencies = [ "aho-corasick", "memchr", @@ -2395,9 +2556,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", @@ -2422,7 +2583,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219c5811de6525e5416c7d5d53bb656d3afdbc6c5af816e0802bcfa42dbdc1c3" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-core", @@ -2566,6 +2727,33 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26d1e2536ce4f35f4846aa13bff16bd0ff40157cdb14cc056c7b14ba41233ba0" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework", + "security-framework-sys", + "webpki-root-certs", + "windows-sys 0.61.2", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.103.13" @@ -2589,6 +2777,15 @@ version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9774ba4a74de5f7b1c1451ed6cd5285a32eddb5cccb8cc655a4e50009e06477f" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.29" @@ -2600,9 +2797,9 @@ dependencies = [ [[package]] name = "schemars" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +checksum = "687274d293b6cdc6e73e0fee520bf2049650090d7164f87672d212a3c530cf4a" dependencies = [ "dyn-clone", "ref-cast", @@ -2614,14 +2811,14 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "1.2.1" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d115b50f4aaeea07e79c1912f645c7513d81715d0420f8bc77a18c6260b307f" +checksum = "d98c67716b46af2f0b8cf752abc930f6f9aecfbf671ecfb531db8a31dbe4e2ba" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] @@ -2684,9 +2881,9 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -2694,19 +2891,19 @@ dependencies = [ [[package]] name = "serde-saphyr" -version = "0.0.27" +version = "0.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5897b4c3faadadd35fdb6689f015641f3bc481d5adaaac56231ea15aeb243db3" +checksum = "7bd22781911de0ca6debda95f073c8f18bec65d1a94f1fa9573f3102e514cea4" dependencies = [ "ahash", "annotate-snippets", - "base64", + "base64 0.22.1", "encoding_rs_io", "getrandom 0.3.4", "granit-parser", "nohash-hasher", "num-traits", - "serde", + "serde_core", "smallvec", "zmij", ] @@ -2723,40 +2920,40 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] name = "serde_derive_internals" -version = "0.29.1" +version = "0.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" +checksum = "f852137cce035d6a4df67ccce505ff6b3e9fd3a10e3e52b24dc71e650bb1a9bd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] name = "serde_json" -version = "1.0.150" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "itoa", "memchr", @@ -2808,7 +3005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -2819,7 +3016,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", - "cpufeatures", + "cpufeatures 0.2.17", "digest", ] @@ -2864,6 +3061,22 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" +[[package]] +name = "simd_cesu8" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11031e251abf8611c80f460e19dbdeb54a66db918e49c65a7065b46ac7aec520" +dependencies = [ + "rustc_version", + "simdutf8", +] + +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "slab" version = "0.4.12" @@ -2888,11 +3101,11 @@ dependencies = [ [[package]] name = "snafu" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1a012328be2e3f5d5f6f3218147ca02588cea4cb865e876849ab6debcf36522" +checksum = "e45cb604038abb7b926b679887b3226d8d0f23874b66623625a0454be425a4b7" dependencies = [ - "snafu-derive 0.9.1", + "snafu-derive 0.9.2", ] [[package]] @@ -2908,9 +3121,9 @@ dependencies = [ [[package]] name = "snafu-derive" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f103c50866b8743da9429b8a581d81a27c2d3a9c4ac7df8f8571c1dd7896eda" +checksum = "287f59010008f0d7cf5e3b03196d666c1acc46c8d3e9cf34c28a1a7157601e72" dependencies = [ "heck", "proc-macro2", @@ -2959,13 +3172,13 @@ dependencies = [ "clap", "const_format", "fnv", - "futures 0.3.32", + "futures 0.3.33", "indoc", "rstest", "serde", "serde_json", "serde_yaml", - "snafu 0.9.1", + "snafu 0.9.2", "stackable-operator", "strum", "tokio", @@ -2975,19 +3188,19 @@ dependencies = [ [[package]] name = "stackable-certs" version = "0.4.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ "const-oid", "ecdsa", "k8s-openapi", "kube", "p256", - "rand 0.9.4", + "rand 0.10.2", "rand_core 0.6.4", "rsa", "sha2", "signature", - "snafu 0.9.1", + "snafu 0.9.2", "stackable-shared", "tokio", "tokio-rustls", @@ -2998,17 +3211,17 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.114.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +version = "0.115.0" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ - "base64", + "base64 0.23.1", "clap", "const_format", "delegate", "dockerfile-parser", - "educe", + "educe 0.7.6", "either", - "futures 0.3.32", + "futures 0.3.33", "http", "indexmap", "java-properties", @@ -3016,7 +3229,7 @@ dependencies = [ "json-patch", "k8s-openapi", "kube", - "rand 0.9.4", + "rand 0.10.2", "regex", "schemars", "semver", @@ -3024,7 +3237,7 @@ dependencies = [ "serde_json", "serde_yaml", "sha2", - "snafu 0.9.1", + "snafu 0.9.2", "stackable-operator-derive", "stackable-shared", "stackable-telemetry", @@ -3043,18 +3256,18 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ - "darling", + "darling 0.24.0", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] name = "stackable-shared" version = "0.1.2" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ "jiff", "k8s-openapi", @@ -3063,7 +3276,7 @@ dependencies = [ "semver", "serde", "serde_yaml", - "snafu 0.9.1", + "snafu 0.9.2", "strum", "time", ] @@ -3071,7 +3284,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.5" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ "axum", "clap", @@ -3082,7 +3295,7 @@ dependencies = [ "opentelemetry-semantic-conventions", "opentelemetry_sdk", "pin-project", - "snafu 0.9.1", + "snafu 0.9.2", "strum", "tokio", "tower", @@ -3095,25 +3308,25 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.11.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ "kube", "schemars", "serde", "serde_json", "serde_yaml", - "snafu 0.9.1", + "snafu 0.9.2", "stackable-versioned-macros", ] [[package]] name = "stackable-versioned-macros" version = "0.11.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ "convert_case", "convert_case_extras", - "darling", + "darling 0.24.0", "indoc", "itertools 0.15.0", "k8s-openapi", @@ -3121,13 +3334,13 @@ dependencies = [ "kube", "proc-macro2", "quote", - "syn 2.0.118", + "syn 3.0.3", ] [[package]] name = "stackable-webhook" version = "0.9.2" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#ee66b8d66fe10c216acfed0f81070b362604b392" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" dependencies = [ "arc-swap", "async-trait", @@ -3140,10 +3353,10 @@ dependencies = [ "kube", "opentelemetry", "opentelemetry-semantic-conventions", - "rand 0.9.4", + "rand 0.10.2", "serde", "serde_json", - "snafu 0.9.1", + "snafu 0.9.2", "stackable-certs", "stackable-shared", "stackable-telemetry", @@ -3217,6 +3430,17 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + [[package]] name = "sync_wrapper" version = "1.0.2" @@ -3288,9 +3512,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.53" +version = "0.3.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50" +checksum = "cdb87b95ec50ddfa440816d227a17b2ccbdda963a316a727fda0fc4334f7d134" dependencies = [ "deranged", "num-conv", @@ -3308,9 +3532,9 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.31" +version = "0.2.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" +checksum = "7e689342a48d2ea927c87ea50cabf8594854bf940e9310208848d680d668ed85" dependencies = [ "num-conv", "time-core", @@ -3349,9 +3573,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.52.3" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ "bytes", "libc", @@ -3447,7 +3671,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac2a5518c70fa84342385732db33fb3f44bc4cc748936eb5833d2df34d6445ef" dependencies = [ "async-trait", - "base64", + "base64 0.22.1", "bytes", "flate2", "http", @@ -3514,7 +3738,7 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4cfcf7e2740e6fc6d4d688b4ef00650406bb94adf4731e43c096c3a19fe40840" dependencies = [ - "base64", + "base64 0.22.1", "bitflags 2.13.0", "bytes", "futures-util", @@ -3743,9 +3967,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.4" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" dependencies = [ "js-sys", "wasm-bindgen", @@ -3769,6 +3993,16 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -3868,6 +4102,24 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-root-certs" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b96554aa2acc8ccdb7e1c9a58a7a68dd5d13bccc69cd124cb09406db612a1c9b" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "winapi-util" +version = "0.1.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" +dependencies = [ + "windows-sys 0.61.2", +] + [[package]] name = "windows-core" version = "0.62.2" diff --git a/Cargo.nix b/Cargo.nix index de95a38e..2f6bb309 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -489,9 +489,9 @@ rec { }; "async-trait" = rec { crateName = "async-trait"; - version = "0.1.89"; + version = "0.1.91"; edition = "2021"; - sha256 = "1fsxxmz3rzx1prn1h3rs7kyjhkap60i7xvi0ldapkvbb14nssdch"; + sha256 = "1v3cm8mzg66037wm392p1vsdx0lq8bid6y2ivr7z03lpfx0xqdmf"; procMacro = true; libName = "async_trait"; authors = [ @@ -508,7 +508,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; usesDefaultFeatures = false; features = [ "clone-impls" "full" "parsing" "printing" "proc-macro" "visit-mut" ]; } @@ -835,7 +835,7 @@ rec { }; resolvedDefaultFeatures = [ "alloc" ]; }; - "base64" = rec { + "base64 0.22.1" = rec { crateName = "base64"; version = "0.22.1"; edition = "2018"; @@ -849,6 +849,20 @@ rec { }; resolvedDefaultFeatures = [ "alloc" "default" "std" ]; }; + "base64 0.23.1" = rec { + crateName = "base64"; + version = "0.23.1"; + edition = "2021"; + sha256 = "19cdw4vh3d8qndbxjmbf6ddvmpicyddg704b4fjxjlchz7ncs1xc"; + authors = [ + "Marshall Pierce " + ]; + features = { + "default" = [ "std" "simd-unsafe" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "simd-unsafe" "std" ]; + }; "base64ct" = rec { crateName = "base64ct"; version = "1.8.3"; @@ -1023,6 +1037,41 @@ rec { "rustc-dep-of-std" = [ "core" ]; }; }; + "chacha20" = rec { + crateName = "chacha20"; + version = "0.10.1"; + edition = "2024"; + sha256 = "108aajbvs3rwl4d0pdvq3p8ydy4pwh0rxy2z265ynwkflrmla96m"; + authors = [ + "RustCrypto Developers" + ]; + dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + } + { + name = "cpufeatures"; + packageId = "cpufeatures 0.3.0"; + target = { target, features }: (("x86_64" == target."arch" or null) || ("x86" == target."arch" or null)); + } + { + name = "rand_core"; + packageId = "rand_core 0.10.1"; + optional = true; + usesDefaultFeatures = false; + } + ]; + features = { + "cipher" = [ "dep:cipher" ]; + "default" = [ "cipher" ]; + "legacy" = [ "cipher" ]; + "rng" = [ "dep:rand_core" ]; + "xchacha" = [ "cipher" ]; + "zeroize" = [ "dep:zeroize" ]; + }; + resolvedDefaultFeatures = [ "rng" ]; + }; "chrono" = rec { crateName = "chrono"; version = "0.4.45"; @@ -1074,10 +1123,10 @@ rec { }; "clap" = rec { crateName = "clap"; - version = "4.6.1"; + version = "4.6.5"; edition = "2024"; crateBin = []; - sha256 = "0lcf88l7vlg796rrqr7wipbbmfa5sgsgx4211b7xmxxv8dz13nqx"; + sha256 = "1pyaq1cfrwzwcfdlxynxiq8fgrvvi3yccyk490v8zr4qhmjmc6rh"; dependencies = [ { name = "clap_builder"; @@ -1116,9 +1165,9 @@ rec { }; "clap_builder" = rec { crateName = "clap_builder"; - version = "4.6.0"; + version = "4.6.5"; edition = "2024"; - sha256 = "17q6np22yxhh5y5v53y4l31ps3hlaz45mvz2n2nicr7n3c056jki"; + sha256 = "0y500wa2x3jqvsc95dgcbvp0hj47x038bsv8vkvjigd1s41m99ll"; dependencies = [ { name = "anstream"; @@ -1155,9 +1204,9 @@ rec { }; "clap_derive" = rec { crateName = "clap_derive"; - version = "4.6.1"; + version = "4.6.4"; edition = "2024"; - sha256 = "1acpz49hi00iv9jkapixjzcv7s51x8qkfaqscjm36rqgf428dkpj"; + sha256 = "0qd0v7pa2arwxjjinmjim6xrjy61bc28m1yryhc7zjjssswx44nh"; procMacro = true; dependencies = [ { @@ -1174,7 +1223,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; features = [ "full" ]; } ]; @@ -1199,6 +1248,53 @@ rec { sha256 = "0w75k89hw39p0mnnhlrwr23q50rza1yjki44qvh2mgrnj065a1qx"; }; + "combine" = rec { + crateName = "combine"; + version = "4.6.7"; + edition = "2018"; + sha256 = "1z8rh8wp59gf8k23ar010phgs0wgf5i8cx4fg01gwcnzfn5k0nms"; + authors = [ + "Markus Westerlind " + ]; + dependencies = [ + { + name = "bytes"; + packageId = "bytes"; + optional = true; + } + { + name = "memchr"; + packageId = "memchr"; + usesDefaultFeatures = false; + } + ]; + devDependencies = [ + { + name = "bytes"; + packageId = "bytes"; + } + ]; + features = { + "bytes" = [ "dep:bytes" ]; + "bytes_05" = [ "dep:bytes_05" ]; + "default" = [ "std" ]; + "futures-03" = [ "pin-project" "std" "futures-core-03" "futures-io-03" "pin-project-lite" ]; + "futures-core-03" = [ "dep:futures-core-03" ]; + "futures-io-03" = [ "dep:futures-io-03" ]; + "pin-project" = [ "pin-project-lite" ]; + "pin-project-lite" = [ "dep:pin-project-lite" ]; + "regex" = [ "dep:regex" ]; + "std" = [ "memchr/std" "bytes" "alloc" ]; + "tokio" = [ "tokio-dep" "tokio-util/io" "futures-core-03" "pin-project-lite" ]; + "tokio-02" = [ "pin-project" "std" "tokio-02-dep" "futures-core-03" "pin-project-lite" "bytes_05" ]; + "tokio-02-dep" = [ "dep:tokio-02-dep" ]; + "tokio-03" = [ "pin-project" "std" "tokio-03-dep" "futures-core-03" "pin-project-lite" ]; + "tokio-03-dep" = [ "dep:tokio-03-dep" ]; + "tokio-dep" = [ "dep:tokio-dep" ]; + "tokio-util" = [ "dep:tokio-util" ]; + }; + resolvedDefaultFeatures = [ "alloc" "bytes" "default" "std" ]; + }; "concurrent-queue" = rec { crateName = "concurrent-queue"; version = "2.5.0"; @@ -1386,7 +1482,7 @@ rec { }; resolvedDefaultFeatures = [ "default" "link" ]; }; - "cpufeatures" = rec { + "cpufeatures 0.2.17" = rec { crateName = "cpufeatures"; version = "0.2.17"; edition = "2018"; @@ -1421,6 +1517,42 @@ rec { } ]; + }; + "cpufeatures 0.3.0" = rec { + crateName = "cpufeatures"; + version = "0.3.0"; + edition = "2024"; + sha256 = "00fjhygsqmh4kbxxlb99mcsbspxcai6hjydv4c46pwb67wwl2alb"; + authors = [ + "RustCrypto Developers" + ]; + dependencies = [ + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("aarch64" == target."arch" or null) && ("android" == target."os" or null)); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("aarch64" == target."arch" or null) && ("linux" == target."os" or null)); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("aarch64" == target."arch" or null) && ("apple" == target."vendor" or null)); + } + { + name = "libc"; + packageId = "libc"; + usesDefaultFeatures = false; + target = { target, features }: (("loongarch64" == target."arch" or null) && ("linux" == target."os" or null)); + } + ]; + }; "crc32fast" = rec { crateName = "crc32fast"; @@ -1551,7 +1683,7 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; - "darling" = rec { + "darling 0.23.0" = rec { crateName = "darling"; version = "0.23.0"; edition = "2021"; @@ -1562,11 +1694,37 @@ rec { dependencies = [ { name = "darling_core"; - packageId = "darling_core"; + packageId = "darling_core 0.23.0"; + } + { + name = "darling_macro"; + packageId = "darling_macro 0.23.0"; + } + ]; + features = { + "default" = [ "suggestions" ]; + "diagnostics" = [ "darling_core/diagnostics" ]; + "serde" = [ "darling_core/serde" ]; + "suggestions" = [ "darling_core/suggestions" ]; + }; + resolvedDefaultFeatures = [ "default" "suggestions" ]; + }; + "darling 0.24.0" = rec { + crateName = "darling"; + version = "0.24.0"; + edition = "2021"; + sha256 = "08vx6iikfg7nz88ljnvnb5rqx819ys3si2mclym7xn4hp7qhnjc8"; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "darling_core"; + packageId = "darling_core 0.24.0"; } { name = "darling_macro"; - packageId = "darling_macro"; + packageId = "darling_macro 0.24.0"; } ]; features = { @@ -1577,7 +1735,7 @@ rec { }; resolvedDefaultFeatures = [ "default" "suggestions" ]; }; - "darling_core" = rec { + "darling_core 0.23.0" = rec { crateName = "darling_core"; version = "0.23.0"; edition = "2021"; @@ -1616,7 +1774,46 @@ rec { }; resolvedDefaultFeatures = [ "strsim" "suggestions" ]; }; - "darling_macro" = rec { + "darling_core 0.24.0" = rec { + crateName = "darling_core"; + version = "0.24.0"; + edition = "2021"; + sha256 = "1i38i1vwm2a2p3knsyqd0rm7frkfil5lxqz1600ji0n4j57jfkh8"; + 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 3.0.3"; + features = [ "full" "extra-traits" ]; + } + ]; + features = { + "serde" = [ "dep:serde" ]; + "strsim" = [ "dep:strsim" ]; + "suggestions" = [ "strsim" ]; + }; + resolvedDefaultFeatures = [ "strsim" "suggestions" ]; + }; + "darling_macro 0.23.0" = rec { crateName = "darling_macro"; version = "0.23.0"; edition = "2021"; @@ -1628,7 +1825,7 @@ rec { dependencies = [ { name = "darling_core"; - packageId = "darling_core"; + packageId = "darling_core 0.23.0"; } { name = "quote"; @@ -1640,6 +1837,31 @@ rec { } ]; + }; + "darling_macro 0.24.0" = rec { + crateName = "darling_macro"; + version = "0.24.0"; + edition = "2021"; + sha256 = "0pimi94crlpzw72s18vi96ysw3il197sdzz0bhrd476ll0ppkxb8"; + procMacro = true; + authors = [ + "Ted Driggs " + ]; + dependencies = [ + { + name = "darling_core"; + packageId = "darling_core 0.24.0"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 3.0.3"; + } + ]; + }; "defmt" = rec { crateName = "defmt"; @@ -2144,7 +2366,7 @@ rec { }; resolvedDefaultFeatures = [ "alloc" "arithmetic" "default" "der" "digest" "hazmat" "pem" "pkcs8" "rfc6979" "signing" "spki" "std" "verifying" ]; }; - "educe" = rec { + "educe 0.6.0" = rec { crateName = "educe"; version = "0.6.0"; edition = "2021"; @@ -2184,13 +2406,55 @@ rec { "default" = [ "Debug" "Clone" "Copy" "PartialEq" "Eq" "PartialOrd" "Ord" "Hash" "Default" "Deref" "DerefMut" "Into" ]; "full" = [ "syn/full" ]; }; - resolvedDefaultFeatures = [ "Clone" "Debug" "Default" "Eq" "Hash" "PartialEq" ]; + resolvedDefaultFeatures = [ "Clone" "Debug" "Hash" "PartialEq" ]; + }; + "educe 0.7.6" = rec { + crateName = "educe"; + version = "0.7.6"; + edition = "2024"; + sha256 = "1par14babv60xrk4vbdnibfzv43frvpz2jv06iif3v4dvp4gllg4"; + procMacro = true; + authors = [ + "Magic Len " + ]; + dependencies = [ + { + name = "enum-ordinalize"; + packageId = "enum-ordinalize"; + usesDefaultFeatures = false; + features = [ "derive" ]; + } + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 3.0.3"; + } + ]; + devDependencies = [ + { + name = "syn"; + packageId = "syn 3.0.3"; + features = [ "full" ]; + } + ]; + features = { + "default" = [ "Debug" "Clone" "Copy" "PartialEq" "Eq" "PartialOrd" "Ord" "Hash" "Default" "Deref" "DerefMut" "Into" ]; + "full" = [ "syn/full" ]; + }; + resolvedDefaultFeatures = [ "Clone" "Debug" "Default" "Eq" "PartialEq" ]; }; "either" = rec { crateName = "either"; - version = "1.16.0"; + version = "1.17.0"; edition = "2021"; - sha256 = "17k7jfbdz7k440h6lws9baz8p9zlxgb41sig3w81h80nwzsjyqli"; + sha256 = "07dagpwcfdzpkb1n7fxkx0q3nv80rnf81v7gwlz9ljx22mn8yply"; features = { "default" = [ "std" ]; "serde" = [ "dep:serde" ]; @@ -2692,11 +2956,11 @@ rec { }; resolvedDefaultFeatures = [ "default" "use_std" "with-deprecated" ]; }; - "futures 0.3.32" = rec { + "futures 0.3.33" = rec { crateName = "futures"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "0b9q86r5ar18v5xjiyqn7sb8sa32xv98qqnfz779gl7ns7lpw54b"; + sha256 = "066j5aqz8an05xh4hn5ljdnjn80z3g335v4grx4gaifr57wg3358"; dependencies = [ { name = "futures-channel"; @@ -2756,9 +3020,9 @@ rec { }; "futures-channel" = rec { crateName = "futures-channel"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "07fcyzrmbmh7fh4ainilf1s7gnwvnk07phdq77jkb9fpa2ffifq7"; + sha256 = "1bn5hlhfkl1sgypmiachaqcgwmr6wmjal7dyhfyb1zkazvs90996"; libName = "futures_channel"; dependencies = [ { @@ -2784,9 +3048,9 @@ rec { }; "futures-core" = rec { crateName = "futures-core"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "07bbvwjbm5g2i330nyr1kcvjapkmdqzl4r6mqv75ivvjaa0m0d3y"; + sha256 = "1iqdbvcdlplfr2g43h7xrfkv2sg5p1a26x8acz1xgxl07i3hrm9c"; libName = "futures_core"; features = { "default" = [ "std" ]; @@ -2797,9 +3061,9 @@ rec { }; "futures-executor" = rec { crateName = "futures-executor"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "17aplz3ns74qn7a04qg7qlgsdx5iwwwkd4jvdfra6hl3h4w9rwms"; + sha256 = "0n3lpkmcfrsnh40i4armn040gnqbpd257hz5qs46zipjr6f8fm37"; libName = "futures_executor"; dependencies = [ { @@ -2827,9 +3091,9 @@ rec { }; "futures-io" = rec { crateName = "futures-io"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "063pf5m6vfmyxj74447x8kx9q8zj6m9daamj4hvf49yrg9fs7jyf"; + sha256 = "0yjx13qdm9b2p4w00ddw85k6yccnnmqrlrrz8yfmi5jg7jmfqxs5"; libName = "futures_io"; features = { "default" = [ "std" ]; @@ -2838,9 +3102,9 @@ rec { }; "futures-macro" = rec { crateName = "futures-macro"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "0ys4b1lk7s0bsj29pv42bxsaavalch35rprp64s964p40c1bfdg8"; + sha256 = "02xiyd5y1nk9b805aympj4wq2czgvxnhcml9w9xkc665d3g3qv9d"; procMacro = true; libName = "futures_macro"; dependencies = [ @@ -2862,9 +3126,9 @@ rec { }; "futures-sink" = rec { crateName = "futures-sink"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "14q8ml7hn5a6gyy9ri236j28kh0svqmrk4gcg0wh26rkazhm95y3"; + sha256 = "01z38z344hpryw84b6r0rbwcb669d8pyvl2szg10aqwx96n1hi73"; libName = "futures_sink"; features = { "default" = [ "std" ]; @@ -2874,9 +3138,9 @@ rec { }; "futures-task" = rec { crateName = "futures-task"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "14s3vqf8llz3kjza33vn4ixg6kwxp61xrysn716h0cwwsnri2xq3"; + sha256 = "02f1y1yvjg1cv998zkgl1706pi9y4fyc9045l1hlmyqyhclfscdj"; libName = "futures_task"; features = { "default" = [ "std" ]; @@ -2901,9 +3165,9 @@ rec { }; "futures-util" = rec { crateName = "futures-util"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "1mn60lw5kh32hz9isinjlpw34zx708fk5q1x0m40n6g6jq9a971q"; + sha256 = "1anyg40j5www5l22r2jbn1birsafz4q1w9qmcjk4vqzwasi90ym7"; libName = "futures_util"; dependencies = [ { @@ -2984,7 +3248,10 @@ rec { "io-compat" = [ "io" "compat" "tokio-io" "libc" ]; "libc" = [ "dep:libc" ]; "memchr" = [ "dep:memchr" ]; - "portable-atomic" = [ "futures-core/portable-atomic" ]; + "portable-atomic" = [ "futures-core/portable-atomic" "portable_atomic_crate" ]; + "portable-atomic-alloc" = [ "portable-atomic-util/alloc" "portable-atomic" ]; + "portable-atomic-util" = [ "dep:portable-atomic-util" ]; + "portable_atomic_crate" = [ "dep:portable_atomic_crate" ]; "sink" = [ "futures-sink" ]; "slab" = [ "dep:slab" ]; "spin" = [ "dep:spin" ]; @@ -3225,12 +3492,17 @@ rec { usesDefaultFeatures = false; target = { target, features }: (("uefi" == target."os" or null) && ("efi_rng" == target."getrandom_backend" or null)); } + { + name = "rand_core"; + packageId = "rand_core 0.10.1"; + optional = true; + } ]; features = { "sys_rng" = [ "dep:rand_core" ]; "wasm_js" = [ "dep:wasm-bindgen" "dep:js-sys" ]; }; - resolvedDefaultFeatures = [ "std" ]; + resolvedDefaultFeatures = [ "std" "sys_rng" ]; }; "git2" = rec { crateName = "git2"; @@ -3319,10 +3591,10 @@ rec { }; "granit-parser" = rec { crateName = "granit-parser"; - version = "0.0.3"; + version = "0.0.7"; edition = "2021"; crateBin = []; - sha256 = "14bwwc8swz8h0v8d7qybmmq25czv5aipd1v1vbariq7rchhs62zm"; + sha256 = "0bdac2as3130i83pvlsl8gdasvfy5kvaj5ylry2hv0rj8ynq2gyh"; libName = "granit_parser"; authors = [ "Ethiraric " @@ -3574,9 +3846,9 @@ rec { }; "http" = rec { crateName = "http"; - version = "1.4.2"; + version = "1.5.0"; edition = "2021"; - sha256 = "09b4p8fiivkg7wm0b59fyrn1jkm7px298ci7zb9igz6n647gaw39"; + sha256 = "1q4wpz5hb4cf37g3jrdyffrpa6ngidmd9wrfph92fddzprl3b3ci"; authors = [ "Alex Crichton " "Carl Lerche " @@ -3693,9 +3965,9 @@ rec { }; "hyper" = rec { crateName = "hyper"; - version = "1.10.1"; + version = "1.11.0"; edition = "2021"; - sha256 = "1624nwrh1ci34psqcl3q8q266kha8kd6fmqjj14qck49l59iqa2m"; + sha256 = "0wha96biivgpj0fpf80a2aar5dfbff1lk62i9x9i2bl53wl5686j"; authors = [ "Sean McArthur " ]; @@ -3790,7 +4062,7 @@ rec { "ffi" = [ "dep:http-body-util" "dep:futures-util" ]; "full" = [ "client" "http1" "http2" "server" ]; "http1" = [ "dep:atomic-waker" "dep:futures-channel" "dep:futures-core" "dep:httparse" "dep:itoa" ]; - "http2" = [ "dep:futures-channel" "dep:futures-core" "dep:h2" ]; + "http2" = [ "dep:atomic-waker" "dep:futures-channel" "dep:futures-core" "dep:h2" ]; "server" = [ "dep:httpdate" "dep:pin-project-lite" "dep:smallvec" ]; "tracing" = [ "dep:tracing" ]; }; @@ -3947,7 +4219,7 @@ rec { dependencies = [ { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; optional = true; } { @@ -4650,9 +4922,9 @@ rec { }; "jiff" = rec { crateName = "jiff"; - version = "0.2.31"; + version = "0.2.35"; edition = "2021"; - sha256 = "0d6nvffabb1v34x2s2a3xjca4zny1dfdhqm3xy0wyl77rchn3znc"; + sha256 = "1k1d1n8k46192xz6ph8km43lcg68ql65phzmhm49mbq7pn1p32v6"; authors = [ "Andrew Gallant " ]; @@ -4662,6 +4934,12 @@ rec { packageId = "defmt"; optional = true; } + { + name = "jiff-core"; + packageId = "jiff-core"; + rename = "jcore"; + usesDefaultFeatures = false; + } { name = "jiff-static"; packageId = "jiff-static"; @@ -4716,16 +4994,16 @@ rec { } ]; features = { - "alloc" = [ "serde_core?/alloc" "portable-atomic-util/alloc" "defmt?/alloc" ]; + "alloc" = [ "jcore/alloc" "serde_core?/alloc" "portable-atomic-util/alloc" "defmt?/alloc" ]; "default" = [ "std" "tz-system" "tz-fat" "tzdb-bundle-platform" "tzdb-zoneinfo" "tzdb-concatenated" "perf-inline" ]; - "defmt" = [ "dep:defmt" ]; + "defmt" = [ "dep:defmt" "jcore/defmt" ]; "js" = [ "dep:wasm-bindgen" "dep:js-sys" ]; - "logging" = [ "dep:log" ]; + "logging" = [ "dep:log" "jcore/logging" ]; "serde" = [ "dep:serde_core" ]; "static" = [ "static-tz" "jiff-static?/tzdb" ]; "static-tz" = [ "dep:jiff-static" ]; - "std" = [ "alloc" "log?/std" "serde_core?/std" ]; - "tz-fat" = [ "jiff-static?/tz-fat" ]; + "std" = [ "alloc" "jcore/std" "log?/std" "serde_core?/std" ]; + "tz-fat" = [ "jcore/tz-fat" "jiff-static?/tz-fat" ]; "tz-system" = [ "std" "dep:windows-link" ]; "tzdb-bundle-always" = [ "dep:jiff-tzdb" "alloc" ]; "tzdb-bundle-platform" = [ "dep:jiff-tzdb-platform" "alloc" ]; @@ -4734,17 +5012,47 @@ rec { }; resolvedDefaultFeatures = [ "alloc" "default" "perf-inline" "serde" "std" "tz-fat" "tz-system" "tzdb-bundle-platform" "tzdb-concatenated" "tzdb-zoneinfo" ]; }; + "jiff-core" = rec { + crateName = "jiff-core"; + version = "0.1.0"; + edition = "2021"; + sha256 = "02axx56pkh2w4bw5rp94qlvcpwzd3n2w2025fnikvrgg762aiv3z"; + libName = "jiff_core"; + authors = [ + "Andrew Gallant " + ]; + dependencies = [ + { + name = "defmt"; + packageId = "defmt"; + optional = true; + } + ]; + features = { + "alloc" = [ "defmt?/alloc" ]; + "default" = [ "std" "tz-fat" ]; + "defmt" = [ "dep:defmt" ]; + "logging" = [ "dep:log" ]; + "std" = [ "alloc" ]; + }; + resolvedDefaultFeatures = [ "alloc" "default" "std" "tz-fat" ]; + }; "jiff-static" = rec { crateName = "jiff-static"; - version = "0.2.31"; + version = "0.2.35"; edition = "2021"; - sha256 = "1lpdrmzd5yafwzniw0xi5gac4rz0vccsja1qrprjim32ysbyhrg1"; + sha256 = "014jli8v46c8hzkndmvdfvq4la6a6y9icmnh3k735yqwlarxqs9s"; procMacro = true; libName = "jiff_static"; authors = [ "Andrew Gallant " ]; dependencies = [ + { + name = "jiff-core"; + packageId = "jiff-core"; + rename = "jcore"; + } { name = "proc-macro2"; packageId = "proc-macro2"; @@ -4792,6 +5100,134 @@ rec { } ]; + }; + "jni" = rec { + crateName = "jni"; + version = "0.22.4"; + edition = "2024"; + sha256 = "161lza8gz071h22pgyqyx4n91ixd691z2dbb1pq2g97k5i49mzay"; + authors = [ + "jni team" + ]; + dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + } + { + name = "combine"; + packageId = "combine"; + } + { + name = "jni-macros"; + packageId = "jni-macros"; + } + { + name = "jni-sys"; + packageId = "jni-sys"; + } + { + name = "log"; + packageId = "log"; + } + { + name = "simd_cesu8"; + packageId = "simd_cesu8"; + } + { + name = "thiserror"; + packageId = "thiserror 2.0.18"; + } + { + name = "windows-link"; + packageId = "windows-link"; + target = { target, features }: (target."windows" or false); + } + ]; + buildDependencies = [ + { + name = "walkdir"; + packageId = "walkdir"; + } + ]; + features = { + "invocation" = [ "dep:java-locator" "dep:libloading" ]; + }; + }; + "jni-macros" = rec { + crateName = "jni-macros"; + version = "0.22.4"; + edition = "2024"; + sha256 = "18v02mcn5c7mb2yw6r930xg6ynsn7hwkxv8z2kdhn3qprjn0j0d0"; + procMacro = true; + libName = "jni_macros"; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + } + { + name = "quote"; + packageId = "quote"; + } + { + name = "simd_cesu8"; + packageId = "simd_cesu8"; + } + { + name = "syn"; + packageId = "syn 2.0.118"; + features = [ "full" ]; + } + ]; + buildDependencies = [ + { + name = "rustc_version"; + packageId = "rustc_version"; + } + ]; + + }; + "jni-sys" = rec { + crateName = "jni-sys"; + version = "0.4.1"; + edition = "2021"; + sha256 = "1wlahx6f2zhczdjqyn8mk7kshb8x5vsd927sn3lvw41rrf47ldy6"; + libName = "jni_sys"; + authors = [ + "Steven Fackler " + "Robert Bragg " + ]; + dependencies = [ + { + name = "jni-sys-macros"; + packageId = "jni-sys-macros"; + } + ]; + + }; + "jni-sys-macros" = rec { + crateName = "jni-sys-macros"; + version = "0.4.1"; + edition = "2021"; + sha256 = "0r32gbabrak15a7p487765b5wc0jcna2yv88mk6m1zjqyi1bkh1q"; + procMacro = true; + libName = "jni_sys_macros"; + authors = [ + "Robert Bragg " + ]; + dependencies = [ + { + name = "quote"; + packageId = "quote"; + } + { + name = "syn"; + packageId = "syn 2.0.118"; + features = [ "full" ]; + } + ]; + }; "jobserver" = rec { crateName = "jobserver"; @@ -4983,7 +5419,7 @@ rec { dependencies = [ { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; usesDefaultFeatures = false; features = [ "alloc" ]; } @@ -5026,9 +5462,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; libName = "k8s_version"; authors = [ @@ -5037,7 +5473,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.24.0"; optional = true; } { @@ -5046,7 +5482,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } ]; features = { @@ -5104,9 +5540,9 @@ rec { }; "kube" = rec { crateName = "kube"; - version = "4.0.0"; + version = "4.2.0"; edition = "2024"; - sha256 = "0ip1qc9kvgyp735rmxdjq75dspf737sazvhzs6b70siljn011fab"; + sha256 = "065z77zh7gbigcbv7mxk7firdf1w6278lal1jjqsnrh073hpz390"; authors = [ "clux " "Natalie Klestrup Röijezon " @@ -5179,9 +5615,9 @@ rec { }; "kube-client" = rec { crateName = "kube-client"; - version = "4.0.0"; + version = "4.2.0"; edition = "2024"; - sha256 = "0yskaybnf8m2c9rb0kxzlczb9jbx25sxdlqhzqhlq9n2bgh2ixnh"; + sha256 = "1lqny49zldysk1qr6pp2ifsp2ifqa5wcwplbj73wb9rk62kl1s9i"; libName = "kube_client"; authors = [ "clux " @@ -5191,7 +5627,7 @@ rec { dependencies = [ { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; optional = true; } { @@ -5206,7 +5642,7 @@ rec { } { name = "futures"; - packageId = "futures 0.3.32"; + packageId = "futures 0.3.33"; optional = true; usesDefaultFeatures = false; features = [ "std" ]; @@ -5281,6 +5717,11 @@ rec { optional = true; usesDefaultFeatures = false; } + { + name = "rustls-platform-verifier"; + packageId = "rustls-platform-verifier"; + optional = true; + } { name = "secrecy"; packageId = "secrecy"; @@ -5337,7 +5778,7 @@ rec { devDependencies = [ { name = "futures"; - packageId = "futures 0.3.32"; + packageId = "futures 0.3.33"; usesDefaultFeatures = false; features = [ "async-await" ]; } @@ -5391,7 +5832,7 @@ rec { "pem" = [ "dep:pem" ]; "ring" = [ "hyper-rustls?/ring" ]; "rustls" = [ "dep:rustls" ]; - "rustls-tls" = [ "rustls" "hyper-rustls" ]; + "rustls-tls" = [ "rustls" "hyper-rustls" "dep:rustls-platform-verifier" ]; "serde-saphyr" = [ "dep:serde-saphyr" ]; "socks5" = [ "hyper-util/client-proxy" ]; "tame-oauth" = [ "dep:tame-oauth" ]; @@ -5408,9 +5849,9 @@ rec { }; "kube-core" = rec { crateName = "kube-core"; - version = "4.0.0"; + version = "4.2.0"; edition = "2024"; - sha256 = "1a7a3n4mwiqywajlld3axii0k7ridizp5mn7b06i81ms6dcjzc61"; + sha256 = "1d7f2acgydnica3gsva5my87kw8cbfyvbq1f6ln4dwwc24y3blm9"; libName = "kube_core"; authors = [ "clux " @@ -5491,9 +5932,9 @@ rec { }; "kube-derive" = rec { crateName = "kube-derive"; - version = "4.0.0"; + version = "4.2.0"; edition = "2024"; - sha256 = "1an7av9xlif02klbk1xsz7nvggpnazpq2kpris0z3bbxf2c1h5zy"; + sha256 = "1h597lx7xd6x65ili9ccm8lmqdq3dg3384iwcf8vz0zsw4ciq54j"; procMacro = true; libName = "kube_derive"; authors = [ @@ -5504,7 +5945,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.23.0"; } { name = "proc-macro2"; @@ -5540,9 +5981,9 @@ rec { }; "kube-runtime" = rec { crateName = "kube-runtime"; - version = "4.0.0"; + version = "4.2.0"; edition = "2024"; - sha256 = "08db3c5bg185y2yh6vilbkwqfdm5aykf87xllllwzis0qmkfrpcr"; + sha256 = "1isw7mh35jmfwi3kx9ibpcgw77lyv9h3ji2ajdgabgn7f7pn9c1y"; libName = "kube_runtime"; authors = [ "clux " @@ -5568,13 +6009,13 @@ rec { } { name = "educe"; - packageId = "educe"; + packageId = "educe 0.6.0"; usesDefaultFeatures = false; features = [ "Clone" "Debug" "Hash" "PartialEq" ]; } { name = "futures"; - packageId = "futures 0.3.32"; + packageId = "futures 0.3.33"; usesDefaultFeatures = false; features = [ "async-await" ]; } @@ -6893,7 +7334,7 @@ rec { dependencies = [ { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; usesDefaultFeatures = false; features = [ "alloc" ]; } @@ -7324,9 +7765,9 @@ rec { }; "proc-macro2" = rec { crateName = "proc-macro2"; - version = "1.0.106"; + version = "1.0.107"; edition = "2021"; - sha256 = "0d09nczyaj67x4ihqr5p7gxbkz38gxhk4asc0k8q23g9n85hzl4g"; + sha256 = "1nb6ly8kp65f724kj73ippc7lvydss24sm2vagk6qpklpg4pwplq"; libName = "proc_macro2"; authors = [ "David Tolnay " @@ -7440,9 +7881,9 @@ rec { }; "quote" = rec { crateName = "quote"; - version = "1.0.46"; + version = "1.0.47"; edition = "2021"; - sha256 = "0s034glrlav8nzqy2yskqzv52ncy82k126sm2jk5j1vs1iylbg6z"; + sha256 = "00ch0yyzvv6s671ik0kcsbw8nigdaj2g3fr61kcahwx48aqlvgqz"; authors = [ "David Tolnay " ]; @@ -7478,9 +7919,48 @@ rec { sha256 = "1gyrl2k5fyzj9k7kchg2n296z5881lg7070msabid09asp3wkp7q"; libName = "r_efi"; features = { - "core" = [ "dep:core" ]; - "rustc-dep-of-std" = [ "core" ]; + "core" = [ "dep:core" ]; + "rustc-dep-of-std" = [ "core" ]; + }; + }; + "rand 0.10.2" = rec { + crateName = "rand"; + version = "0.10.2"; + edition = "2024"; + sha256 = "105yqkdzqbgggd3r1yjm9jg0zvibfdsmxylvxxkmblwc0lxgmxf7"; + authors = [ + "The Rand Project Developers" + "The Rust Project Developers" + ]; + dependencies = [ + { + name = "chacha20"; + packageId = "chacha20"; + optional = true; + usesDefaultFeatures = false; + features = [ "rng" ]; + } + { + name = "getrandom"; + packageId = "getrandom 0.4.3"; + optional = true; + } + { + name = "rand_core"; + packageId = "rand_core 0.10.1"; + usesDefaultFeatures = false; + } + ]; + features = { + "chacha" = [ "dep:chacha20" ]; + "default" = [ "std" "std_rng" "sys_rng" "thread_rng" ]; + "serde" = [ "dep:serde" ]; + "std" = [ "alloc" "getrandom?/std" ]; + "std_rng" = [ "dep:chacha20" ]; + "sys_rng" = [ "dep:getrandom" "getrandom/sys_rng" ]; + "thread_rng" = [ "std" "std_rng" "sys_rng" ]; }; + resolvedDefaultFeatures = [ "alloc" "default" "std" "std_rng" "sys_rng" "thread_rng" ]; }; "rand 0.8.6" = rec { crateName = "rand"; @@ -7546,7 +8026,7 @@ rec { "std_rng" = [ "dep:rand_chacha" ]; "thread_rng" = [ "std" "std_rng" "os_rng" ]; }; - resolvedDefaultFeatures = [ "alloc" "default" "os_rng" "small_rng" "std" "std_rng" "thread_rng" ]; + resolvedDefaultFeatures = [ "alloc" "os_rng" "small_rng" "std" "std_rng" "thread_rng" ]; }; "rand_chacha 0.3.1" = rec { crateName = "rand_chacha"; @@ -7614,6 +8094,16 @@ rec { }; resolvedDefaultFeatures = [ "std" ]; }; + "rand_core 0.10.1" = rec { + crateName = "rand_core"; + version = "0.10.1"; + edition = "2024"; + sha256 = "0s9wiacxrr100icl7i41308gcj85nlcclrc5jx1jd6p10dhigf33"; + authors = [ + "The Rand Project Developers" + ]; + + }; "rand_core 0.6.4" = rec { crateName = "rand_core"; version = "0.6.4"; @@ -7728,9 +8218,9 @@ rec { }; "regex" = rec { crateName = "regex"; - version = "1.12.4"; + version = "1.13.1"; edition = "2021"; - sha256 = "1fm6si2xpmhwqflabdqsakc0qkq718wx2ljl37nbj75fb5vjnagi"; + sha256 = "1391a0a4100ik8cp7l577p3ip3haqq03rd9c5vdr7vcfdixj687h"; authors = [ "The Rust Project Developers" "Andrew Gallant " @@ -7786,9 +8276,9 @@ rec { }; "regex-automata" = rec { crateName = "regex-automata"; - version = "0.4.14"; + version = "0.4.18"; edition = "2021"; - sha256 = "13xf7hhn4qmgfh784llcp2kzrvljd13lb2b1ca0mwnf15w9d87bf"; + sha256 = "1cml0rm0ssqfkibh9nh3gy4b6hbsbicj1rihpwf2a4v4nawm71dd"; libName = "regex_automata"; authors = [ "The Rust Project Developers" @@ -7887,7 +8377,7 @@ rec { dependencies = [ { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; } { name = "bytes"; @@ -8507,6 +8997,139 @@ rec { }; resolvedDefaultFeatures = [ "alloc" "default" "std" ]; }; + "rustls-platform-verifier" = rec { + crateName = "rustls-platform-verifier"; + version = "0.7.0"; + edition = "2021"; + sha256 = "181v4d0vl53vdh2wq56vghal1zyhdgqvy4xa8r45zwz4di9y5l96"; + libName = "rustls_platform_verifier"; + dependencies = [ + { + name = "core-foundation"; + packageId = "core-foundation"; + target = { target, features }: (("apple" == target."vendor" or null)); + } + { + name = "core-foundation-sys"; + packageId = "core-foundation-sys"; + target = { target, features }: (("apple" == target."vendor" or null)); + } + { + name = "jni"; + packageId = "jni"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "jni"; + packageId = "jni"; + usesDefaultFeatures = false; + target = { target, features }: ("android" == target."os" or null); + } + { + name = "log"; + packageId = "log"; + } + { + name = "once_cell"; + packageId = "once_cell"; + optional = true; + } + { + name = "once_cell"; + packageId = "once_cell"; + target = { target, features }: ("android" == target."os" or null); + } + { + name = "rustls"; + packageId = "rustls"; + usesDefaultFeatures = false; + features = [ "std" ]; + } + { + name = "rustls-native-certs"; + packageId = "rustls-native-certs"; + target = { target, features }: ((target."unix" or false) && (!("android" == target."os" or null)) && (!("apple" == target."vendor" or null)) && (!("wasm32" == target."arch" or null))); + } + { + name = "rustls-platform-verifier-android"; + packageId = "rustls-platform-verifier-android"; + target = { target, features }: ("android" == target."os" or null); + } + { + name = "rustls-webpki"; + packageId = "rustls-webpki"; + rename = "webpki"; + usesDefaultFeatures = false; + target = { target, features }: ((target."unix" or false) && (!("android" == target."os" or null)) && (!("apple" == target."vendor" or null)) && (!("wasm32" == target."arch" or null))); + } + { + name = "rustls-webpki"; + packageId = "rustls-webpki"; + rename = "webpki"; + usesDefaultFeatures = false; + target = { target, features }: ("wasm32" == target."arch" or null); + } + { + name = "rustls-webpki"; + packageId = "rustls-webpki"; + rename = "webpki"; + usesDefaultFeatures = false; + target = { target, features }: ("android" == target."os" or null); + } + { + name = "security-framework"; + packageId = "security-framework"; + target = { target, features }: (("apple" == target."vendor" or null)); + } + { + name = "security-framework-sys"; + packageId = "security-framework-sys"; + target = { target, features }: (("apple" == target."vendor" or null)); + } + { + name = "webpki-root-certs"; + packageId = "webpki-root-certs"; + target = { target, features }: ("wasm32" == target."arch" or null); + } + { + name = "windows-sys"; + packageId = "windows-sys 0.61.2"; + usesDefaultFeatures = false; + target = { target, features }: (target."windows" or false); + features = [ "Win32_Foundation" "Win32_Security_Cryptography" ]; + } + ]; + devDependencies = [ + { + name = "rustls"; + packageId = "rustls"; + usesDefaultFeatures = false; + features = [ "ring" ]; + } + { + name = "webpki-root-certs"; + packageId = "webpki-root-certs"; + } + ]; + features = { + "android_logger" = [ "dep:android_logger" ]; + "base64" = [ "dep:base64" ]; + "cert-logging" = [ "base64" ]; + "docsrs" = [ "jni" "once_cell" ]; + "ffi-testing" = [ "android_logger" "rustls/ring" ]; + "jni" = [ "dep:jni" ]; + "once_cell" = [ "dep:once_cell" ]; + }; + }; + "rustls-platform-verifier-android" = rec { + crateName = "rustls-platform-verifier-android"; + version = "0.1.1"; + edition = "2021"; + sha256 = "13vq6sxsgz9547xm2zbdxiw8x7ad1g8n8ax6xvxsjqszk7q6awgq"; + libName = "rustls_platform_verifier_android"; + + }; "rustls-webpki" = rec { crateName = "rustls-webpki"; version = "0.103.13"; @@ -8566,6 +9189,24 @@ rec { "no-panic" = [ "dep:no-panic" ]; }; }; + "same-file" = rec { + crateName = "same-file"; + version = "1.0.6"; + edition = "2018"; + sha256 = "00h5j1w87dmhnvbv9l8bic3y7xxsnjmssvifw2ayvgx9mb1ivz4k"; + libName = "same_file"; + authors = [ + "Andrew Gallant " + ]; + dependencies = [ + { + name = "winapi-util"; + packageId = "winapi-util"; + target = { target, features }: (target."windows" or false); + } + ]; + + }; "schannel" = rec { crateName = "schannel"; version = "0.1.29"; @@ -8593,9 +9234,9 @@ rec { }; "schemars" = rec { crateName = "schemars"; - version = "1.2.1"; + version = "1.2.2"; edition = "2021"; - sha256 = "1k16qzpdpy6p9hrh18q2l6cwawxzyqi25f8masa13l0wm8v2zd52"; + sha256 = "0jng632s64njf9vghr3i1l4m15h4y85m5vhg7vkwdkdnjg978wk8"; authors = [ "Graham Esau " ]; @@ -8672,9 +9313,9 @@ rec { }; "schemars_derive" = rec { crateName = "schemars_derive"; - version = "1.2.1"; + version = "1.2.2"; edition = "2021"; - sha256 = "0zrh1ckcc63sqy5hyhnh2lbxh4vmbij2z4f1g5za1vmayi85n4bx"; + sha256 = "1fp2wkdk32nv66swy7k7pz7sxygn634snlppih5jzbs6ddqng36r"; procMacro = true; authors = [ "Graham Esau " @@ -8694,13 +9335,13 @@ rec { } { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; } ]; devDependencies = [ { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; features = [ "extra-traits" ]; } ]; @@ -8863,6 +9504,7 @@ rec { features = { "default" = [ "OSX_10_13" ]; }; + resolvedDefaultFeatures = [ "OSX_10_13" "default" ]; }; "semver" = rec { crateName = "semver"; @@ -8880,9 +9522,9 @@ rec { }; "serde" = rec { crateName = "serde"; - version = "1.0.228"; + version = "1.0.229"; edition = "2021"; - sha256 = "17mf4hhjxv5m90g42wmlbc61hdhlm6j9hwfkpcnd72rpgzm993ls"; + sha256 = "1fp04fq4a79bpm61xz1zy0pbz4kpc7d771zii1k3inmszq55jj21"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -8913,10 +9555,10 @@ rec { }; "serde-saphyr" = rec { crateName = "serde-saphyr"; - version = "0.0.27"; + version = "0.0.29"; edition = "2024"; crateBin = []; - sha256 = "1crx4kmmm88y4dbaramdsn0w8fqzchaz12b6vdgx7bddzb1v95sq"; + sha256 = "196f2kjh4c9zayliykx9s5jyr2zir1rz15fsxdnwmq0xj60jglkv"; libName = "serde_saphyr"; dependencies = [ { @@ -8931,7 +9573,7 @@ rec { } { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; optional = true; } { @@ -8961,9 +9603,8 @@ rec { optional = true; } { - name = "serde"; - packageId = "serde"; - features = [ "derive" ]; + name = "serde_core"; + packageId = "serde_core"; } { name = "smallvec"; @@ -8976,16 +9617,9 @@ rec { optional = true; } ]; - devDependencies = [ - { - name = "serde"; - packageId = "serde"; - features = [ "derive" "rc" ]; - } - ]; features = { "default" = [ "serialize" "deserialize" ]; - "deserialize" = [ "dep:base64" "dep:num-traits" "dep:annotate-snippets" "dep:granit-parser" "dep:smallvec" "dep:encoding_rs_io" "dep:ahash" ]; + "deserialize" = [ "dep:num-traits" "dep:annotate-snippets" "dep:granit-parser" "dep:smallvec" "dep:encoding_rs_io" "dep:ahash" ]; "figment" = [ "dep:figment" "deserialize" ]; "figment2" = [ "dep:figment2" "deserialize" ]; "garde" = [ "dep:garde" "deserialize" ]; @@ -8994,6 +9628,7 @@ rec { "miette" = [ "dep:miette" "deserialize" ]; "properties" = [ "deserialize" ]; "robotics" = [ "deserialize" ]; + "serde_derived_types" = [ "dep:serde" ]; "serialize" = [ "dep:base64" "dep:num-traits" "dep:zmij" "dep:nohash-hasher" ]; "validator" = [ "dep:validator" "deserialize" ]; }; @@ -9022,9 +9657,9 @@ rec { }; "serde_core" = rec { crateName = "serde_core"; - version = "1.0.228"; + version = "1.0.229"; edition = "2021"; - sha256 = "1bb7id2xwx8izq50098s5j2sqrrvk31jbbrjqygyan6ask3qbls1"; + sha256 = "0j1ajiha76h3nmd976il9li6975k121xa7jb39ws8n0yqp4s5p37"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -9049,9 +9684,9 @@ rec { }; "serde_derive" = rec { crateName = "serde_derive"; - version = "1.0.228"; + version = "1.0.229"; edition = "2021"; - sha256 = "0y8xm7fvmr2kjcd029g9fijpndh8csv5m20g4bd76w8qschg4h6m"; + sha256 = "0j4k63i7h1bikxwz2c89ig0hrwbnl9mz1czn85xx99x5cc9dg9g7"; procMacro = true; authors = [ "Erick Tryzelaar " @@ -9072,7 +9707,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" "proc-macro" ]; } @@ -9083,9 +9718,9 @@ rec { }; "serde_derive_internals" = rec { crateName = "serde_derive_internals"; - version = "0.29.1"; - edition = "2015"; - sha256 = "04g7macx819vbnxhi52cx0nhxi56xlhrybgwybyy7fb9m4h6mlhq"; + version = "0.30.0"; + edition = "2021"; + sha256 = "1gd9n45na7n79nr54ghfl79rygkbzw2ybk3wyr6nlp83rry16lpq"; libPath = "lib.rs"; authors = [ "Erick Tryzelaar " @@ -9104,7 +9739,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" ]; } @@ -9113,9 +9748,9 @@ rec { }; "serde_json" = rec { crateName = "serde_json"; - version = "1.0.150"; + version = "1.0.151"; edition = "2021"; - sha256 = "1ffgfhy9kndjnrz8lmy95pr758p2zk8dxv6yi99x0vkkni24w0g8"; + sha256 = "051zww7lvpw147vvwss1ng6w587qyrkzg75fvj08q2dfrmgbahf8"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -9271,7 +9906,7 @@ rec { } { name = "cpufeatures"; - packageId = "cpufeatures"; + packageId = "cpufeatures 0.2.17"; target = { target, features }: (("aarch64" == target."arch" or null) || ("x86" == target."arch" or null) || ("x86_64" == target."arch" or null)); } { @@ -9310,7 +9945,7 @@ rec { } { name = "cpufeatures"; - packageId = "cpufeatures"; + packageId = "cpufeatures 0.2.17"; target = { target, features }: (("aarch64" == target."arch" or null) || ("x86_64" == target."arch" or null) || ("x86" == target."arch" or null)); } { @@ -9437,6 +10072,46 @@ rec { "default" = [ "std" "const-generics" ]; }; }; + "simd_cesu8" = rec { + crateName = "simd_cesu8"; + version = "1.2.0"; + edition = "2021"; + sha256 = "0865mv3nmd35f1dccjcfj7dncjmmvvdij3j61z4131mz38jiw0qi"; + authors = [ + "Sean C. Roach " + ]; + dependencies = [ + { + name = "simdutf8"; + packageId = "simdutf8"; + usesDefaultFeatures = false; + } + ]; + buildDependencies = [ + { + name = "rustc_version"; + packageId = "rustc_version"; + } + ]; + features = { + "default" = [ "std" ]; + "std" = [ "simdutf8/std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; + "simdutf8" = rec { + crateName = "simdutf8"; + version = "0.1.5"; + edition = "2018"; + sha256 = "0vmpf7xaa0dnaikib5jlx6y4dxd3hxqz6l830qb079g7wcsgxag3"; + authors = [ + "Hans Kratz " + ]; + features = { + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "std" ]; + }; "slab" = rec { crateName = "slab"; version = "0.4.12"; @@ -9506,18 +10181,18 @@ rec { }; resolvedDefaultFeatures = [ "default" "guide" "std" ]; }; - "snafu 0.9.1" = rec { + "snafu 0.9.2" = rec { crateName = "snafu"; - version = "0.9.1"; + version = "0.9.2"; edition = "2018"; - sha256 = "08k5yfydxdlshivfhrdq9km8qn02r93q28gkyvazbqz2icr1586i"; + sha256 = "1dx44pj4nid04lv64rjbhwihz3bd4arqg637df97pfwa0c2bcp74"; authors = [ "Jake Goulding " ]; dependencies = [ { name = "snafu-derive"; - packageId = "snafu-derive 0.9.1"; + packageId = "snafu-derive 0.9.2"; } ]; features = { @@ -9558,11 +10233,11 @@ rec { features = { }; }; - "snafu-derive 0.9.1" = rec { + "snafu-derive 0.9.2" = rec { crateName = "snafu-derive"; - version = "0.9.1"; + version = "0.9.2"; edition = "2018"; - sha256 = "1nkfi7bis72pz3w7vb64m79w49qsv20sbf19jkd471vbhr83q42z"; + sha256 = "0whyc1bp26laq8sczsfkr13cq6kccrnij0rvbv7xgw08000mjzr8"; procMacro = true; libName = "snafu_derive"; authors = [ @@ -9724,7 +10399,7 @@ rec { } { name = "futures"; - packageId = "futures 0.3.32"; + packageId = "futures 0.3.33"; features = [ "compat" ]; } { @@ -9746,7 +10421,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } { name = "stackable-operator"; @@ -9793,9 +10468,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; libName = "stackable_certs"; authors = [ @@ -9831,7 +10506,7 @@ rec { } { name = "rand"; - packageId = "rand 0.9.4"; + packageId = "rand 0.10.2"; } { name = "rand_core"; @@ -9853,7 +10528,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } { name = "stackable-shared"; @@ -9892,13 +10567,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.114.0"; + version = "0.115.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; libName = "stackable_operator"; authors = [ @@ -9907,7 +10582,7 @@ rec { dependencies = [ { name = "base64"; - packageId = "base64"; + packageId = "base64 0.23.1"; } { name = "clap"; @@ -9928,7 +10603,7 @@ rec { } { name = "educe"; - packageId = "educe"; + packageId = "educe 0.7.6"; usesDefaultFeatures = false; features = [ "Clone" "Debug" "Default" "PartialEq" "Eq" ]; } @@ -9938,7 +10613,7 @@ rec { } { name = "futures"; - packageId = "futures 0.3.32"; + packageId = "futures 0.3.33"; } { name = "http"; @@ -9975,7 +10650,7 @@ rec { } { name = "rand"; - packageId = "rand 0.9.4"; + packageId = "rand 0.10.2"; } { name = "regex"; @@ -10010,7 +10685,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } { name = "stackable-operator-derive"; @@ -10078,7 +10753,8 @@ rec { "client-feature-gates" = [ "dep:winnow" ]; "crds" = [ "dep:stackable-versioned" ]; "default" = [ "crds" ]; - "full" = [ "client-feature-gates" "crds" "certs" "test-support" "time" "webhook" "kube-ws" ]; + "full" = [ "client-feature-gates" "crds" "certs" "test-support" "time" "webhook" "kube-ws" "kube-cel" ]; + "kube-cel" = [ "kube/cel" ]; "kube-ws" = [ "kube/ws" ]; "time" = [ "stackable-shared/time" ]; "webhook" = [ "dep:stackable-webhook" ]; @@ -10091,9 +10767,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -10103,7 +10779,7 @@ rec { dependencies = [ { name = "darling"; - packageId = "darling"; + packageId = "darling 0.24.0"; } { name = "proc-macro2"; @@ -10115,7 +10791,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; } ]; @@ -10126,9 +10802,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; libName = "stackable_shared"; authors = [ @@ -10172,7 +10848,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } { name = "strum"; @@ -10207,9 +10883,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; libName = "stackable_telemetry"; authors = [ @@ -10260,7 +10936,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } { name = "strum"; @@ -10317,9 +10993,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; libName = "stackable_versioned"; authors = [ @@ -10352,7 +11028,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } { name = "stackable-versioned-macros"; @@ -10367,9 +11043,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -10387,7 +11063,7 @@ rec { } { name = "darling"; - packageId = "darling"; + packageId = "darling 0.24.0"; } { name = "indoc"; @@ -10424,7 +11100,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.118"; + packageId = "syn 3.0.3"; } ]; @@ -10435,9 +11111,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "ee66b8d66fe10c216acfed0f81070b362604b392"; - sha256 = "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; + sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; }; libName = "stackable_webhook"; authors = [ @@ -10496,7 +11172,7 @@ rec { } { name = "rand"; - packageId = "rand 0.9.4"; + packageId = "rand 0.10.2"; } { name = "serde"; @@ -10509,7 +11185,7 @@ rec { } { name = "snafu"; - packageId = "snafu 0.9.1"; + packageId = "snafu 0.9.2"; } { name = "stackable-certs"; @@ -10716,6 +11392,39 @@ rec { }; resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "fold" "full" "parsing" "printing" "proc-macro" "visit" "visit-mut" ]; }; + "syn 3.0.3" = rec { + crateName = "syn"; + version = "3.0.3"; + edition = "2021"; + sha256 = "18srnql3cd39j9q6hf1az02p67rlr1rf6njx9zx4vxj9i3jvmsak"; + authors = [ + "David Tolnay " + ]; + dependencies = [ + { + name = "proc-macro2"; + packageId = "proc-macro2"; + usesDefaultFeatures = false; + } + { + name = "quote"; + packageId = "quote"; + optional = true; + usesDefaultFeatures = false; + } + { + name = "unicode-ident"; + packageId = "unicode-ident"; + } + ]; + features = { + "default" = [ "derive" "parsing" "printing" "clone-impls" "proc-macro" ]; + "printing" = [ "dep:quote" ]; + "proc-macro" = [ "proc-macro2/proc-macro" "quote?/proc-macro" ]; + "test" = [ "syn-test-suite/all-features" ]; + }; + resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "full" "parsing" "printing" "proc-macro" "visit-mut" ]; + }; "sync_wrapper" = rec { crateName = "sync_wrapper"; version = "1.0.2"; @@ -10876,9 +11585,9 @@ rec { }; "time" = rec { crateName = "time"; - version = "0.3.53"; + version = "0.3.55"; edition = "2024"; - sha256 = "0l4aans0kv47y53736cjs0pnvdz91iyywrkqbrxk6cmrvknsmpqq"; + sha256 = "0d6iyws47z50zlksf5m3cflxvjrcgfhjglhn112gmpahxjappf6d"; authors = [ "Jacob Pratt " "Time contributors" @@ -10959,9 +11668,9 @@ rec { }; "time-macros" = rec { crateName = "time-macros"; - version = "0.2.31"; + version = "0.2.32"; edition = "2024"; - sha256 = "0pq8y9bm1zr008dmjs62qdfwsigv2kwkga5sj0d4jvk625qvhcf4"; + sha256 = "11gdd3b81mj8i0h114qfjjzm8j2rz2mhr9byr0ksjbldli196s3y"; procMacro = true; libName = "time_macros"; authors = [ @@ -11076,9 +11785,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.52.3"; + version = "1.53.1"; edition = "2021"; - sha256 = "1zpzazypkg61sw91na1m85x5s4rsjym335fwwhwm1hcs70dz1iwg"; + sha256 = "1v8b3b45pkpbibls75yniqbvx5dlks2708141ljni5mnf6lawb10"; authors = [ "Tokio Contributors " ]; @@ -11457,7 +12166,7 @@ rec { } { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; } { name = "bytes"; @@ -11753,7 +12462,7 @@ rec { dependencies = [ { name = "base64"; - packageId = "base64"; + packageId = "base64 0.22.1"; optional = true; } { @@ -12593,9 +13302,9 @@ rec { }; "uuid" = rec { crateName = "uuid"; - version = "1.23.4"; + version = "1.24.0"; edition = "2021"; - sha256 = "0lws65rrqncssdz1rk8g8ww7xg6k4d3l6avzkslzwni78llag05z"; + sha256 = "0faj5x0zgri8m3i8dv9qgyhiwqwdyhbl2g351cp3iin4ynk26fdz"; authors = [ "Ashley Mannix" "Dylan DPC" @@ -12683,6 +13392,27 @@ rec { "Sergio Benitez " ]; + }; + "walkdir" = rec { + crateName = "walkdir"; + version = "2.5.0"; + edition = "2018"; + sha256 = "0jsy7a710qv8gld5957ybrnc07gavppp963gs32xk4ag8130jy99"; + authors = [ + "Andrew Gallant " + ]; + dependencies = [ + { + name = "same-file"; + packageId = "same-file"; + } + { + name = "winapi-util"; + packageId = "winapi-util"; + target = { target, features }: (target."windows" or false); + } + ]; + }; "want" = rec { crateName = "want"; @@ -13413,6 +14143,41 @@ rec { "serde" = [ "dep:serde" ]; }; }; + "webpki-root-certs" = rec { + crateName = "webpki-root-certs"; + version = "1.0.9"; + edition = "2021"; + sha256 = "16qw59hxn1lln1615kb9rjy16pfxd1x8m9f9w6vwv36c5am58rdr"; + libName = "webpki_root_certs"; + dependencies = [ + { + name = "rustls-pki-types"; + packageId = "rustls-pki-types"; + rename = "pki-types"; + usesDefaultFeatures = false; + } + ]; + + }; + "winapi-util" = rec { + crateName = "winapi-util"; + version = "0.1.11"; + edition = "2021"; + sha256 = "08hdl7mkll7pz8whg869h58c1r9y7in0w0pk8fm24qc77k0b39y2"; + libName = "winapi_util"; + authors = [ + "Andrew Gallant " + ]; + dependencies = [ + { + name = "windows-sys"; + packageId = "windows-sys 0.61.2"; + target = { target, features }: (target."windows" or false); + features = [ "Win32_Foundation" "Win32_Storage_FileSystem" "Win32_System_Console" "Win32_System_SystemInformation" ]; + } + ]; + + }; "windows-core" = rec { crateName = "windows-core"; version = "0.62.2"; diff --git a/Cargo.toml b/Cargo.toml index 912ac226..c6245fa4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/stackabletech/airflow-operator" stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = [ "crds", "webhook", -], tag = "stackable-operator-0.114.0" } +], tag = "stackable-operator-0.115.0" } anyhow = "1.0" built = { version = "0.8", features = ["chrono", "git2"] } @@ -33,5 +33,5 @@ tokio = { version = "1.52", features = ["full"] } tracing = "0.1" [patch."https://github.com/stackabletech/operator-rs.git"] -# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" } +stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feat/smooth-operator/recommended-labels" } # stackable-operator = { path = "../operator-rs/crates/stackable-operator" } diff --git a/crate-hashes.json b/crate-hashes.json index 04979b96..32358383 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,11 +1,11 @@ { - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#k8s-version@0.1.3": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-certs@0.4.1": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-operator-derive@0.3.1": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-operator@0.114.0": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-shared@0.1.2": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-telemetry@0.6.5": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-versioned-macros@0.11.1": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-versioned@0.11.1": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.114.0#stackable-webhook@0.9.2": "1v6slybgc0xqsmh3bxyid6xjvmz8ps41nfmmc6csgyzqs2v0wzxj" + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#k8s-version@0.1.3": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-certs@0.4.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-operator-derive@0.3.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-operator@0.115.0": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-shared@0.1.2": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-telemetry@0.6.5": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-versioned-macros@0.11.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-versioned@0.11.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-webhook@0.9.2": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1" } \ No newline at end of file diff --git a/extra/crds.yaml b/extra/crds.yaml index d5e18603..ab7ba18a 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -6,7 +6,6 @@ metadata: spec: group: airflow.stackable.tech names: - categories: [] kind: AirflowCluster plural: airflowclusters shortNames: @@ -14,8 +13,7 @@ spec: singular: airflowcluster scope: Namespaced versions: - - additionalPrinterColumns: [] - name: v1alpha2 + - name: v1alpha2 schema: openAPIV3Schema: description: An Airflow cluster stacklet. This resource is managed by the Stackable operator for Apache Airflow. @@ -6244,8 +6242,7 @@ spec: storage: true subresources: status: {} - - additionalPrinterColumns: [] - name: v1alpha1 + - name: v1alpha1 schema: openAPIV3Schema: description: An Airflow cluster stacklet. This resource is managed by the Stackable operator for Apache Airflow. diff --git a/rust/operator-binary/src/controller/apply.rs b/rust/operator-binary/src/controller/apply.rs index c3be9c58..fda5881a 100644 --- a/rust/operator-binary/src/controller/apply.rs +++ b/rust/operator-binary/src/controller/apply.rs @@ -14,8 +14,8 @@ use strum::{EnumDiscriminants, IntoStaticStr}; use crate::{ controller::{ - Applied, KubernetesResources, Prepared, ValidatedCluster, controller_name, operator_name, - product_name, + Applied, CONTROLLER_NAME, KubernetesResources, OPERATOR_NAME, PRODUCT_NAME, Prepared, + ValidatedCluster, }, crd::internal_secret::{ FERNET_KEY_SECRET_KEY, INTERNAL_SECRET_SECRET_KEY, JWT_SECRET_SECRET_KEY, @@ -60,9 +60,9 @@ impl<'a> Applier<'a> { object_overrides: &'a ObjectOverrides, ) -> Applier<'a> { let cluster_resources = cluster_resources_new( - &product_name(), - &operator_name(), - &controller_name(), + &PRODUCT_NAME, + &OPERATOR_NAME, + &CONTROLLER_NAME, &cluster.name, &cluster.namespace, &cluster.uid, diff --git a/rust/operator-binary/src/controller/build/mod.rs b/rust/operator-binary/src/controller/build/mod.rs index b41f4dc4..9505cdcd 100644 --- a/rust/operator-binary/src/controller/build/mod.rs +++ b/rust/operator-binary/src/controller/build/mod.rs @@ -6,12 +6,16 @@ use snafu::{ResultExt, Snafu}; use stackable_operator::{ builder::meta::ObjectMetaBuilder, kvp::Labels, - v2::{builder::meta::ownerreference_from_resource, types::operator::RoleGroupName}, + v2::{ + builder::meta::ownerreference_from_resource, + types::operator::{RoleGroupName, RoleName}, + }, }; use crate::{ controller::{ - KubernetesResources, Prepared, ValidatedCluster, + CONTROLLER_NAME, KubernetesResources, OPERATOR_NAME, PRODUCT_NAME, Prepared, + ValidatedCluster, build::resource::{ config_map::build_rolegroup_config_map, executor::build_executor_template_config_map, @@ -122,7 +126,7 @@ pub fn build(cluster: &ValidatedCluster) -> Result config_maps.push( build_rolegroup_config_map( cluster, - &ValidatedCluster::role_name(role), + role, role_group_name, &rg_config.config_overrides, logging, @@ -178,6 +182,75 @@ pub(crate) fn object_meta( builder } +pub(crate) fn recommended_labels_for_cluster_resources(cluster: &ValidatedCluster) -> Labels { + stackable_operator::v2::kvp::label::recommended_labels_for_cluster_resources( + &cluster.name, + &PRODUCT_NAME, + &cluster.product_version, + &OPERATOR_NAME, + &CONTROLLER_NAME, + ) +} + +pub(crate) fn recommended_labels_for_role_resources( + cluster: &ValidatedCluster, + role_name: &RoleName, +) -> Labels { + stackable_operator::v2::kvp::label::recommended_labels_for_role_resources( + &cluster.name, + &PRODUCT_NAME, + &cluster.product_version, + &OPERATOR_NAME, + &CONTROLLER_NAME, + role_name, + ) +} + +pub(crate) fn recommended_labels_for_role_group_resources( + cluster: &ValidatedCluster, + role_name: &RoleName, + role_group_name: &RoleGroupName, +) -> Labels { + stackable_operator::v2::kvp::label::recommended_labels_for_role_group_resources( + &cluster.name, + &PRODUCT_NAME, + &cluster.product_version, + &OPERATOR_NAME, + &CONTROLLER_NAME, + role_name, + role_group_name, + ) +} + +pub(crate) fn recommended_labels_for_unversioned_role_group_resources( + cluster: &ValidatedCluster, + role_name: &RoleName, + role_group_name: &RoleGroupName, +) -> Labels { + stackable_operator::v2::kvp::label::recommended_labels_for_unversioned_role_group_resources( + &cluster.name, + &PRODUCT_NAME, + &OPERATOR_NAME, + &CONTROLLER_NAME, + role_name, + role_group_name, + ) +} + +/// Selector labels matching the pods of a role group. +pub(crate) fn role_group_selector( + cluster: &ValidatedCluster, + role_name: &RoleName, + role_group_name: &RoleGroupName, +) -> Labels { + stackable_operator::v2::kvp::label::role_group_selector( + &cluster.name, + &PRODUCT_NAME, + role_name, + role_group_name, + ) +} + #[cfg(test)] pub(crate) mod test_support { use crate::{ @@ -354,14 +427,12 @@ mod tests { let expected_labels = BTreeMap::from( [ - ("app.kubernetes.io/component", "none"), ("app.kubernetes.io/instance", "my-airflow"), ( "app.kubernetes.io/managed-by", "airflow.stackable.tech_airflowcluster", ), ("app.kubernetes.io/name", "airflow"), - ("app.kubernetes.io/role-group", "none"), ("app.kubernetes.io/version", &app_version_label("3.1.6")), ("stackable.tech/vendor", "Stackable"), ] diff --git a/rust/operator-binary/src/controller/build/resource/config_map.rs b/rust/operator-binary/src/controller/build/resource/config_map.rs index 5b8dcacc..fc0d15c4 100644 --- a/rust/operator-binary/src/controller/build/resource/config_map.rs +++ b/rust/operator-binary/src/controller/build/resource/config_map.rs @@ -24,6 +24,7 @@ use crate::{ product_logging::{create_airflow_config, vector_config_file_content}, webserver_config, }, + recommended_labels_for_role_group_resources, }, }, crd::{AirflowConfigOverrides, Container}, @@ -72,7 +73,11 @@ pub fn build_rolegroup_config_map( .role_group_resource_names(role_name, role_group_name) .role_group_config_map() .to_string(), - validated_cluster.recommended_labels_for(role_name, role_group_name), + recommended_labels_for_role_group_resources( + validated_cluster, + role_name, + role_group_name, + ), ) .build(), ) diff --git a/rust/operator-binary/src/controller/build/resource/executor.rs b/rust/operator-binary/src/controller/build/resource/executor.rs index 5b1a9673..4dddce7f 100644 --- a/rust/operator-binary/src/controller/build/resource/executor.rs +++ b/rust/operator-binary/src/controller/build/resource/executor.rs @@ -28,6 +28,7 @@ use crate::{ graceful_shutdown::add_graceful_shutdown_config, object_meta, properties::env_vars::build_airflow_template_envs, + recommended_labels_for_role_group_resources, resource::pod::{ add_authentication_volumes_and_volume_mounts, add_git_sync_resources, build_logging_container, @@ -88,13 +89,13 @@ pub fn build_executor_template_config_map( let git_sync_resources = &executor_config.git_sync_resources; let mut pb = PodBuilder::new(); - let pb_metadata = - ObjectMetaBuilder::new() - .with_labels(cluster.recommended_labels_for( - &executor_role_name(), - &executor_template_role_group_name(), - )) - .build(); + let pb_metadata = ObjectMetaBuilder::new() + .with_labels(recommended_labels_for_role_group_resources( + cluster, + &executor_role_name(), + &executor_template_role_group_name(), + )) + .build(); pb.metadata(pb_metadata) .image_pull_secrets_from_product_image(resolved_product_image) @@ -106,7 +107,11 @@ pub fn build_executor_template_config_map( .to_string(), ) .restart_policy("Never") - .security_context(PodSecurityContextBuilder::new().fs_group(1000).build()); + .security_context( + PodSecurityContextBuilder::with_stackable_defaults() + .fs_group(1000) + .build(), + ); add_graceful_shutdown_config(executor_config.graceful_shutdown_timeout, &mut pb) .context(GracefulShutdownSnafu)?; @@ -188,7 +193,8 @@ pub fn build_executor_template_config_map( object_meta( cluster, cluster.executor_template_configmap_name(), - cluster.recommended_labels_for( + recommended_labels_for_role_group_resources( + cluster, &executor_role_name(), &executor_template_role_group_name(), ), diff --git a/rust/operator-binary/src/controller/build/resource/listener.rs b/rust/operator-binary/src/controller/build/resource/listener.rs index e346eb25..d8abe9f4 100644 --- a/rust/operator-binary/src/controller/build/resource/listener.rs +++ b/rust/operator-binary/src/controller/build/resource/listener.rs @@ -1,22 +1,16 @@ -use std::str::FromStr; - use stackable_operator::{ crd::listener, - v2::types::{ - kubernetes::{ListenerClassName, ListenerName}, - operator::RoleGroupName, - }, + v2::types::kubernetes::{ListenerClassName, ListenerName}, }; use crate::{ - controller::{ValidatedCluster, build::object_meta}, + controller::{ + ValidatedCluster, + build::{object_meta, recommended_labels_for_role_resources}, + }, crd::{AirflowRole, HTTP_PORT, HTTP_PORT_NAME}, }; -// The group listener is a role-level object, so a constant `none` role-group is used as the -// role-group label value. -stackable_operator::constant!(NONE_ROLE_GROUP_NAME: RoleGroupName = "none"); - pub fn build_group_listener( cluster: &ValidatedCluster, role: &AirflowRole, @@ -27,8 +21,7 @@ pub fn build_group_listener( metadata: object_meta( cluster, listener_group_name, - cluster - .recommended_labels_for(&ValidatedCluster::role_name(role), &NONE_ROLE_GROUP_NAME), + recommended_labels_for_role_resources(cluster, role), ) .build(), spec: listener::v1alpha1::ListenerSpec { diff --git a/rust/operator-binary/src/controller/build/resource/pdb.rs b/rust/operator-binary/src/controller/build/resource/pdb.rs index 22d82556..f56a7802 100644 --- a/rust/operator-binary/src/controller/build/resource/pdb.rs +++ b/rust/operator-binary/src/controller/build/resource/pdb.rs @@ -4,7 +4,7 @@ use stackable_operator::{ }; use crate::{ - controller::{ValidatedCluster, controller_name, operator_name, product_name}, + controller::{CONTROLLER_NAME, OPERATOR_NAME, PRODUCT_NAME, ValidatedCluster}, crd::{AirflowExecutor, AirflowRole}, }; @@ -37,10 +37,10 @@ pub fn build_pdb( let pdb = pod_disruption_budget_builder_with_role( cluster, - &product_name(), - &ValidatedCluster::role_name(role), - &operator_name(), - &controller_name(), + &PRODUCT_NAME, + role, + &OPERATOR_NAME, + &CONTROLLER_NAME, ) .with_max_unavailable(max_unavailable) .build(); diff --git a/rust/operator-binary/src/controller/build/resource/rbac.rs b/rust/operator-binary/src/controller/build/resource/rbac.rs index 7bbb3aa7..8bf95cfc 100644 --- a/rust/operator-binary/src/controller/build/resource/rbac.rs +++ b/rust/operator-binary/src/controller/build/resource/rbac.rs @@ -1,20 +1,11 @@ //! Builds the RBAC resources (ServiceAccount + RoleBinding) shared by all role groups. -use std::str::FromStr; - use stackable_operator::{ k8s_openapi::api::{core::v1::ServiceAccount, rbac::v1::RoleBinding}, - kvp::Labels, - v2::{ - rbac, - types::operator::{RoleGroupName, RoleName}, - }, + v2::rbac, }; -use crate::controller::ValidatedCluster; - -stackable_operator::constant!(NONE_ROLE_NAME: RoleName = "none"); -stackable_operator::constant!(NONE_ROLE_GROUP_NAME: RoleGroupName = "none"); +use crate::controller::{ValidatedCluster, build::recommended_labels_for_cluster_resources}; /// Builds the [`ServiceAccount`] that the role-group Pods and the Kubernetes-executor Pods run /// under. @@ -22,7 +13,7 @@ pub fn build_service_account(cluster: &ValidatedCluster) -> ServiceAccount { rbac::build_service_account( cluster, &cluster.cluster_resource_names(), - rbac_labels(cluster), + recommended_labels_for_cluster_resources(cluster), ) } @@ -32,12 +23,6 @@ pub fn build_role_binding(cluster: &ValidatedCluster) -> RoleBinding { rbac::build_role_binding( cluster, &cluster.cluster_resource_names(), - rbac_labels(cluster), + recommended_labels_for_cluster_resources(cluster), ) } - -/// Both resources are shared by the whole cluster rather than tied to a role or role group, so -/// the recommended labels carry `none` for both values. -fn rbac_labels(cluster: &ValidatedCluster) -> Labels { - cluster.recommended_labels_for(&NONE_ROLE_NAME, &NONE_ROLE_GROUP_NAME) -} diff --git a/rust/operator-binary/src/controller/build/resource/service.rs b/rust/operator-binary/src/controller/build/resource/service.rs index 6bab8c0c..363ab9f4 100644 --- a/rust/operator-binary/src/controller/build/resource/service.rs +++ b/rust/operator-binary/src/controller/build/resource/service.rs @@ -7,7 +7,10 @@ use stackable_operator::{ }; use crate::{ - controller::{ValidatedCluster, build::object_meta}, + controller::{ + ValidatedCluster, + build::{object_meta, recommended_labels_for_role_group_resources, role_group_selector}, + }, crd::{AirflowRole, HTTP_PORT, HTTP_PORT_NAME, METRICS_PORT, METRICS_PORT_NAME}, }; @@ -22,10 +25,10 @@ pub fn build_rolegroup_headless_service( metadata: object_meta( cluster, cluster - .role_group_resource_names(&ValidatedCluster::role_name(role), role_group_name) + .role_group_resource_names(role, role_group_name) .headless_service_name() .to_string(), - cluster.recommended_labels(role, role_group_name), + recommended_labels_for_role_group_resources(cluster, role, role_group_name), ) .build(), spec: Some(ServiceSpec { @@ -33,7 +36,7 @@ pub fn build_rolegroup_headless_service( type_: Some("ClusterIP".to_string()), cluster_ip: Some("None".to_string()), ports: Some(headless_service_ports()), - selector: Some(cluster.role_group_selector(role, role_group_name).into()), + selector: Some(role_group_selector(cluster, role, role_group_name).into()), publish_not_ready_addresses: Some(true), ..ServiceSpec::default() }), @@ -51,10 +54,10 @@ pub fn build_rolegroup_metrics_service( metadata: object_meta( cluster, cluster - .role_group_resource_names(&ValidatedCluster::role_name(role), role_group_name) + .role_group_resource_names(role, role_group_name) .metrics_service_name() .to_string(), - cluster.recommended_labels(role, role_group_name), + recommended_labels_for_role_group_resources(cluster, role, role_group_name), ) .with_labels(prometheus_labels(&Scraping::Enabled)) .with_annotations(prometheus_annotations( @@ -69,7 +72,7 @@ pub fn build_rolegroup_metrics_service( type_: Some("ClusterIP".to_string()), cluster_ip: Some("None".to_string()), ports: Some(metrics_service_ports()), - selector: Some(cluster.role_group_selector(role, role_group_name).into()), + selector: Some(role_group_selector(cluster, role, role_group_name).into()), publish_not_ready_addresses: Some(true), ..ServiceSpec::default() }), @@ -85,7 +88,7 @@ pub fn stateful_set_service_name( ) -> Option { Some( cluster - .role_group_resource_names(&ValidatedCluster::role_name(role), role_group_name) + .role_group_resource_names(role, role_group_name) .headless_service_name() .to_string(), ) diff --git a/rust/operator-binary/src/controller/build/resource/statefulset.rs b/rust/operator-binary/src/controller/build/resource/statefulset.rs index 205683df..89d5eee3 100644 --- a/rust/operator-binary/src/controller/build/resource/statefulset.rs +++ b/rust/operator-binary/src/controller/build/resource/statefulset.rs @@ -35,6 +35,8 @@ use crate::{ graceful_shutdown::add_graceful_shutdown_config, object_meta, properties::env_vars, + recommended_labels_for_role_group_resources, + recommended_labels_for_unversioned_role_group_resources, resource::{ pod::{ add_authentication_volumes_and_volume_mounts, add_git_sync_resources, @@ -42,6 +44,7 @@ use crate::{ }, service::stateful_set_service_name, }, + role_group_selector, volumes::{self, CONFIG_VOLUME_NAME, LOG_CONFIG_VOLUME_NAME, LOG_VOLUME_NAME}, }, }, @@ -94,7 +97,7 @@ fn build_rolegroup_metadata( object_meta( cluster, name, - cluster.recommended_labels(role, role_group_name), + recommended_labels_for_role_group_resources(cluster, role, role_group_name), ) .with_label(prometheus_label) .build() @@ -119,15 +122,20 @@ pub fn build_server_rolegroup_statefulset( let executor = &validated_cluster.cluster_config.executor; let mut pb = PodBuilder::new(); - let resource_names = validated_cluster - .role_group_resource_names(&ValidatedCluster::role_name(airflow_role), role_group_name); + let resource_names = validated_cluster.role_group_resource_names(airflow_role, role_group_name); - let recommended_object_labels = - validated_cluster.recommended_labels(airflow_role, role_group_name); + let recommended_object_labels = recommended_labels_for_role_group_resources( + validated_cluster, + airflow_role, + role_group_name, + ); // Used for PVC templates that cannot be modified once they are deployed (a constant "none" // version keeps the labels stable across version upgrades). - let unversioned_recommended_labels = - validated_cluster.unversioned_recommended_labels(airflow_role, role_group_name); + let unversioned_recommended_labels = recommended_labels_for_unversioned_role_group_resources( + validated_cluster, + airflow_role, + role_group_name, + ); let pb_metadata = ObjectMetaBuilder::new() .with_labels(recommended_object_labels) @@ -149,7 +157,11 @@ pub fn build_server_rolegroup_statefulset( .service_account_name() .to_string(), ) - .security_context(PodSecurityContextBuilder::new().fs_group(1000).build()); + .security_context( + PodSecurityContextBuilder::with_stackable_defaults() + .fs_group(1000) + .build(), + ); let mut airflow_container = new_container_builder(&Container::Airflow.to_container_name()); @@ -345,7 +357,7 @@ pub fn build_server_rolegroup_statefulset( ); let statefulset_match_labels = - validated_cluster.role_group_selector(airflow_role, role_group_name); + role_group_selector(validated_cluster, airflow_role, role_group_name); let statefulset_spec = StatefulSetSpec { pod_management_policy: Some( diff --git a/rust/operator-binary/src/controller/mod.rs b/rust/operator-binary/src/controller/mod.rs index f4ebef5a..4be83aca 100644 --- a/rust/operator-binary/src/controller/mod.rs +++ b/rust/operator-binary/src/controller/mod.rs @@ -10,6 +10,7 @@ use stackable_operator::{ product_image_selection::ResolvedProductImage, resources::{NoRuntimeLimits, Resources}, }, + constant, crd::{git_sync, listener}, database_connections::{ TemplatingMechanism, @@ -25,12 +26,10 @@ use stackable_operator::{ rbac::v1::RoleBinding, }, kube::{Resource, ResourceExt, api::ObjectMeta}, - kvp::Labels, product_logging::spec::ContainerLogConfig, shared::time::Duration, v2::{ HasName, HasUid, NameIsValidLabelValue, - kvp::label::{recommended_labels, role_group_selector}, product_logging::framework::{ValidatedContainerLogConfigChoice, VectorContainerLogConfig}, role_group_utils::ResourceNames, role_utils, @@ -49,8 +48,8 @@ use stackable_operator::{ use crate::{ airflow_controller::AIRFLOW_CONTROLLER_NAME, crd::{ - APP_NAME, AirflowConfig, AirflowConfigOverrides, AirflowExecutor, AirflowRole, - AirflowStorageConfig, ExecutorConfig, OPERATOR_NAME, + self, APP_NAME, AirflowConfig, AirflowConfigOverrides, AirflowExecutor, AirflowRole, + AirflowStorageConfig, ExecutorConfig, authentication::AirflowClientAuthenticationDetailsResolved, authorization::AirflowAuthorizationResolved, databases::{ @@ -67,7 +66,9 @@ pub mod update_status; pub mod validate; // Placeholder version label value for resources whose labels must not change after deployment. -stackable_operator::constant!(UNVERSIONED_PRODUCT_VERSION: ProductVersion = "none"); +constant!(PRODUCT_NAME: ProductName = APP_NAME); +constant!(OPERATOR_NAME: OperatorName = crd::OPERATOR_NAME); +constant!(CONTROLLER_NAME: ControllerName = AIRFLOW_CONTROLLER_NAME); /// Marker for prepared Kubernetes resources which are not applied yet. pub struct Prepared; @@ -342,7 +343,7 @@ impl ValidatedCluster { pub fn cluster_resource_names(&self) -> role_utils::ResourceNames { role_utils::ResourceNames { cluster_name: self.name.clone(), - product_name: product_name(), + product_name: PRODUCT_NAME.clone(), } } @@ -358,95 +359,6 @@ impl ValidatedCluster { role_group_name: role_group_name.clone(), } } - - /// The type-safe role name for an Airflow role. - /// - /// Infallible: every `AirflowRole` serialises to a short, valid role name. - pub fn role_name(role: &AirflowRole) -> RoleName { - role.to_string() - .parse() - .expect("an AirflowRole serialises to a valid RoleName") - } - - /// Recommended labels for a role-group resource. - pub fn recommended_labels( - &self, - role: &AirflowRole, - role_group_name: &RoleGroupName, - ) -> Labels { - self.recommended_labels_for(&Self::role_name(role), role_group_name) - } - - /// Recommended labels for a resource that is not tied to a concrete [`AirflowRole`] (e.g. the - /// Kubernetes executor pod template), using a free-form role/role-group label value. - pub fn recommended_labels_for( - &self, - role_name: &RoleName, - role_group_name: &RoleGroupName, - ) -> Labels { - self.recommended_labels_with(&self.product_version, role_name, role_group_name) - } - - /// Recommended labels with the constant [`UNVERSIONED_PRODUCT_VERSION`], for PVC templates - /// that cannot be modified after deployment (keeps the labels stable across version upgrades). - pub fn unversioned_recommended_labels( - &self, - role: &AirflowRole, - role_group_name: &RoleGroupName, - ) -> Labels { - self.recommended_labels_with( - &UNVERSIONED_PRODUCT_VERSION, - &Self::role_name(role), - role_group_name, - ) - } - - fn recommended_labels_with( - &self, - product_version: &ProductVersion, - role_name: &RoleName, - role_group_name: &RoleGroupName, - ) -> Labels { - recommended_labels( - self, - &product_name(), - product_version, - &operator_name(), - &controller_name(), - role_name, - role_group_name, - ) - } - - /// Selector labels matching the pods of a role group. - pub fn role_group_selector( - &self, - role: &AirflowRole, - role_group_name: &RoleGroupName, - ) -> Labels { - role_group_selector( - self, - &product_name(), - &Self::role_name(role), - role_group_name, - ) - } -} - -/// The product name (`airflow`) as a type-safe label value. -pub(crate) fn product_name() -> ProductName { - ProductName::from_str(APP_NAME).expect("'airflow' is a valid product name") -} - -/// The operator name as a type-safe label value. -pub(crate) fn operator_name() -> OperatorName { - OperatorName::from_str(OPERATOR_NAME).expect("the operator name is a valid label value") -} - -/// The controller name as a type-safe label value. -pub(crate) fn controller_name() -> ControllerName { - ControllerName::from_str(AIRFLOW_CONTROLLER_NAME) - .expect("the controller name is a valid label value") } /// Pseudo role/role-group names for the Kubernetes executor's resources (it is not a real @@ -528,17 +440,13 @@ impl HasUid for ValidatedCluster { #[cfg(test)] mod tests { - use strum::IntoEnumIterator; + use super::*; - use super::ValidatedCluster; - use crate::crd::AirflowRole; - - /// Locks the invariant behind the `expect` in [`ValidatedCluster::role_name`]: every - /// `AirflowRole` variant (present and future) must serialise to a valid `RoleName`. #[test] - fn every_airflow_role_serialises_to_a_valid_role_name() { - for role in AirflowRole::iter() { - ValidatedCluster::role_name(&role); - } + fn test_constants() { + // Test that dereferencing the constants does not panic. + let _ = *PRODUCT_NAME; + let _ = *OPERATOR_NAME; + let _ = *CONTROLLER_NAME; } } diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 961c073d..2e3a80c7 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -1,4 +1,4 @@ -use std::{collections::BTreeSet, str::FromStr}; +use std::{collections::BTreeSet, ops::Deref, str::FromStr}; use serde::{Deserialize, Serialize}; use snafu::{ResultExt, Snafu}; @@ -18,6 +18,7 @@ use stackable_operator::{ fragment::{self, Fragment, ValidationError}, merge::Merge, }, + constant, crd::git_sync, deep_merger::ObjectOverrides, k8s_openapi::{ @@ -47,6 +48,7 @@ use stackable_operator::{ ConfigMapName, ContainerName, ListenerClassName, ListenerName, PersistentVolumeClaimName, SecretName, VolumeName, }, + operator::RoleName, }, }, versioned::versioned, @@ -102,6 +104,12 @@ pub const MAX_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity { unit: BinaryMultiple::Mebi, }; +constant!(WEBSERVER_ROLE_NAME: RoleName = "webserver"); +constant!(SCHEDULER_ROLE_NAME: RoleName = "scheduler"); +constant!(WORKER_ROLE_NAME: RoleName = "worker"); +constant!(DAG_PROCESSOR_ROLE_NAME: RoleName = "dagprocessor"); +constant!(TRIGGERER_ROLE_NAME: RoleName = "triggerer"); + pub type AirflowRoleType = Role; @@ -506,35 +514,12 @@ pub struct AirflowOpaConfig { pub cache: UserInformationCache, } -#[derive( - Clone, - Debug, - Deserialize, - Display, - EnumIter, - Eq, - Hash, - JsonSchema, - Ord, - PartialEq, - PartialOrd, - Serialize, - EnumString, -)] +#[derive(Clone, Debug, EnumIter, Eq, Hash, Ord, PartialEq, PartialOrd)] pub enum AirflowRole { - #[strum(serialize = "webserver")] Webserver, - - #[strum(serialize = "scheduler")] Scheduler, - - #[strum(serialize = "worker")] Worker, - - #[strum(serialize = "dagprocessor")] DagProcessor, - - #[strum(serialize = "triggerer")] Triggerer, } @@ -746,6 +731,20 @@ impl AirflowRole { } } +impl Deref for AirflowRole { + type Target = RoleName; + + fn deref(&self) -> &Self::Target { + match self { + AirflowRole::Webserver => &WEBSERVER_ROLE_NAME, + AirflowRole::Scheduler => &SCHEDULER_ROLE_NAME, + AirflowRole::Worker => &WORKER_ROLE_NAME, + AirflowRole::DagProcessor => &DAG_PROCESSOR_ROLE_NAME, + AirflowRole::Triggerer => &TRIGGERER_ROLE_NAME, + } + } +} + fn container_debug_command() -> String { format!("containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop &") } @@ -970,8 +969,19 @@ mod tests { versioned::test_utils::RoundtripTestData, }; + use super::*; use crate::{v1alpha1, v1alpha2}; + #[test] + fn test_constants() { + // Test that dereferencing the constants does not panic. + let _ = *WEBSERVER_ROLE_NAME; + let _ = *SCHEDULER_ROLE_NAME; + let _ = *WORKER_ROLE_NAME; + let _ = *DAG_PROCESSOR_ROLE_NAME; + let _ = *TRIGGERER_ROLE_NAME; + } + #[test] fn test_cluster_config() { let cluster = " From 6bc76b282493e369e70c8f4f2ffeee38829ac736 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 14 Aug 2026 17:32:08 +0200 Subject: [PATCH 2/5] chore: Use EnvVarSets --- CHANGELOG.md | 8 +- Cargo.lock | 20 +- Cargo.nix | 63 +- Cargo.toml | 4 +- crate-hashes.json | 18 +- extra/crds.yaml | 66 +- rust/operator-binary/Cargo.toml | 1 + .../operator-binary/src/airflow_controller.rs | 51 +- rust/operator-binary/src/controller/apply.rs | 6 +- .../src/controller/build/mod.rs | 20 +- .../controller/build/properties/env_vars.rs | 721 ++++++------------ .../src/controller/build/resource/executor.rs | 6 +- .../controller/build/resource/statefulset.rs | 18 +- rust/operator-binary/src/controller/mod.rs | 9 +- .../src/controller/validate.rs | 60 +- .../src/crd/internal_secret.rs | 10 +- rust/operator-binary/src/crd/mod.rs | 4 +- rust/operator-binary/src/util.rs | 17 - 18 files changed, 414 insertions(+), 688 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bcf3f07a..047f03cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ assembles all relevant Kubernetes resources before anything is applied ([#814]). - The RBAC ServiceAccount and RoleBinding are now built with the operator-rs `v2::rbac` functions and carry the full set of recommended labels ([#821]). -- Bump stackable-operator to 0.114.0 ([#827]). +- Bump stackable-operator to 0.116.0 ([#827], [#838]). - The reconciler now applies resources and derives the cluster status in discrete apply and update_status steps ([#828]). - The level configured for the `airflow.task` logger now sets the level of the `task` handler, @@ -26,6 +26,12 @@ - Remove the `app.kubernetes.io/component` and `app.kubernetes.io/role-group` labels from the resources they don't apply to (previously set to `none`) ([#838]). - All product containers now run with `securityContext.runAsNonRoot` set to `true` to improve security ([#840]). +- Environment variable overrides (`envOverrides`) are now applied after all environment + variables set by the operator. In particular, `CONTAINERDEBUG_LOG_DIRECTORY` can now be + overridden, whereas previously the operator's value always took precedence ([#838]). +- Environment variable names in `envOverrides` are now validated to be valid environment variable + names for all roles, whereas previously this was only enforced for role-group-level overrides + ([#838]). ### Fixed diff --git a/Cargo.lock b/Cargo.lock index 5b07d09f..224e699e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1714,7 +1714,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "darling 0.24.0", "regex", @@ -3177,7 +3177,7 @@ dependencies = [ [[package]] name = "stackable-certs" version = "0.4.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "const-oid", "ecdsa", @@ -3200,8 +3200,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.115.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +version = "0.116.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "base64 0.23.1", "clap", @@ -3245,7 +3245,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "darling 0.24.0", "proc-macro2", @@ -3256,7 +3256,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "jiff", "k8s-openapi", @@ -3273,7 +3273,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.5" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "axum", "clap", @@ -3297,7 +3297,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.11.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "kube", "schemars", @@ -3311,7 +3311,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.11.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "convert_case", "convert_case_extras", @@ -3329,7 +3329,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#ab0579876d3af6e238c0a8513b09f9c3d185de44" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#7b9f9ac9a76fa425ab27f2821377ef86571ca121" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.nix b/Cargo.nix index 806b8014..8493e176 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -5432,9 +5432,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; libName = "k8s_version"; authors = [ @@ -10418,6 +10418,11 @@ rec { name = "serde_yaml"; packageId = "serde_yaml"; } + { + name = "stackable-operator"; + packageId = "stackable-operator"; + features = [ "crds" "webhook" "test-support" ]; + } ]; }; @@ -10427,9 +10432,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; libName = "stackable_certs"; authors = [ @@ -10526,13 +10531,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.115.0"; + version = "0.116.0"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; libName = "stackable_operator"; authors = [ @@ -10718,7 +10723,7 @@ rec { "time" = [ "stackable-shared/time" ]; "webhook" = [ "dep:stackable-webhook" ]; }; - resolvedDefaultFeatures = [ "crds" "default" "webhook" ]; + resolvedDefaultFeatures = [ "crds" "default" "test-support" "webhook" ]; }; "stackable-operator-derive" = rec { crateName = "stackable-operator-derive"; @@ -10726,9 +10731,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -10761,9 +10766,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; libName = "stackable_shared"; authors = [ @@ -10842,9 +10847,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; libName = "stackable_telemetry"; authors = [ @@ -10952,9 +10957,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; libName = "stackable_versioned"; authors = [ @@ -11002,9 +11007,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -11070,9 +11075,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech//operator-rs.git"; - rev = "ab0579876d3af6e238c0a8513b09f9c3d185de44"; - sha256 = "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1"; + url = "https://github.com/stackabletech/operator-rs.git"; + rev = "7b9f9ac9a76fa425ab27f2821377ef86571ca121"; + sha256 = "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9"; }; libName = "stackable_webhook"; authors = [ diff --git a/Cargo.toml b/Cargo.toml index 8ddf5080..089b52ac 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ repository = "https://github.com/stackabletech/airflow-operator" stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", features = [ "crds", "webhook", -], tag = "stackable-operator-0.115.0" } +], tag = "stackable-operator-0.116.0" } anyhow = "1.0" built = { version = "0.8", features = ["chrono", "git2"] } @@ -33,5 +33,5 @@ tokio = { version = "1.53", features = ["full"] } tracing = "0.1" [patch."https://github.com/stackabletech/operator-rs.git"] -stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "feat/smooth-operator/recommended-labels" } +# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" } # stackable-operator = { path = "../operator-rs/crates/stackable-operator" } diff --git a/crate-hashes.json b/crate-hashes.json index 32358383..3fae0f9f 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,11 +1,11 @@ { - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#k8s-version@0.1.3": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-certs@0.4.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-operator-derive@0.3.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-operator@0.115.0": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-shared@0.1.2": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-telemetry@0.6.5": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-versioned-macros@0.11.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-versioned@0.11.1": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1", - "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fsmooth-operator%2Frecommended-labels#stackable-webhook@0.9.2": "0f72i9h8v8n5f0v41zgp070bvb5w7gcqvx2h01dhl2jizkarwcs1" + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#k8s-version@0.1.3": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-certs@0.4.1": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-operator-derive@0.3.1": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-operator@0.116.0": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-shared@0.1.2": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-telemetry@0.6.5": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-versioned-macros@0.11.1": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-versioned@0.11.1": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.116.0#stackable-webhook@0.9.2": "1p3744fxgvs12sqwvi8hhainwrgvhdfwmbyqf0sp0aq3awq3q1v9" } \ No newline at end of file diff --git a/extra/crds.yaml b/extra/crds.yaml index 5972f8cd..282db8fc 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -492,7 +492,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -1006,7 +1007,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -2020,7 +2022,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -2534,7 +2537,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -3098,7 +3102,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -3591,7 +3596,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -4105,7 +4111,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -4607,7 +4614,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -5121,7 +5129,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -5623,7 +5632,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -6164,7 +6174,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -6740,7 +6751,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -7254,7 +7266,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -8244,7 +8257,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -8758,7 +8772,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -9322,7 +9337,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -9815,7 +9831,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -10329,7 +10346,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -10831,7 +10849,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -11345,7 +11364,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -11847,7 +11867,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about @@ -12388,7 +12409,8 @@ spec: default: {} description: |- `envOverrides` configure environment variables to be set in the Pods. - It is a map from strings to strings - environment variables and the value to set. + It is a map from environment variable names to their values. The names are validated to be + valid environment variable names. Read the [environment variable overrides documentation](https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides) for more information and consult the operator specific usage guide to find out about diff --git a/rust/operator-binary/Cargo.toml b/rust/operator-binary/Cargo.toml index 92feeb34..d12eee75 100644 --- a/rust/operator-binary/Cargo.toml +++ b/rust/operator-binary/Cargo.toml @@ -31,3 +31,4 @@ built.workspace = true [dev-dependencies] rstest.workspace = true serde_yaml.workspace = true +stackable-operator = { workspace = true, features = ["test-support"] } diff --git a/rust/operator-binary/src/airflow_controller.rs b/rust/operator-binary/src/airflow_controller.rs index cbe4af8f..106a6996 100644 --- a/rust/operator-binary/src/airflow_controller.rs +++ b/rust/operator-binary/src/airflow_controller.rs @@ -1,15 +1,11 @@ //! Ensures that `Pod`s are configured and running for each [`v1alpha2::AirflowCluster`] -use std::{ - collections::{BTreeMap, HashMap}, - sync::Arc, -}; +use std::sync::Arc; use const_format::concatcp; use snafu::{ResultExt, Snafu}; use stackable_operator::{ cli::OperatorEnvironmentOptions, cluster_resources::ClusterResourceApplyStrategy, - k8s_openapi::api::core::v1::EnvVar, kube::{ core::{DeserializeGuard, error_boundary}, runtime::controller::Action, @@ -138,48 +134,3 @@ pub fn error_policy( _ => Action::requeue(*Duration::from_secs(10)), } } - -/// Convert user-supplied `envOverrides` into a list of [`EnvVar`]s. -pub(crate) fn env_vars_from_overrides(env_overrides: &HashMap) -> Vec { - // Collect into a `BTreeMap` first so the env vars come out in a deterministic (sorted) order; - // `HashMap` iteration order is randomised per instance and would otherwise churn the containers - // this feeds between reconciles. Mirrors the override handling in `env_vars.rs`. - env_overrides - .iter() - .collect::>() - .into_iter() - .map(|(k, v)| EnvVar { - name: k.clone(), - value: Some(v.clone()), - ..EnvVar::default() - }) - .collect() -} - -#[cfg(test)] -mod tests { - use std::collections::HashMap; - - use super::env_vars_from_overrides; - - /// The env vars must come out in a deterministic (sorted-by-name) order. `env_overrides` is a - /// `HashMap`, whose iteration order is randomised per instance, so iterating it directly would - /// vary the rendered env array between reconciles and churn the git-sync containers it feeds. - #[test] - fn env_vars_from_overrides_are_sorted_by_name() { - let overrides = HashMap::from([ - ("CHARLIE".to_string(), "3".to_string()), - ("ALPHA".to_string(), "1".to_string()), - ("ECHO".to_string(), "5".to_string()), - ("BRAVO".to_string(), "2".to_string()), - ("DELTA".to_string(), "4".to_string()), - ]); - - let names: Vec = env_vars_from_overrides(&overrides) - .into_iter() - .map(|env_var| env_var.name) - .collect(); - - assert_eq!(names, ["ALPHA", "BRAVO", "CHARLIE", "DELTA", "ECHO"]); - } -} diff --git a/rust/operator-binary/src/controller/apply.rs b/rust/operator-binary/src/controller/apply.rs index fda5881a..e6de8d57 100644 --- a/rust/operator-binary/src/controller/apply.rs +++ b/rust/operator-binary/src/controller/apply.rs @@ -135,7 +135,7 @@ impl<'a> Applier<'a> { pub async fn ensure_random_secrets(client: &Client, cluster: &ValidatedCluster) -> Result<()> { random_secret_creation::create_random_secret_if_not_exists( cluster.internal_secret_name().as_ref(), - INTERNAL_SECRET_SECRET_KEY, + &INTERNAL_SECRET_SECRET_KEY.to_string(), 256, cluster, client, @@ -145,7 +145,7 @@ pub async fn ensure_random_secrets(client: &Client, cluster: &ValidatedCluster) random_secret_creation::create_random_secret_if_not_exists( cluster.jwt_secret_name().as_ref(), - JWT_SECRET_SECRET_KEY, + &JWT_SECRET_SECRET_KEY.to_string(), 256, cluster, client, @@ -159,7 +159,7 @@ pub async fn ensure_random_secrets(client: &Client, cluster: &ValidatedCluster) // which returns 32 bytes. random_secret_creation::create_random_secret_if_not_exists( cluster.fernet_key_name().as_ref(), - FERNET_KEY_SECRET_KEY, + &FERNET_KEY_SECRET_KEY.to_string(), 32, cluster, client, diff --git a/rust/operator-binary/src/controller/build/mod.rs b/rust/operator-binary/src/controller/build/mod.rs index 2c58809d..4ae2438f 100644 --- a/rust/operator-binary/src/controller/build/mod.rs +++ b/rust/operator-binary/src/controller/build/mod.rs @@ -444,10 +444,13 @@ mod tests { } /// The environment of the `airflow` container of the given StatefulSet, as name/value pairs. + /// + /// This reads the rendered `EnvVar`s straight off the built container rather than going through + /// `EnvVarSet`, keeping the test helper lean and focused on the values it asserts on. fn airflow_container_env( cluster: &ValidatedCluster, stateful_set_name: &str, - ) -> BTreeMap> { + ) -> BTreeMap { let resources = build(cluster).expect("build succeeds"); let stateful_set = resources .stateful_sets @@ -471,7 +474,12 @@ mod tests { .as_ref() .expect("the airflow container has env vars") .iter() - .map(|env_var| (env_var.name.clone(), env_var.value.clone())) + .filter_map(|env_var| { + env_var + .value + .as_ref() + .map(|value| (env_var.name.clone(), value.clone())) + }) .collect() } @@ -602,7 +610,7 @@ mod tests { assert_eq!( env.get("FORWARDED_ALLOW_IPS"), - Some(&Some("10.244.0.0/16,192.168.1.1".to_string())) + Some(&"10.244.0.0/16,192.168.1.1".to_owned()) ); } @@ -662,11 +670,11 @@ mod tests { assert_eq!(env.get("FORWARDED_ALLOW_IPS"), None); assert_eq!( env.get("AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX"), - Some(&Some("True".to_string())) + Some(&"True".to_owned()) ); assert_eq!( env.get("AIRFLOW__WEBSERVER__PROXY_FIX_X_FOR"), - Some(&Some("1".to_string())) + Some(&"1".to_owned()) ); } @@ -677,7 +685,7 @@ mod tests { let env = airflow_container_env(&cluster, "my-airflow-webserver-default"); assert_eq!( env.get("AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX"), - Some(&Some("True".to_string())) + Some(&"True".to_owned()) ); } diff --git a/rust/operator-binary/src/controller/build/properties/env_vars.rs b/rust/operator-binary/src/controller/build/properties/env_vars.rs index 347848e6..6a025f02 100644 --- a/rust/operator-binary/src/controller/build/properties/env_vars.rs +++ b/rust/operator-binary/src/controller/build/properties/env_vars.rs @@ -1,15 +1,16 @@ -use std::{ - collections::{BTreeMap, BTreeSet, HashMap}, - path::PathBuf, -}; +use std::{collections::BTreeSet, path::PathBuf, str::FromStr}; use snafu::Snafu; use stackable_operator::{ + constant, crd::{authentication::oidc, git_sync}, - k8s_openapi::api::core::v1::EnvVar, kube::ResourceExt, product_logging::framework::create_vector_shutdown_file_command, - v2::{builder::pod::container::EnvVarSet, product_logging::framework::STACKABLE_LOG_DIR}, + v2::{ + builder::pod::container::{EnvVarName, EnvVarSet}, + product_logging::framework::STACKABLE_LOG_DIR, + types::kubernetes::SecretKey, + }, }; use crate::{ @@ -25,40 +26,61 @@ use crate::{ }, trusted_proxies::TrustedProxy, }, - util::{env_var_from_secret, role_service_name}, + util::role_service_name, }; -const AIRFLOW_CORE_AUTH_MANAGER: &str = "AIRFLOW__CORE__AUTH_MANAGER"; +constant!(AIRFLOW_CORE_AUTH_MANAGER: EnvVarName = "AIRFLOW__CORE__AUTH_MANAGER"); // Airflow 3 envs -const AIRFLOW_CORE_AUTH_OPA_REQUEST_URL: &str = "AIRFLOW__CORE__AUTH_OPA_REQUEST_URL"; -const AIRFLOW_CORE_AUTH_OPA_CACHE_TTL_IN_SEC: &str = "AIRFLOW__CORE__AUTH_OPA_CACHE_TTL_IN_SEC"; -const AIRFLOW_CORE_AUTH_OPA_CACHE_MAXSIZE: &str = "AIRFLOW__CORE__AUTH_OPA_CACHE_MAXSIZE"; - -const AIRFLOW_LOGGING_LOGGING_CONFIG_CLASS: &str = "AIRFLOW__LOGGING__LOGGING_CONFIG_CLASS"; -const AIRFLOW_METRICS_STATSD_ON: &str = "AIRFLOW__METRICS__STATSD_ON"; -const AIRFLOW_METRICS_STATSD_HOST: &str = "AIRFLOW__METRICS__STATSD_HOST"; -const AIRFLOW_METRICS_STATSD_PORT: &str = "AIRFLOW__METRICS__STATSD_PORT"; -const AIRFLOW_WEBSERVER_SECRET_KEY: &str = "AIRFLOW__WEBSERVER__SECRET_KEY"; -const AIRFLOW_CELERY_RESULT_BACKEND: &str = "AIRFLOW__CELERY__RESULT_BACKEND"; -const AIRFLOW_CELERY_BROKER_URL: &str = "AIRFLOW__CELERY__BROKER_URL"; -const AIRFLOW_CORE_DAGS_FOLDER: &str = "AIRFLOW__CORE__DAGS_FOLDER"; -const AIRFLOW_CORE_LOAD_EXAMPLES: &str = "AIRFLOW__CORE__LOAD_EXAMPLES"; -const AIRFLOW_API_AUTH_BACKENDS: &str = "AIRFLOW__API__AUTH_BACKENDS"; -const AIRFLOW_DATABASE_SQL_ALCHEMY_CONN: &str = "AIRFLOW__DATABASE__SQL_ALCHEMY_CONN"; - -const AIRFLOW_WEBSERVER_EXPOSE_CONFIG: &str = "AIRFLOW__WEBSERVER__EXPOSE_CONFIG"; -const AIRFLOW_CORE_EXECUTOR: &str = "AIRFLOW__CORE__EXECUTOR"; -const AIRFLOW_KUBERNETES_EXECUTOR_POD_TEMPLATE_FILE: &str = - "AIRFLOW__KUBERNETES_EXECUTOR__POD_TEMPLATE_FILE"; -const AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE: &str = "AIRFLOW__KUBERNETES_EXECUTOR__NAMESPACE"; - -const ADMIN_FIRSTNAME: &str = "ADMIN_FIRSTNAME"; -const ADMIN_USERNAME: &str = "ADMIN_USERNAME"; -const ADMIN_LASTNAME: &str = "ADMIN_LASTNAME"; -const ADMIN_PASSWORD: &str = "ADMIN_PASSWORD"; -const ADMIN_EMAIL: &str = "ADMIN_EMAIL"; - -const PYTHONPATH: &str = "PYTHONPATH"; +constant!(AIRFLOW_CORE_AUTH_OPA_REQUEST_URL: EnvVarName = "AIRFLOW__CORE__AUTH_OPA_REQUEST_URL"); +constant!(AIRFLOW_CORE_AUTH_OPA_CACHE_TTL_IN_SEC: EnvVarName = "AIRFLOW__CORE__AUTH_OPA_CACHE_TTL_IN_SEC"); +constant!(AIRFLOW_CORE_AUTH_OPA_CACHE_MAXSIZE: EnvVarName = "AIRFLOW__CORE__AUTH_OPA_CACHE_MAXSIZE"); + +constant!(AIRFLOW_LOGGING_LOGGING_CONFIG_CLASS: EnvVarName = "AIRFLOW__LOGGING__LOGGING_CONFIG_CLASS"); +constant!(AIRFLOW_METRICS_STATSD_ON: EnvVarName = "AIRFLOW__METRICS__STATSD_ON"); +constant!(AIRFLOW_METRICS_STATSD_HOST: EnvVarName = "AIRFLOW__METRICS__STATSD_HOST"); +constant!(AIRFLOW_METRICS_STATSD_PORT: EnvVarName = "AIRFLOW__METRICS__STATSD_PORT"); +constant!(AIRFLOW_WEBSERVER_SECRET_KEY: EnvVarName = "AIRFLOW__WEBSERVER__SECRET_KEY"); +constant!(AIRFLOW_API_SECRET_KEY: EnvVarName = "AIRFLOW__API__SECRET_KEY"); +constant!(AIRFLOW_CORE_FERNET_KEY: EnvVarName = "AIRFLOW__CORE__FERNET_KEY"); +constant!(AIRFLOW_CELERY_RESULT_BACKEND: EnvVarName = "AIRFLOW__CELERY__RESULT_BACKEND"); +constant!(AIRFLOW_CELERY_BROKER_URL: EnvVarName = "AIRFLOW__CELERY__BROKER_URL"); +constant!(AIRFLOW_CORE_DAGS_FOLDER: EnvVarName = "AIRFLOW__CORE__DAGS_FOLDER"); +constant!(AIRFLOW_CORE_LOAD_EXAMPLES: EnvVarName = "AIRFLOW__CORE__LOAD_EXAMPLES"); +constant!(AIRFLOW_API_AUTH_BACKENDS: EnvVarName = "AIRFLOW__API__AUTH_BACKENDS"); +constant!(AIRFLOW_WEBSERVER_ENABLE_PROXY_FIX: EnvVarName = "AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX"); +constant!(AIRFLOW_WEBSERVER_PROXY_FIX_X_FOR: EnvVarName = "AIRFLOW__WEBSERVER__PROXY_FIX_X_FOR"); +constant!(AIRFLOW_SCHEDULER_STANDALONE_DAG_PROCESSOR: EnvVarName = "AIRFLOW__SCHEDULER__STANDALONE_DAG_PROCESSOR"); +constant!(AIRFLOW_API_AUTH_JWT_SECRET: EnvVarName = "AIRFLOW__API_AUTH__JWT_SECRET"); +constant!(AIRFLOW_API_WORKERS: EnvVarName = "AIRFLOW__API__WORKERS"); +constant!(AIRFLOW_FAB_UPDATE_FAB_PERMS: EnvVarName = "AIRFLOW__FAB__UPDATE_FAB_PERMS"); +constant!(FORWARDED_ALLOW_IPS: EnvVarName = "FORWARDED_ALLOW_IPS"); +constant!(AIRFLOW_DATABASE_SQL_ALCHEMY_CONN: EnvVarName = "AIRFLOW__DATABASE__SQL_ALCHEMY_CONN"); + +constant!(AIRFLOW_WEBSERVER_EXPOSE_CONFIG: EnvVarName = "AIRFLOW__WEBSERVER__EXPOSE_CONFIG"); +constant!(AIRFLOW_CORE_EXECUTOR: EnvVarName = "AIRFLOW__CORE__EXECUTOR"); +constant!(AIRFLOW_KUBERNETES_EXECUTOR_POD_TEMPLATE_FILE: EnvVarName = + "AIRFLOW__KUBERNETES_EXECUTOR__POD_TEMPLATE_FILE"); +constant!(AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE: EnvVarName = "AIRFLOW__KUBERNETES_EXECUTOR__NAMESPACE"); + +constant!(AIRFLOW_CORE_EXECUTION_API_SERVER_URL: EnvVarName = "AIRFLOW__CORE__EXECUTION_API_SERVER_URL"); +constant!(AIRFLOW_CORE_BASE_URL: EnvVarName = "AIRFLOW__CORE__BASE_URL"); + +constant!(ADMIN_FIRSTNAME: EnvVarName = "ADMIN_FIRSTNAME"); +constant!(ADMIN_USERNAME: EnvVarName = "ADMIN_USERNAME"); +constant!(ADMIN_LASTNAME: EnvVarName = "ADMIN_LASTNAME"); +constant!(ADMIN_PASSWORD: EnvVarName = "ADMIN_PASSWORD"); +constant!(ADMIN_EMAIL: EnvVarName = "ADMIN_EMAIL"); + +constant!(ADMIN_USERNAME_SECRET_KEY: SecretKey = "adminUser.username"); +constant!(ADMIN_FIRSTNAME_SECRET_KEY: SecretKey = "adminUser.firstname"); +constant!(ADMIN_LASTNAME_SECRET_KEY: SecretKey = "adminUser.lastname"); +constant!(ADMIN_EMAIL_SECRET_KEY: SecretKey = "adminUser.email"); +constant!(ADMIN_PASSWORD_SECRET_KEY: SecretKey = "adminUser.password"); + +constant!(PYTHONPATH: EnvVarName = "PYTHONPATH"); + +constant!(CONTAINERDEBUG_LOG_DIRECTORY: EnvVarName = "CONTAINERDEBUG_LOG_DIRECTORY"); +constant!(STACKABLE_POST_HOOK: EnvVarName = "_STACKABLE_POST_HOOK"); #[derive(Snafu, Debug)] pub enum Error { @@ -76,7 +98,7 @@ pub fn build_airflow_statefulset_envs( airflow_role: &AirflowRole, env_overrides: &EnvVarSet, git_sync_resources: &git_sync::v1alpha2::GitSyncResources, -) -> Result, Error> { +) -> EnvVarSet { let executor = &cluster.cluster_config.executor; let auth_config = &cluster.cluster_config.authentication_config; let authorization_config = &cluster.cluster_config.authorization_config; @@ -84,138 +106,67 @@ pub fn build_airflow_statefulset_envs( let metadata_database_connection_details = cluster.metadata_database_connection_details(); let celery_database_connection_details = cluster.celery_database_connection_details(); - let mut env: BTreeMap = BTreeMap::new(); let internal_secret_name = cluster.internal_secret_name(); - env.extend(static_envs(git_sync_resources)); - - add_version_specific_env_vars(cluster, airflow_role, &mut env); - - // N.B. this has been deprecated and replaced with AIRFLOW__API__SECRET_KEY since 3.0.2. Can be removed when 3.0.1 is no longer supported. - env.insert( - AIRFLOW_WEBSERVER_SECRET_KEY.into(), - // The secret key is used to run the webserver flask app and also - // used to authorize requests to Celery workers when logs are retrieved. - env_var_from_secret( - AIRFLOW_WEBSERVER_SECRET_KEY, + let mut env_vars = static_envs(git_sync_resources) + .merge(add_version_specific_env_vars(cluster, airflow_role)) + // N.B. this has been deprecated and replaced with AIRFLOW__API__SECRET_KEY since 3.0.2. Can be removed when 3.0.1 is no longer supported. + .with_secret_key_ref( + &AIRFLOW_WEBSERVER_SECRET_KEY, &internal_secret_name, - INTERNAL_SECRET_SECRET_KEY, - ), - ); - // Replaces AIRFLOW__WEBSERVER__SECRET_KEY >= 3.0.2. - env.insert( - "AIRFLOW__API__SECRET_KEY".into(), - env_var_from_secret( - "AIRFLOW__API__SECRET_KEY", + &INTERNAL_SECRET_SECRET_KEY, + ) + // Replaces AIRFLOW__WEBSERVER__SECRET_KEY >= 3.0.2. + .with_secret_key_ref( + &AIRFLOW_API_SECRET_KEY, &internal_secret_name, - INTERNAL_SECRET_SECRET_KEY, - ), - ); - - env.insert( - "AIRFLOW__CORE__FERNET_KEY".into(), - env_var_from_secret( - "AIRFLOW__CORE__FERNET_KEY", - cluster.fernet_key_name(), - FERNET_KEY_SECRET_KEY, - ), - ); + &INTERNAL_SECRET_SECRET_KEY, + ) + .with_secret_key_ref( + &AIRFLOW_CORE_FERNET_KEY, + &cluster.fernet_key_name(), + &FERNET_KEY_SECRET_KEY, + ) + .with_value( + &AIRFLOW_DATABASE_SQL_ALCHEMY_CONN, + metadata_database_connection_details.url_template, + ); - env.insert( - AIRFLOW_DATABASE_SQL_ALCHEMY_CONN.into(), - EnvVar { - name: AIRFLOW_DATABASE_SQL_ALCHEMY_CONN.into(), - value: Some(metadata_database_connection_details.url_template.clone()), - ..Default::default() - }, - ); // Only needed when celery executors are used if let Some((celery_result_backend, celery_broker)) = celery_database_connection_details { - env.insert( - AIRFLOW_CELERY_RESULT_BACKEND.into(), - EnvVar { - name: AIRFLOW_CELERY_RESULT_BACKEND.into(), - value: Some(celery_result_backend.url_template.clone()), - ..Default::default() - }, - ); - env.insert( - AIRFLOW_CELERY_BROKER_URL.into(), - EnvVar { - name: AIRFLOW_CELERY_BROKER_URL.into(), - value: Some(celery_broker.url_template.clone()), - ..Default::default() - }, - ); + env_vars = env_vars + .with_value( + &AIRFLOW_CELERY_RESULT_BACKEND, + celery_result_backend.url_template, + ) + .with_value(&AIRFLOW_CELERY_BROKER_URL, celery_broker.url_template); } let dags_folder = get_dags_folder(git_sync_resources); - env.insert( - AIRFLOW_CORE_DAGS_FOLDER.into(), - EnvVar { - name: AIRFLOW_CORE_DAGS_FOLDER.into(), - value: Some(dags_folder), - ..Default::default() - }, - ); - - if cluster.cluster_config.load_examples { - env.insert( - AIRFLOW_CORE_LOAD_EXAMPLES.into(), - EnvVar { - name: AIRFLOW_CORE_LOAD_EXAMPLES.into(), - value: Some("True".into()), - ..Default::default() - }, - ); - } else { - env.insert( - AIRFLOW_CORE_LOAD_EXAMPLES.into(), - EnvVar { - name: AIRFLOW_CORE_LOAD_EXAMPLES.into(), - value: Some("False".into()), - ..Default::default() + env_vars = env_vars + .with_value(&AIRFLOW_CORE_DAGS_FOLDER, dags_folder) + .with_value( + &AIRFLOW_CORE_LOAD_EXAMPLES, + if cluster.cluster_config.load_examples { + "True" + } else { + "False" }, ); - } if cluster.cluster_config.expose_config { - env.insert( - AIRFLOW_WEBSERVER_EXPOSE_CONFIG.into(), - EnvVar { - name: AIRFLOW_WEBSERVER_EXPOSE_CONFIG.into(), - value: Some("True".into()), - ..Default::default() - }, - ); + env_vars = env_vars.with_value(&AIRFLOW_WEBSERVER_EXPOSE_CONFIG, "True"); } - env.insert( - AIRFLOW_CORE_EXECUTOR.into(), - EnvVar { - name: AIRFLOW_CORE_EXECUTOR.into(), - value: Some(executor.as_airflow_core_executor().to_owned()), - ..Default::default() - }, - ); + env_vars = env_vars.with_value(&AIRFLOW_CORE_EXECUTOR, executor.as_airflow_core_executor()); if let AirflowExecutor::KubernetesExecutors { .. } = executor { - env.insert( - AIRFLOW_KUBERNETES_EXECUTOR_POD_TEMPLATE_FILE.into(), - EnvVar { - name: AIRFLOW_KUBERNETES_EXECUTOR_POD_TEMPLATE_FILE.into(), - value: Some(format!("{TEMPLATE_LOCATION}/{TEMPLATE_NAME}")), - ..Default::default() - }, - ); - env.insert( - AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE.into(), - EnvVar { - name: AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE.into(), - value: Some(cluster.namespace.to_string()), - ..Default::default() - }, - ); + env_vars = env_vars + .with_value( + &AIRFLOW_KUBERNETES_EXECUTOR_POD_TEMPLATE_FILE, + format!("{TEMPLATE_LOCATION}/{TEMPLATE_NAME}"), + ) + .with_value(&AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE, &cluster.namespace); } match airflow_role { @@ -223,56 +174,38 @@ pub fn build_airflow_statefulset_envs( // See https://github.com/stackabletech/airflow-operator/issues/259 AirflowRole::Scheduler => { let secret = &cluster.cluster_config.credentials_secret_name; - env.insert( - ADMIN_USERNAME.into(), - env_var_from_secret(ADMIN_USERNAME, secret, "adminUser.username"), - ); - env.insert( - ADMIN_FIRSTNAME.into(), - env_var_from_secret(ADMIN_FIRSTNAME, secret, "adminUser.firstname"), - ); - env.insert( - ADMIN_LASTNAME.into(), - env_var_from_secret(ADMIN_LASTNAME, secret, "adminUser.lastname"), - ); - env.insert( - ADMIN_EMAIL.into(), - env_var_from_secret(ADMIN_EMAIL, secret, "adminUser.email"), - ); - env.insert( - ADMIN_PASSWORD.into(), - env_var_from_secret(ADMIN_PASSWORD, secret, "adminUser.password"), - ); + env_vars = env_vars + .with_secret_key_ref(&ADMIN_USERNAME, secret, &ADMIN_USERNAME_SECRET_KEY) + .with_secret_key_ref(&ADMIN_FIRSTNAME, secret, &ADMIN_FIRSTNAME_SECRET_KEY) + .with_secret_key_ref(&ADMIN_LASTNAME, secret, &ADMIN_LASTNAME_SECRET_KEY) + .with_secret_key_ref(&ADMIN_EMAIL, secret, &ADMIN_EMAIL_SECRET_KEY) + .with_secret_key_ref(&ADMIN_PASSWORD, secret, &ADMIN_PASSWORD_SECRET_KEY); } AirflowRole::Webserver => { - let mut vars = authentication_env_vars(auth_config); - vars.extend(authorization_env_vars( - authorization_config, - &resolved_product_image.product_version, - )); - env.extend(vars.into_iter().map(|var| (var.name.to_owned(), var))); + env_vars = + env_vars + .merge(authentication_env_vars(auth_config)) + .merge(authorization_env_vars( + authorization_config, + &resolved_product_image.product_version, + )); } _ => {} } - // apply overrides last of all; `EnvVarSet` is keyed by name, so iteration is already - // in a fixed (sorted-by-name) order - for env_var in env_overrides.clone() { - env.insert(env_var.name.clone(), env_var); - } - // Needed for the `containerdebug` process to log it's tracing information to. - env.insert( - "CONTAINERDEBUG_LOG_DIRECTORY".to_string(), - EnvVar { - name: "CONTAINERDEBUG_LOG_DIRECTORY".to_string(), - value: Some(format!("{STACKABLE_LOG_DIR}/containerdebug")), - value_from: None, - }, - ); - - tracing::debug!("Env-var set [{:?}]", env); - Ok(transform_map_to_vec(env)) + env_vars = env_vars + .with_value( + &CONTAINERDEBUG_LOG_DIRECTORY, + format!("{STACKABLE_LOG_DIR}/containerdebug"), + ) + // apply overrides last of all; `EnvVarSet` is keyed by name, so iteration is already + // in a fixed (sorted-by-name) order + .merge(env_overrides.clone()); + + tracing::debug!("Env-var set: {:?}", Vec::from(&env_vars)); + + env_vars } pub fn get_dags_folder(git_sync_resources: &git_sync::v1alpha2::GitSyncResources) -> String { @@ -296,224 +229,108 @@ pub fn get_dags_folder(git_sync_resources: &git_sync::v1alpha2::GitSyncResources // This set of environment variables is a standard set that is not dependent on any // conditional logic and should be applied to the statefulset or the executor template config map. -fn static_envs( - git_sync_resources: &git_sync::v1alpha2::GitSyncResources, -) -> BTreeMap { - let mut env: BTreeMap = BTreeMap::new(); - +fn static_envs(git_sync_resources: &git_sync::v1alpha2::GitSyncResources) -> EnvVarSet { let dags_folder = get_dags_folder(git_sync_resources); - env.insert( - PYTHONPATH.into(), - EnvVar { - // PYTHONPATH must be extended to include the dags folder so that dag - // dependencies can be found: this must be the actual path and not a variable. - // Also include the airflow site-packages by default (for airflow and kubernetes classes etc.) - name: PYTHONPATH.into(), - value: Some(format!("{LOG_CONFIG_DIR}:{dags_folder}")), - ..Default::default() - }, - ); - env.insert( - AIRFLOW_LOGGING_LOGGING_CONFIG_CLASS.into(), - EnvVar { - name: AIRFLOW_LOGGING_LOGGING_CONFIG_CLASS.into(), - value: Some("log_config.LOGGING_CONFIG".into()), - ..Default::default() - }, - ); - - env.insert( - AIRFLOW_METRICS_STATSD_ON.into(), - EnvVar { - name: AIRFLOW_METRICS_STATSD_ON.into(), - value: Some("True".into()), - ..Default::default() - }, - ); - - env.insert( - AIRFLOW_METRICS_STATSD_HOST.into(), - EnvVar { - name: AIRFLOW_METRICS_STATSD_HOST.into(), - value: Some("0.0.0.0".into()), - ..Default::default() - }, - ); - - env.insert( - AIRFLOW_METRICS_STATSD_PORT.into(), - EnvVar { - name: AIRFLOW_METRICS_STATSD_PORT.into(), - value: Some("9125".into()), - ..Default::default() - }, - ); - - env + EnvVarSet::new() + // PYTHONPATH must be extended to include the dags folder so that dag + // dependencies can be found: this must be the actual path and not a variable. + // Also include the airflow site-packages by default (for airflow and kubernetes classes etc.) + .with_value(&PYTHONPATH, format!("{LOG_CONFIG_DIR}:{dags_folder}")) + .with_value( + &AIRFLOW_LOGGING_LOGGING_CONFIG_CLASS, + "log_config.LOGGING_CONFIG", + ) + .with_value(&AIRFLOW_METRICS_STATSD_ON, "True") + .with_value(&AIRFLOW_METRICS_STATSD_HOST, "0.0.0.0") + .with_value(&AIRFLOW_METRICS_STATSD_PORT, "9125") } /// Return environment variables to be applied to the configuration map used in conjunction with /// the `kubernetesExecutor` worker. pub fn build_airflow_template_envs( cluster: &ValidatedCluster, - env_overrides: &HashMap, + env_overrides: &EnvVarSet, logging: &ValidatedLogging, git_sync_resources: &git_sync::v1alpha2::GitSyncResources, -) -> Vec { - let mut env: BTreeMap = BTreeMap::new(); - - env.insert( - AIRFLOW_DATABASE_SQL_ALCHEMY_CONN.into(), - EnvVar { - name: AIRFLOW_DATABASE_SQL_ALCHEMY_CONN.into(), - value: Some( - cluster - .metadata_database_connection_details() - .url_template - .clone(), - ), - ..Default::default() - }, - ); - - env.insert( - AIRFLOW_CORE_EXECUTOR.into(), - EnvVar { - name: AIRFLOW_CORE_EXECUTOR.into(), - value: Some("LocalExecutor".to_string()), - ..Default::default() - }, - ); - - env.insert( - AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE.into(), - EnvVar { - name: AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE.into(), - value: Some(cluster.namespace.to_string()), - ..Default::default() - }, - ); - +) -> EnvVarSet { // the config map also requires the dag-folder location as this will be passed on // to the pods started by airflow. let dags_folder = get_dags_folder(git_sync_resources); - env.insert( - AIRFLOW_CORE_DAGS_FOLDER.into(), - EnvVar { - name: AIRFLOW_CORE_DAGS_FOLDER.into(), - value: Some(dags_folder), - ..Default::default() - }, - ); - - env.extend(static_envs(git_sync_resources)); - add_version_specific_env_vars(cluster, &AirflowRole::Worker, &mut env); + let mut env_vars = EnvVarSet::new() + .with_value( + &AIRFLOW_DATABASE_SQL_ALCHEMY_CONN, + cluster.metadata_database_connection_details().url_template, + ) + .with_value(&AIRFLOW_CORE_EXECUTOR, "LocalExecutor") + .with_value(&AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE, &cluster.namespace) + .with_value(&AIRFLOW_CORE_DAGS_FOLDER, dags_folder) + .merge(static_envs(git_sync_resources)) + .merge(add_version_specific_env_vars(cluster, &AirflowRole::Worker)); // _STACKABLE_POST_HOOK will contain a command to create a shutdown hook that will be // evaluated in the wrapper for each stackable spark container: this is necessary for pods // that are created and then terminated (we do a similar thing for spark-k8s). if logging.enable_vector_agent { - env.insert( - "_STACKABLE_POST_HOOK".into(), - EnvVar { - name: "_STACKABLE_POST_HOOK".into(), - value: Some( - [ - // Wait for Vector to gather the logs. - "sleep 10", - &create_vector_shutdown_file_command(STACKABLE_LOG_DIR), - ] - .join("; "), - ), - ..Default::default() - }, + env_vars = env_vars.with_value( + &STACKABLE_POST_HOOK, + [ + // Wait for Vector to gather the logs. + "sleep 10", + &create_vector_shutdown_file_command(STACKABLE_LOG_DIR), + ] + .join("; "), ); } - // iterate over a BTreeMap to ensure the vars are written in a predictable order - for (k, v) in env_overrides.iter().collect::>() { - env.insert( - k.to_string(), - EnvVar { - name: k.to_string(), - value: Some(v.to_string()), - ..Default::default() - }, - ); - } + env_vars = env_vars.merge(env_overrides.clone()); - tracing::debug!("Env-var set [{:?}]", env); - transform_map_to_vec(env) + tracing::debug!("Env-var set [{:?}]", env_vars); + + env_vars } fn add_version_specific_env_vars( cluster: &ValidatedCluster, airflow_role: &AirflowRole, - env: &mut BTreeMap, -) { +) -> EnvVarSet { + let mut env_vars = EnvVarSet::new(); + if cluster.image.product_version.starts_with("3.") { - env.extend(execution_server_env_vars(cluster)); - env.insert( - AIRFLOW_CORE_AUTH_MANAGER.into(), - EnvVar { - name: AIRFLOW_CORE_AUTH_MANAGER.into(), - value: Some( - "airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager" - .to_string(), - ), - ..Default::default() - }, - ); - env.insert( - AIRFLOW_API_AUTH_BACKENDS.into(), - EnvVar { - name: AIRFLOW_API_AUTH_BACKENDS.into(), - value: Some("airflow.api.auth.backend.session".into()), - ..Default::default() - }, - ); - // As of 3.x a JWT key is required. - // See https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#jwt-secret - // This should be random, but must also be consistent across - // api-services and replicas/roles for a given - // cluster, but should also be cluster-specific. - // It is accessed from a secret to avoid cluster restarts - // being triggered by an operator restart. - env.insert( - "AIRFLOW__API_AUTH__JWT_SECRET".into(), - env_var_from_secret( - "AIRFLOW__API_AUTH__JWT_SECRET", - cluster.jwt_secret_name(), - JWT_SECRET_SECRET_KEY, - ), - ); - // The Airflow default for this is 4. - // However, with the default resources this could cause problems, - // as the Pod went to 100% CPU usage and didn't get healthy - // quick enough, resulting in a crashloop. - env.insert( - "AIRFLOW__API__WORKERS".into(), - EnvVar { - name: "AIRFLOW__API__WORKERS".into(), - value: Some("1".into()), - ..Default::default() - }, - ); + env_vars = env_vars + .merge(execution_server_env_vars(cluster)) + .with_value( + &AIRFLOW_CORE_AUTH_MANAGER, + "airflow.providers.fab.auth_manager.fab_auth_manager.FabAuthManager", + ) + .with_value( + &AIRFLOW_API_AUTH_BACKENDS, + "airflow.api.auth.backend.session", + ) + // As of 3.x a JWT key is required. + // See https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#jwt-secret + // This should be random, but must also be consistent across + // api-services and replicas/roles for a given + // cluster, but should also be cluster-specific. + // It is accessed from a secret to avoid cluster restarts + // being triggered by an operator restart. + .with_secret_key_ref( + &AIRFLOW_API_AUTH_JWT_SECRET, + &cluster.jwt_secret_name(), + &JWT_SECRET_SECRET_KEY, + ) + // The Airflow default for this is 4. + // However, with the default resources this could cause problems, + // as the Pod went to 100% CPU usage and didn't get healthy + // quick enough, resulting in a crashloop. + .with_value(&AIRFLOW_API_WORKERS, "1"); if airflow_role == &AirflowRole::Webserver { // Sometimes a race condition can arise when both scheduler and // api-server are updating the DB, which adds overhead (conflicts // are logged) and can result in inconsistencies. This setting // ensure that only the scheduler will do this by default. - env.insert( - "AIRFLOW__FAB__UPDATE_FAB_PERMS".into(), - EnvVar { - name: "AIRFLOW__FAB__UPDATE_FAB_PERMS".into(), - value: Some("False".into()), - ..Default::default() - }, - ); + env_vars = env_vars.with_value(&AIRFLOW_FAB_UPDATE_FAB_PERMS, "False"); // This env var is needed in addition to `--proxy-headers` when Airflow runs // behind a reverse proxy. @@ -529,26 +346,13 @@ fn add_version_specific_env_vars( .join(","); if !trusted_proxies.is_empty() { - env.insert( - "FORWARDED_ALLOW_IPS".into(), - EnvVar { - name: "FORWARDED_ALLOW_IPS".into(), - value: Some(trusted_proxies), - ..Default::default() - }, - ); + env_vars = env_vars.with_value(&FORWARDED_ALLOW_IPS, trusted_proxies); } } } else { - env.insert( - AIRFLOW_API_AUTH_BACKENDS.into(), - EnvVar { - name: AIRFLOW_API_AUTH_BACKENDS.into(), - value: Some( - "airflow.api.auth.backend.basic_auth, airflow.api.auth.backend.session".into(), - ), - ..Default::default() - }, + env_vars = env_vars.with_value( + &AIRFLOW_API_AUTH_BACKENDS, + "airflow.api.auth.backend.basic_auth, airflow.api.auth.backend.session", ); // The 2.x uses Werkzeug's `ProxyFix` to allow forwarded-headers and it does so regardless @@ -561,22 +365,9 @@ fn add_version_specific_env_vars( .unwrap_or_default(); if !trusted_proxies.is_empty() { - env.insert( - "AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX".into(), - EnvVar { - name: "AIRFLOW__WEBSERVER__ENABLE_PROXY_FIX".into(), - value: Some("True".into()), - ..Default::default() - }, - ); - env.insert( - "AIRFLOW__WEBSERVER__PROXY_FIX_X_FOR".into(), - EnvVar { - name: "AIRFLOW__WEBSERVER__PROXY_FIX_X_FOR".into(), - value: Some("1".into()), - ..Default::default() - }, - ); + env_vars = env_vars + .with_value(&AIRFLOW_WEBSERVER_ENABLE_PROXY_FIX, "True") + .with_value(&AIRFLOW_WEBSERVER_PROXY_FIX_X_FOR, "1"); if !trusted_proxies.iter().any(TrustedProxy::is_wildcard) { let product_version = &cluster.image.product_version; @@ -594,27 +385,14 @@ fn add_version_specific_env_vars( // In airflow 2.x the dag-processor can optionally be started as a // standalone process (rather then as a scheduler subprocess), // accompanied by this env-var being set to True. - env.insert( - "AIRFLOW__SCHEDULER__STANDALONE_DAG_PROCESSOR".into(), - EnvVar { - name: "AIRFLOW__SCHEDULER__STANDALONE_DAG_PROCESSOR".into(), - value: Some("True".into()), - ..Default::default() - }, - ); + env_vars = env_vars.with_value(&AIRFLOW_SCHEDULER_STANDALONE_DAG_PROCESSOR, "True"); } } -} -// Internally the environment variable collection uses a map so that overrides can actually -// override existing keys. The returned collection will be a vector. -fn transform_map_to_vec(env_map: BTreeMap) -> Vec { - env_map.into_values().collect::>() + env_vars } -fn authentication_env_vars( - auth_config: &AirflowClientAuthenticationDetailsResolved, -) -> Vec { +fn authentication_env_vars(auth_config: &AirflowClientAuthenticationDetailsResolved) -> EnvVarSet { // Different OIDC authentication entries can reference the same // client secret. It must be ensured that the env variables are only // added once in such a case. @@ -635,7 +413,11 @@ fn authentication_env_vars( .iter() .cloned() .flat_map(oidc::v1alpha1::AuthenticationProvider::client_credentials_env_var_mounts) - .collect() + .fold(EnvVarSet::new(), + |env_vars, env_var| env_vars + .with_env_var(env_var) + .expect("env_var name is valid because it is either OIDC_<16-hex-characters>_CLIENT_ID or OIDC_<16-hex-characters>_CLIENT_SECRET") + ) } /// Constructs the needed authorization env vars for the specific Airflow version. @@ -647,43 +429,35 @@ fn authentication_env_vars( fn authorization_env_vars( authorization_config: &AirflowAuthorizationResolved, product_version: &str, -) -> Vec { +) -> EnvVarSet { let Some(opa) = &authorization_config.opa else { - return vec![]; + return EnvVarSet::new(); }; - let mut env = vec![EnvVar { - name: AIRFLOW_CORE_AUTH_MANAGER.into(), - value: Some("opa_auth_manager.opa_fab_auth_manager.OpaFabAuthManager".to_string()), - ..Default::default() - }]; + let mut env_vars = EnvVarSet::new().with_value( + &AIRFLOW_CORE_AUTH_MANAGER, + "opa_auth_manager.opa_fab_auth_manager.OpaFabAuthManager", + ); if product_version.starts_with("2.") { // OPA config needs to go into `webserver_config.py` } else { - env.extend([ - EnvVar { - name: AIRFLOW_CORE_AUTH_OPA_REQUEST_URL.into(), - value: Some(opa.connection_string.to_owned()), - ..Default::default() - }, - EnvVar { - name: AIRFLOW_CORE_AUTH_OPA_CACHE_TTL_IN_SEC.into(), - value: Some(opa.cache_entry_time_to_live.as_secs().to_string()), - ..Default::default() - }, - EnvVar { - name: AIRFLOW_CORE_AUTH_OPA_CACHE_MAXSIZE.into(), - value: Some(opa.cache_max_entries.to_string()), - ..Default::default() - }, - ]); + env_vars = env_vars + .with_value(&AIRFLOW_CORE_AUTH_OPA_REQUEST_URL, &opa.connection_string) + .with_value( + &AIRFLOW_CORE_AUTH_OPA_CACHE_TTL_IN_SEC, + opa.cache_entry_time_to_live.as_secs().to_string(), + ) + .with_value( + &AIRFLOW_CORE_AUTH_OPA_CACHE_MAXSIZE, + opa.cache_max_entries.to_string(), + ); } - env + env_vars } -fn execution_server_env_vars(cluster: &ValidatedCluster) -> BTreeMap { - let mut env: BTreeMap = BTreeMap::new(); +fn execution_server_env_vars(cluster: &ValidatedCluster) -> EnvVarSet { + let mut env_vars = EnvVarSet::new(); let name = cluster.name_any(); // The execution API server URL can be any webserver (if there @@ -693,25 +467,18 @@ fn execution_server_env_vars(cluster: &ValidatedCluster) -> BTreeMap = std::result::Result; pub fn build_executor_template_config_map( cluster: &ValidatedCluster, executor_config: &ValidatedAirflowConfig, - env_overrides: &HashMap, + env_overrides: &EnvVarSet, pod_overrides: &PodTemplateSpec, ) -> Result { let resolved_product_image = &cluster.image; diff --git a/rust/operator-binary/src/controller/build/resource/statefulset.rs b/rust/operator-binary/src/controller/build/resource/statefulset.rs index 28a32949..bfec1448 100644 --- a/rust/operator-binary/src/controller/build/resource/statefulset.rs +++ b/rust/operator-binary/src/controller/build/resource/statefulset.rs @@ -76,9 +76,6 @@ pub enum Error { source: stackable_operator::builder::pod::container::Error, }, - #[snafu(display("failed to build Statefulset environmental variables"))] - BuildStatefulsetEnvVars { source: env_vars::Error }, - #[snafu(display("failed to build shared pod resources"))] Pod { source: crate::controller::build::resource::pod::Error, @@ -190,15 +187,12 @@ pub fn build_server_rolegroup_statefulset( ]) .args(vec![airflow_container_args.join("\n")]); - airflow_container.add_env_vars( - env_vars::build_airflow_statefulset_envs( - validated_cluster, - airflow_role, - env_overrides, - git_sync_resources, - ) - .context(BuildStatefulsetEnvVarsSnafu)?, - ); + airflow_container.add_env_vars(env_vars::build_airflow_statefulset_envs( + validated_cluster, + airflow_role, + env_overrides, + git_sync_resources, + )); let volume_mounts = validated_cluster.volume_mounts(); airflow_container diff --git a/rust/operator-binary/src/controller/mod.rs b/rust/operator-binary/src/controller/mod.rs index dbcace68..e7556edc 100644 --- a/rust/operator-binary/src/controller/mod.rs +++ b/rust/operator-binary/src/controller/mod.rs @@ -1,8 +1,4 @@ -use std::{ - collections::{BTreeMap, HashMap}, - marker::PhantomData, - str::FromStr, -}; +use std::{collections::BTreeMap, marker::PhantomData, str::FromStr}; use stackable_operator::{ commons::{ @@ -30,6 +26,7 @@ use stackable_operator::{ shared::time::Duration, v2::{ HasName, HasUid, NameIsValidLabelValue, + builder::pod::container::EnvVarSet, product_logging::framework::{ValidatedContainerLogConfigChoice, VectorContainerLogConfig}, role_group_utils::ResourceNames, role_utils, @@ -159,7 +156,7 @@ pub struct ValidatedExecutorTemplate { /// The merged + validated executor config (resources, affinity, logging, …). pub config: ValidatedAirflowConfig, /// Env-var overrides for the executor pod template (`spec.kubernetesExecutors.envOverrides`). - pub env_overrides: HashMap, + pub env_overrides: EnvVarSet, /// Pod overrides for the executor pod template (`spec.kubernetesExecutors.podOverrides`). pub pod_overrides: PodTemplateSpec, } diff --git a/rust/operator-binary/src/controller/validate.rs b/rust/operator-binary/src/controller/validate.rs index ca5a0a4f..96d045b8 100644 --- a/rust/operator-binary/src/controller/validate.rs +++ b/rust/operator-binary/src/controller/validate.rs @@ -5,17 +5,17 @@ use stackable_operator::{ commons::product_image_selection, config::fragment, crd::git_sync, - k8s_openapi::api::core::v1::{EnvVar, VolumeMount}, + k8s_openapi::api::core::v1::VolumeMount, kube::ResourceExt, product_logging::spec::Logging, - role_utils::{GenericRoleConfig, RoleGroup}, + role_utils::GenericRoleConfig, v2::{ - builder::pod::container::{EnvVarName, EnvVarSet}, + builder::pod::container::EnvVarSet, controller_utils::{get_namespace, get_uid}, product_logging::framework::{ VectorContainerLogConfig, validate_logging_configuration_for_container, }, - role_utils::{GenericCommonConfig, RoleGroupConfig, with_validated_config}, + role_utils::{GenericCommonConfig, RoleGroup, RoleGroupConfig, with_validated_config}, types::{ kubernetes::ConfigMapName, operator::{ClusterName, RoleGroupName}, @@ -30,7 +30,7 @@ use super::{ build::volumes::LOG_VOLUME_NAME, dereference::DereferencedObjects, }; use crate::{ - airflow_controller::{CONTAINER_IMAGE_BASE_NAME, env_vars_from_overrides}, + airflow_controller::CONTAINER_IMAGE_BASE_NAME, crd::{ AirflowConfig, AirflowConfigFragment, AirflowConfigOverrides, AirflowExecutor, AirflowRole, AirflowRoleType, Container, v1alpha2, @@ -75,11 +75,6 @@ pub enum Error { role_group: RoleGroupName, }, - #[snafu(display("failed to parse an environment variable override name"))] - ParseEnvVarName { - source: stackable_operator::v2::macros::attributed_string_type::Error, - }, - #[snafu(display("failed to validate the logging configuration"))] ValidateLoggingConfig { source: stackable_operator::v2::product_logging::framework::Error, @@ -215,11 +210,14 @@ pub fn validate_cluster( &Container::Base, &vector_aggregator_config_map_name, )?; + + let env_overrides: EnvVarSet = common_configuration.env_overrides.clone().into(); + // Resolve the executor's git-sync resources up-front too, mirroring the role groups. let git_sync_resources = git_sync::v1alpha2::GitSyncResources::new( &airflow.spec.cluster_config.dags_git_sync, &resolved_product_image, - &env_vars_from_overrides(&common_configuration.env_overrides), + &env_overrides.clone().into_iter().collect::>(), &airflow.spec.cluster_config.volume_mounts, LOG_VOLUME_NAME.as_ref(), &logging.git_sync_container, @@ -231,7 +229,7 @@ pub fn validate_cluster( logging, git_sync_resources, ), - env_overrides: common_configuration.env_overrides.clone(), + env_overrides, pod_overrides: common_configuration.pod_overrides.clone(), }) } @@ -290,14 +288,6 @@ fn validate_role_group( role_group: role_group_name.clone(), })?; - let mut env_overrides = EnvVarSet::new(); - for (env_var_name, env_var_value) in validated.config.env_overrides { - env_overrides = env_overrides.with_value( - &EnvVarName::from_str(&env_var_name).context(ParseEnvVarNameSnafu)?, - env_var_value, - ); - } - let merged_config = validated.config.config; let logging = validate_logging( &merged_config.logging, @@ -305,12 +295,14 @@ fn validate_role_group( vector_aggregator_config_map_name, )?; + let env_overrides: EnvVarSet = validated.config.env_overrides.clone().into(); + // The git-sync resources depend on this role group's env-var overrides and (git-sync) logging // config, so they are resolved (and validated) here, up-front, rather than at build time. let git_sync_resources = git_sync::v1alpha2::GitSyncResources::new( dags_git_sync, image, - &Vec::::from(env_overrides.clone()), + &env_overrides.clone().into_iter().collect::>(), volume_mounts, LOG_VOLUME_NAME.as_ref(), &logging.git_sync_container, @@ -367,7 +359,7 @@ pub(crate) fn validate_logging( mod tests { use std::collections::BTreeMap; - use stackable_operator::k8s_openapi::api::core::v1::EnvVar; + use stackable_operator::v2::builder::pod::container::{EnvVarName, EnvVarSet}; use super::validate_role_group; use crate::crd::{AirflowConfig, AirflowRole, v1alpha2}; @@ -467,19 +459,17 @@ mod tests { ); // env overrides layer role-group on top of role. - let env_overrides: BTreeMap> = - Vec::::from(validated.env_overrides) - .into_iter() - .map(|env_var| (env_var.name, env_var.value)) - .collect(); - assert_eq!(env_overrides.len(), 2); - assert_eq!( - env_overrides.get("ROLE_ENV_VAR").unwrap().as_deref(), - Some("role-env-value") - ); assert_eq!( - env_overrides.get("GROUP_ENV_VAR").unwrap().as_deref(), - Some("group-env-value") + validated.env_overrides, + EnvVarSet::new() + .with_value( + &EnvVarName::from_str_unsafe("ROLE_ENV_VAR"), + "role-env-value" + ) + .with_value( + &EnvVarName::from_str_unsafe("GROUP_ENV_VAR"), + "group-env-value" + ) ); } @@ -562,7 +552,7 @@ mod tests { .overrides .is_empty() ); - assert!(Vec::::from(validated.env_overrides).is_empty()); + assert_eq!(validated.env_overrides, EnvVarSet::new()); } /// `replicas` and the role←role-group merged `pod_overrides` are produced by diff --git a/rust/operator-binary/src/crd/internal_secret.rs b/rust/operator-binary/src/crd/internal_secret.rs index c5755fd2..60515bf9 100644 --- a/rust/operator-binary/src/crd/internal_secret.rs +++ b/rust/operator-binary/src/crd/internal_secret.rs @@ -1,12 +1,16 @@ +use std::str::FromStr; + +use stackable_operator::{constant, v2::types::kubernetes::SecretKey}; + // Secret key used to run the api server. It should be as random as possible. // It should be consistent across instances of the webserver. The webserver key // is also used to authorize requests to Celery workers when logs are retrieved. -pub const INTERNAL_SECRET_SECRET_KEY: &str = "INTERNAL_SECRET"; +constant!(pub INTERNAL_SECRET_SECRET_KEY: SecretKey = "INTERNAL_SECRET"); // Used for env-var: AIRFLOW__API_AUTH__JWT_SECRET // Secret key used to encode and decode JWTs to authenticate to public and // private APIs. It should be as random as possible, but consistent across // instances of API services. -pub const JWT_SECRET_SECRET_KEY: &str = "JWT_SECRET"; +constant!(pub JWT_SECRET_SECRET_KEY: SecretKey = "JWT_SECRET"); // Used for env-var: AIRFLOW__CORE__FERNET_KEY // See https://airflow.apache.org/docs/apache-airflow/stable/security/secrets/fernet.html#security-fernet -pub const FERNET_KEY_SECRET_KEY: &str = "FERNET_KEY"; +constant!(pub FERNET_KEY_SECRET_KEY: SecretKey = "FERNET_KEY"); diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index fc4ede94..15ba05e9 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -32,7 +32,7 @@ use stackable_operator::{ framework::{create_vector_shutdown_file_command, remove_vector_shutdown_file_command}, spec::Logging, }, - role_utils::{CommonConfiguration, GenericRoleConfig, Role, RoleGroup}, + role_utils::GenericRoleConfig, schemars::{self, JsonSchema}, shared::time::Duration, status::condition::{ClusterCondition, HasStatusCondition}, @@ -41,7 +41,7 @@ use stackable_operator::{ config_overrides::KeyValueConfigOverrides, flask_config_writer::{FlaskAppConfigOptions, PythonType}, product_logging::framework::STACKABLE_LOG_DIR, - role_utils::GenericCommonConfig, + role_utils::{CommonConfiguration, GenericCommonConfig, Role, RoleGroup}, types::{ common::Port, kubernetes::{ diff --git a/rust/operator-binary/src/util.rs b/rust/operator-binary/src/util.rs index 428e67b2..2f4b1fbb 100644 --- a/rust/operator-binary/src/util.rs +++ b/rust/operator-binary/src/util.rs @@ -1,20 +1,3 @@ -use stackable_operator::k8s_openapi::api::core::v1::{EnvVar, EnvVarSource, SecretKeySelector}; - -pub fn env_var_from_secret(var_name: &str, secret: impl AsRef, secret_key: &str) -> EnvVar { - EnvVar { - name: String::from(var_name), - value_from: Some(EnvVarSource { - secret_key_ref: Some(SecretKeySelector { - name: String::from(secret.as_ref()), - key: String::from(secret_key), - ..Default::default() - }), - ..Default::default() - }), - ..Default::default() - } -} - pub fn role_service_name(name: &str, role: &str) -> String { format!("{name}-{role}") } From 5d9fa2baeea43592530ff6568090a30092433ab2 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 14 Aug 2026 17:42:42 +0200 Subject: [PATCH 3/5] chore: Test the constants --- .../controller/build/properties/env_vars.rs | 48 +++++++++++++++++++ .../src/crd/internal_secret.rs | 13 +++++ 2 files changed, 61 insertions(+) diff --git a/rust/operator-binary/src/controller/build/properties/env_vars.rs b/rust/operator-binary/src/controller/build/properties/env_vars.rs index 6a025f02..b4fe6403 100644 --- a/rust/operator-binary/src/controller/build/properties/env_vars.rs +++ b/rust/operator-binary/src/controller/build/properties/env_vars.rs @@ -488,6 +488,54 @@ mod tests { use super::*; use crate::crd::authorization::OpaConfigResolved; + #[test] + fn test_constants() { + // Test that dereferencing the constants does not panic. + let _ = *ADMIN_EMAIL; + let _ = *ADMIN_EMAIL_SECRET_KEY; + let _ = *ADMIN_FIRSTNAME; + let _ = *ADMIN_FIRSTNAME_SECRET_KEY; + let _ = *ADMIN_LASTNAME; + let _ = *ADMIN_LASTNAME_SECRET_KEY; + let _ = *ADMIN_PASSWORD; + let _ = *ADMIN_PASSWORD_SECRET_KEY; + let _ = *ADMIN_USERNAME; + let _ = *ADMIN_USERNAME_SECRET_KEY; + let _ = *AIRFLOW_API_AUTH_BACKENDS; + let _ = *AIRFLOW_API_AUTH_JWT_SECRET; + let _ = *AIRFLOW_API_SECRET_KEY; + let _ = *AIRFLOW_API_WORKERS; + let _ = *AIRFLOW_CELERY_BROKER_URL; + let _ = *AIRFLOW_CELERY_RESULT_BACKEND; + let _ = *AIRFLOW_CORE_AUTH_MANAGER; + let _ = *AIRFLOW_CORE_AUTH_OPA_CACHE_MAXSIZE; + let _ = *AIRFLOW_CORE_AUTH_OPA_CACHE_TTL_IN_SEC; + let _ = *AIRFLOW_CORE_AUTH_OPA_REQUEST_URL; + let _ = *AIRFLOW_CORE_BASE_URL; + let _ = *AIRFLOW_CORE_DAGS_FOLDER; + let _ = *AIRFLOW_CORE_EXECUTION_API_SERVER_URL; + let _ = *AIRFLOW_CORE_EXECUTOR; + let _ = *AIRFLOW_CORE_FERNET_KEY; + let _ = *AIRFLOW_CORE_LOAD_EXAMPLES; + let _ = *AIRFLOW_DATABASE_SQL_ALCHEMY_CONN; + let _ = *AIRFLOW_FAB_UPDATE_FAB_PERMS; + let _ = *AIRFLOW_KUBERNETES_EXECUTOR_NAMESPACE; + let _ = *AIRFLOW_KUBERNETES_EXECUTOR_POD_TEMPLATE_FILE; + let _ = *AIRFLOW_LOGGING_LOGGING_CONFIG_CLASS; + let _ = *AIRFLOW_METRICS_STATSD_HOST; + let _ = *AIRFLOW_METRICS_STATSD_ON; + let _ = *AIRFLOW_METRICS_STATSD_PORT; + let _ = *AIRFLOW_SCHEDULER_STANDALONE_DAG_PROCESSOR; + let _ = *AIRFLOW_WEBSERVER_ENABLE_PROXY_FIX; + let _ = *AIRFLOW_WEBSERVER_EXPOSE_CONFIG; + let _ = *AIRFLOW_WEBSERVER_PROXY_FIX_X_FOR; + let _ = *AIRFLOW_WEBSERVER_SECRET_KEY; + let _ = *CONTAINERDEBUG_LOG_DIRECTORY; + let _ = *FORWARDED_ALLOW_IPS; + let _ = *PYTHONPATH; + let _ = *STACKABLE_POST_HOOK; + } + #[test] fn test_airflow_2_authorization_env_vars() { let authorization_config = get_test_authorization_config(); diff --git a/rust/operator-binary/src/crd/internal_secret.rs b/rust/operator-binary/src/crd/internal_secret.rs index 60515bf9..0730700a 100644 --- a/rust/operator-binary/src/crd/internal_secret.rs +++ b/rust/operator-binary/src/crd/internal_secret.rs @@ -14,3 +14,16 @@ constant!(pub JWT_SECRET_SECRET_KEY: SecretKey = "JWT_SECRET"); // Used for env-var: AIRFLOW__CORE__FERNET_KEY // See https://airflow.apache.org/docs/apache-airflow/stable/security/secrets/fernet.html#security-fernet constant!(pub FERNET_KEY_SECRET_KEY: SecretKey = "FERNET_KEY"); + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_constants() { + // Test that dereferencing the constants does not panic. + let _ = *FERNET_KEY_SECRET_KEY; + let _ = *INTERNAL_SECRET_SECRET_KEY; + let _ = *JWT_SECRET_SECRET_KEY; + } +} From 8dcdd8933f5e12f2ad502290cf15ece33597d05c Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 14 Aug 2026 18:23:22 +0200 Subject: [PATCH 4/5] chore: Remove obsolete comment --- rust/operator-binary/src/controller/mod.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/rust/operator-binary/src/controller/mod.rs b/rust/operator-binary/src/controller/mod.rs index e7556edc..0c34e0f4 100644 --- a/rust/operator-binary/src/controller/mod.rs +++ b/rust/operator-binary/src/controller/mod.rs @@ -63,7 +63,6 @@ pub mod dereference; pub mod update_status; pub mod validate; -// Placeholder version label value for resources whose labels must not change after deployment. constant!(PRODUCT_NAME: ProductName = APP_NAME); constant!(OPERATOR_NAME: OperatorName = crd::OPERATOR_NAME); constant!(CONTROLLER_NAME: ControllerName = AIRFLOW_CONTROLLER_NAME); From 91f56582a0a5a6dfb3fb23154842c2b35af8ae48 Mon Sep 17 00:00:00 2001 From: Siegfried Weber Date: Fri, 14 Aug 2026 19:16:12 +0200 Subject: [PATCH 5/5] chore: Update changelog --- CHANGELOG.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 047f03cf..aeb5d64e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,12 +26,13 @@ - Remove the `app.kubernetes.io/component` and `app.kubernetes.io/role-group` labels from the resources they don't apply to (previously set to `none`) ([#838]). - All product containers now run with `securityContext.runAsNonRoot` set to `true` to improve security ([#840]). +- `envOverrides` names are now validated by the shared `EnvVarName` type rather than by + operator-specific validation code ([#838]). +- Remove the `app.kubernetes.io/component` and `app.kubernetes.io/role-group` labels from the + resources they don't apply to (previously set to `none` or a placeholder value) ([#838]). - Environment variable overrides (`envOverrides`) are now applied after all environment variables set by the operator. In particular, `CONTAINERDEBUG_LOG_DIRECTORY` can now be overridden, whereas previously the operator's value always took precedence ([#838]). -- Environment variable names in `envOverrides` are now validated to be valid environment variable - names for all roles, whereas previously this was only enforced for role-group-level overrides - ([#838]). ### Fixed