diff --git a/CHANGELOG.md b/CHANGELOG.md index f6121423..c33954b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,8 @@ All notable changes to this project will be documented in this file. - Allow configuring proxy host behavior ([#668]). - Support disabling the `create-reporting-task` Job ([#690]). - Support podOverrides on the `create-reporting-task` Job using the field `spec.clusterConfig.createReportingTaskJob.podOverrides` ([#690]). +- The operator can now run on Kubernetes clusters using a non-default cluster domain. + Use the env var `KUBERNETES_CLUSTER_DOMAIN` or the operator Helm chart property `kubernetesClusterDomain` to set a non-default cluster domain ([#694]). ### Changed @@ -40,6 +42,7 @@ All notable changes to this project will be documented in this file. [#675]: https://github.com/stackabletech/nifi-operator/pull/675 [#686]: https://github.com/stackabletech/nifi-operator/pull/686 [#690]: https://github.com/stackabletech/nifi-operator/pull/690 +[#694]: https://github.com/stackabletech/nifi-operator/pull/694 ## [24.7.0] - 2024-07-24 diff --git a/Cargo.lock b/Cargo.lock index 1956fa21..de175734 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -111,9 +111,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "c042108f3ed77fd83760a5fd79b53be043192bb3b9dba91d8c574c0ada7850c8" [[package]] name = "async-broadcast" @@ -146,7 +146,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -157,7 +157,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -242,9 +242,9 @@ dependencies = [ [[package]] name = "built" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "236e6289eda5a812bc6b53c3b024039382a2895fbbeef2d748b2931546d392c4" +checksum = "c360505aed52b7ec96a3636c3f039d99103c37d1d9b4f7a8c743d3ea9ffcd03b" dependencies = [ "chrono", "git2", @@ -264,15 +264,15 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cc" -version = "1.1.28" +version = "1.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" +checksum = "c2e7962b54006dcfcc61cb72735f4d89bb97061dd6a7ed882ec6b8ee53714c6f" dependencies = [ "jobserver", "libc", @@ -329,7 +329,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -444,7 +444,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -455,18 +455,18 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] name = "delegate" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5060bb0febb73fa907273f8a7ed17ab4bf831d585eac835b28ec24a1e2460956" +checksum = "bc2323e10c92e1cf4d86e11538512e6dc03ceb586842970b6332af3d4046a046" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -525,6 +525,18 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" +[[package]] +name = "educe" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7bc049e1bd8cdeb31b68bbd586a9464ecf9f3944af3958a7a9d0f8b9799417" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "either" version = "1.13.0" @@ -549,6 +561,26 @@ dependencies = [ "thiserror", ] +[[package]] +name = "enum-ordinalize" +version = "4.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fea0dcfa4e54eeb516fe454635a95753ddd39acda650ce703031c6973e315dd5" +dependencies = [ + "enum-ordinalize-derive", +] + +[[package]] +name = "enum-ordinalize-derive" +version = "4.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.82", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -673,7 +705,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -862,9 +894,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "1.4.1" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +checksum = "bbbff0a806a4728c99295b254c8838933b5b082d75e3cb70c8dab21fdfbcfa9a" dependencies = [ "bytes", "futures-channel", @@ -1054,9 +1086,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" dependencies = [ "wasm-bindgen", ] @@ -1115,9 +1147,9 @@ dependencies = [ [[package]] name = "kube" -version = "0.95.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa21063c854820a77c5d7f8deeb7ffa55246d8304e4bcd8cce2956752c6604f8" +checksum = "efffeb3df0bd4ef3e5d65044573499c0e4889b988070b08c50b25b1329289a1f" dependencies = [ "k8s-openapi", "kube-client", @@ -1128,9 +1160,9 @@ dependencies = [ [[package]] name = "kube-client" -version = "0.95.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c2355f5c9d8a11900e71a6fe1e47abd5ec45bf971eb4b162ffe97b46db9bb7" +checksum = "8bf471ece8ff8d24735ce78dac4d091e9fcb8d74811aeb6b75de4d1c3f5de0f1" dependencies = [ "base64 0.22.1", "bytes", @@ -1166,9 +1198,9 @@ dependencies = [ [[package]] name = "kube-core" -version = "0.95.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3030bd91c9db544a50247e7d48d7db9cf633c172732dce13351854526b1e666" +checksum = "f42346d30bb34d1d7adc5c549b691bce7aa3a1e60254e68fab7e2d7b26fe3d77" dependencies = [ "chrono", "form_urlencoded", @@ -1184,29 +1216,29 @@ dependencies = [ [[package]] name = "kube-derive" -version = "0.95.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa98be978eddd70a773aa8e86346075365bfb7eb48783410852dbf7cb57f0c27" +checksum = "f9364e04cc5e0482136c6ee8b7fb7551812da25802249f35b3def7aaa31e82ad" dependencies = [ "darling", "proc-macro2", "quote", "serde_json", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] name = "kube-runtime" -version = "0.95.0" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5895cb8aa641ac922408f128b935652b34c2995f16ad7db0984f6caa50217914" +checksum = "d3fbf1f6ffa98e65f1d2a9a69338bb60605d46be7edf00237784b89e62c9bd44" dependencies = [ "ahash", "async-broadcast", "async-stream", "async-trait", "backoff", - "derivative", + "educe", "futures 0.3.31", "hashbrown 0.14.5", "json-patch", @@ -1231,9 +1263,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.161" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "8e9489c2807c139ffd9c1794f4af0ebe86a828db53ecdc7fea2111d0fed085d1" [[package]] name = "libgit2-sys" @@ -1423,7 +1455,7 @@ dependencies = [ "lazy_static", "once_cell", "opentelemetry", - "ordered-float 4.3.0", + "ordered-float 4.4.0", "percent-encoding", "rand", "thiserror", @@ -1442,9 +1474,9 @@ dependencies = [ [[package]] name = "ordered-float" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44d501f1a72f71d3c063a6bbc8f7271fa73aa09fe5d6283b6571e2ed176a2537" +checksum = "83e7ccb95e240b7c9506a3d544f10d935e142cc90b0a1d56954fb44d89ad6b97" dependencies = [ "num-traits", ] @@ -1502,9 +1534,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" dependencies = [ "memchr", "thiserror", @@ -1513,9 +1545,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +checksum = "d214365f632b123a47fd913301e14c946c61d1c183ee245fa76eb752e59a02dd" dependencies = [ "pest", "pest_generator", @@ -1523,22 +1555,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +checksum = "eb55586734301717aea2ac313f50b2eb8f60d2fc3dc01d190eefa2e625f60c4e" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] name = "pest_meta" -version = "2.7.13" +version = "2.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +checksum = "b75da2a70cf4d9cb76833c990ac9cd3923c9a8905a8929789ce347c84564d03d" dependencies = [ "once_cell", "pest", @@ -1562,7 +1594,7 @@ checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1600,9 +1632,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.87" +version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" dependencies = [ "unicode-ident", ] @@ -1738,9 +1770,9 @@ checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustls" -version = "0.23.14" +version = "0.23.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "5fbb44d7acc4e873d613422379f69f237a1b141928c02f6bc6ccfddddc2d7993" dependencies = [ "log", "once_cell", @@ -1788,9 +1820,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" [[package]] name = "rustls-webpki" @@ -1805,9 +1837,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -1846,7 +1878,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1857,11 +1889,10 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "secrecy" -version = "0.8.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" +checksum = "e891af845473308773346dc847b2c23ee78fe442e0472ac50e22a18a93d3ae5a" dependencies = [ - "serde", "zeroize", ] @@ -1896,9 +1927,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "3ea7893ff5e2466df8d720bb615088341b295f849602c6956047f8f80f0e9bc1" dependencies = [ "serde_derive", ] @@ -1915,13 +1946,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.213" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "7e85ad2009c50b58e87caa8cd6dac16bdf511bbfb7af6c33df902396aa480fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -1932,14 +1963,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.132" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" dependencies = [ "itoa", "memchr", @@ -2060,7 +2091,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2121,8 +2152,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.76.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.76.0#a7e70f174fb043a1766e0a80de95834cb4f7513d" +version = "0.80.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#6fbe32300b60f95e0baa2ab0ff2daf961b06531c" dependencies = [ "chrono", "clap", @@ -2132,6 +2163,7 @@ dependencies = [ "dockerfile-parser", "either", "futures 0.3.31", + "indexmap", "json-patch", "k8s-openapi", "kube", @@ -2146,6 +2178,7 @@ dependencies = [ "serde_yaml", "snafu 0.8.5", "stackable-operator-derive", + "stackable-shared", "strum", "tokio", "tracing", @@ -2158,12 +2191,24 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.76.0#a7e70f174fb043a1766e0a80de95834cb4f7513d" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#6fbe32300b60f95e0baa2ab0ff2daf961b06531c" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", +] + +[[package]] +name = "stackable-shared" +version = "0.0.1" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.80.0#6fbe32300b60f95e0baa2ab0ff2daf961b06531c" +dependencies = [ + "kube", + "semver", + "serde", + "serde_yaml", + "snafu 0.8.5", ] [[package]] @@ -2191,7 +2236,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2213,33 +2258,39 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "83540f837a8afc019423a8edb95b52a8effe46957ee402287f4292fae35be021" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "5d11abd9594d9b38965ef50805c5e469ca9cc6f197f883f717e0269a3057b3d5" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "ae71770322cbd277e69d762a16c444af02aa0575ac0d174f0b9562d3b37f8602" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2322,9 +2373,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "145f3413504347a2be84393cc8a7d2fb4d863b375909ea59f2158261aa258bbb" dependencies = [ "backtrace", "bytes", @@ -2346,7 +2397,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2387,14 +2438,14 @@ dependencies = [ [[package]] name = "tower" -version = "0.4.13" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" dependencies = [ "futures-core", "futures-util", - "pin-project", "pin-project-lite", + "sync_wrapper", "tokio", "tokio-util", "tower-layer", @@ -2404,16 +2455,15 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.5.2" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" +checksum = "8437150ab6bbc8c5f0f519e3d5ed4aa883a83dd4cdd3d1b21f9482936046cb97" dependencies = [ - "base64 0.21.7", + "base64 0.22.1", "bitflags 2.6.0", "bytes", "http", "http-body", - "http-body-util", "mime", "pin-project-lite", "tower-layer", @@ -2465,7 +2515,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] @@ -2648,9 +2698,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", "once_cell", @@ -2659,24 +2709,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2684,22 +2734,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-time" @@ -2848,7 +2898,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.82", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 642c773e..e3180d09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_yaml = "0.9" snafu = "0.8" -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.76.0" } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.80.0" } strum = { version = "0.26", features = ["derive"] } tokio = { version = "1.40", features = ["full"] } tracing = "0.1" diff --git a/deploy/helm/nifi-operator/values.yaml b/deploy/helm/nifi-operator/values.yaml index ae68fa84..796543b8 100644 --- a/deploy/helm/nifi-operator/values.yaml +++ b/deploy/helm/nifi-operator/values.yaml @@ -47,3 +47,7 @@ nodeSelector: {} tolerations: [] affinity: {} + +# When running on a non-default Kubernetes cluster domain, the cluster domain can be configured here. +# See the https://docs.stackable.tech/home/stable/guides/kubernetes-cluster-domain guide for details. +# kubernetesClusterDomain: my-cluster.local# kubernetesClusterDomain: my-cluster.local diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs index b96156c0..92a7367c 100644 --- a/rust/crd/src/lib.rs +++ b/rust/crd/src/lib.rs @@ -34,7 +34,10 @@ use stackable_operator::{ schemars::{self, JsonSchema}, status::condition::{ClusterCondition, HasStatusCondition}, time::Duration, - utils::crds::{raw_object_list_schema, raw_object_schema}, + utils::{ + cluster_info::KubernetesClusterInfo, + crds::{raw_object_list_schema, raw_object_schema}, + }, }; use strum::Display; use tls::NifiTls; @@ -542,11 +545,12 @@ impl NifiCluster { } /// The fully-qualified domain name of the role-level load-balanced Kubernetes `Service` - pub fn node_role_service_fqdn(&self) -> Option { + pub fn node_role_service_fqdn(&self, cluster_info: &KubernetesClusterInfo) -> Option { Some(format!( - "{}.{}.svc.cluster.local", + "{}.{}.svc.{}", self.node_role_service_name(), - self.metadata.namespace.as_ref()? + self.metadata.namespace.as_ref()?, + cluster_info.cluster_domain, )) } @@ -637,10 +641,13 @@ pub struct PodRef { } impl PodRef { - pub fn fqdn(&self) -> String { + pub fn fqdn(&self, cluster_info: &KubernetesClusterInfo) -> String { format!( - "{}.{}.{}.svc.cluster.local", - self.pod_name, self.role_group_service_name, self.namespace + "{pod_name}.{service_name}.{namespace}.svc.{cluster_domain}", + pod_name = self.pod_name, + service_name = self.role_group_service_name, + namespace = self.namespace, + cluster_domain = cluster_info.cluster_domain ) } } diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 8bf15cc0..df4282d6 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -20,6 +20,7 @@ use stackable_nifi_crd::{ }; use stackable_operator::{ builder::{ + self, configmap::ConfigMapBuilder, meta::ObjectMetaBuilder, pod::{ @@ -57,7 +58,9 @@ use stackable_operator::{ memory::{BinaryMultiple, MemoryQuantity}, product_logging::{ self, - framework::{create_vector_shutdown_file_command, remove_vector_shutdown_file_command}, + framework::{ + create_vector_shutdown_file_command, remove_vector_shutdown_file_command, LoggingError, + }, spec::{ ConfigMapLogConfig, ContainerLogConfig, ContainerLogConfigChoice, CustomContainerLogConfig, @@ -69,7 +72,7 @@ use stackable_operator::{ statefulset::StatefulSetConditionBuilder, }, time::Duration, - utils::COMMON_BASH_TRAP_FUNCTIONS, + utils::{cluster_info::KubernetesClusterInfo, COMMON_BASH_TRAP_FUNCTIONS}, }; use strum::{EnumDiscriminants, IntoStaticStr}; use tracing::Instrument; @@ -328,6 +331,17 @@ pub enum Error { ReportingTask { source: crate::reporting_task::Error, }, + + #[snafu(display("failed to configure logging"))] + ConfigureLogging { source: LoggingError }, + + #[snafu(display("failed to add needed volume"))] + AddVolume { source: builder::pod::Error }, + + #[snafu(display("failed to add needed volumeMount"))] + AddVolumeMount { + source: builder::pod::container::Error, + }, } type Result = std::result::Result; @@ -552,6 +566,7 @@ pub async fn reconcile_nifi( let rg_statefulset = build_node_rolegroup_statefulset( nifi, &resolved_product_image, + &client.kubernetes_cluster_info, &rolegroup, role, rolegroup_config, @@ -604,6 +619,7 @@ pub async fn reconcile_nifi( let (reporting_task_job, reporting_task_service) = build_reporting_task( nifi, &resolved_product_image, + &client.kubernetes_cluster_info, &nifi_authentication_config, &rbac_sa.name_any(), ) @@ -879,6 +895,7 @@ const USERDATA_MOUNTPOINT: &str = "/stackable/userdata"; async fn build_node_rolegroup_statefulset( nifi: &NifiCluster, resolved_product_image: &ResolvedProductImage, + cluster_info: &KubernetesClusterInfo, rolegroup_ref: &RoleGroupRef, role: &Role, rolegroup_config: &HashMap>, @@ -934,14 +951,15 @@ async fn build_node_rolegroup_statefulset( } let node_address = format!( - "$POD_NAME.{}-node-{}.{}.svc.cluster.local", + "$POD_NAME.{}-node-{}.{}.svc.{}", rolegroup_ref.cluster.name, rolegroup_ref.role_group, &nifi .metadata .namespace .as_ref() - .context(ObjectHasNoNamespaceSnafu)? + .context(ObjectHasNoNamespaceSnafu)?, + cluster_info.cluster_domain, ); let sensitive_key_secret = &nifi.spec.cluster_config.sensitive_properties.key_secret; @@ -1009,28 +1027,39 @@ async fn build_node_rolegroup_statefulset( NifiRepository::Flowfile.repository(), NifiRepository::Flowfile.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::Database.repository(), NifiRepository::Database.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::Content.repository(), NifiRepository::Content.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::Provenance.repository(), NifiRepository::Provenance.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::State.repository(), NifiRepository::State.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount("conf", "/conf") + .context(AddVolumeMountSnafu)? .add_volume_mount(KEYSTORE_VOLUME_NAME, KEYSTORE_NIFI_CONTAINER_MOUNT) + .context(AddVolumeMountSnafu)? .add_volume_mount("activeconf", NIFI_CONFIG_DIRECTORY) + .context(AddVolumeMountSnafu)? .add_volume_mount("sensitiveproperty", "/stackable/sensitiveproperty") + .context(AddVolumeMountSnafu)? .add_volume_mount("log", STACKABLE_LOG_DIR) + .context(AddVolumeMountSnafu)? .add_volume_mount(TRUSTSTORE_VOLUME_NAME, STACKABLE_SERVER_TLS_DIR) + .context(AddVolumeMountSnafu)? .resources( ResourceRequirementsBuilder::new() .with_cpu_request("500m") @@ -1072,30 +1101,40 @@ async fn build_node_rolegroup_statefulset( .args(nifi_args) .add_env_vars(env_vars) .add_volume_mount(KEYSTORE_VOLUME_NAME, KEYSTORE_NIFI_CONTAINER_MOUNT) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::Flowfile.repository(), NifiRepository::Flowfile.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::Database.repository(), NifiRepository::Database.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::Content.repository(), NifiRepository::Content.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::Provenance.repository(), NifiRepository::Provenance.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount( NifiRepository::State.repository(), NifiRepository::State.mount_path(), ) + .context(AddVolumeMountSnafu)? .add_volume_mount("activeconf", NIFI_CONFIG_DIRECTORY) + .context(AddVolumeMountSnafu)? .add_volume_mount("log-config", STACKABLE_LOG_CONFIG_DIR) + .context(AddVolumeMountSnafu)? .add_volume_mount("log", STACKABLE_LOG_DIR) + .context(AddVolumeMountSnafu)? .add_volume_mount(TRUSTSTORE_VOLUME_NAME, STACKABLE_SERVER_TLS_DIR) + .context(AddVolumeMountSnafu)? .add_container_port(HTTPS_PORT_NAME, HTTPS_PORT.into()) .add_container_port(PROTOCOL_PORT_NAME, PROTOCOL_PORT.into()) .add_container_port(BALANCE_PORT_NAME, BALANCE_PORT.into()) @@ -1137,8 +1176,12 @@ async fn build_node_rolegroup_statefulset( ?role, "Adding user specified extra volume", ); - pod_builder.add_volume(volume.clone()); - container_nifi.add_volume_mount(volume_name, mount_point); + pod_builder + .add_volume(volume.clone()) + .context(AddVolumeSnafu)?; + container_nifi + .add_volume_mount(volume_name, mount_point) + .context(AddVolumeMountSnafu)?; } // We want to add nifi container first for easier defaulting into this container @@ -1151,38 +1194,45 @@ async fn build_node_rolegroup_statefulset( })), }) = merged_config.logging.containers.get(&Container::Nifi) { - pod_builder.add_volume(Volume { - name: "log-config".to_string(), - config_map: Some(ConfigMapVolumeSource { - name: config_map.clone(), - ..ConfigMapVolumeSource::default() - }), - ..Volume::default() - }); + pod_builder + .add_volume(Volume { + name: "log-config".to_string(), + config_map: Some(ConfigMapVolumeSource { + name: config_map.clone(), + ..ConfigMapVolumeSource::default() + }), + ..Volume::default() + }) + .context(AddVolumeSnafu)?; } else { - pod_builder.add_volume(Volume { - name: "log-config".to_string(), - config_map: Some(ConfigMapVolumeSource { - name: rolegroup_ref.object_name(), - ..ConfigMapVolumeSource::default() - }), - ..Volume::default() - }); + pod_builder + .add_volume(Volume { + name: "log-config".to_string(), + config_map: Some(ConfigMapVolumeSource { + name: rolegroup_ref.object_name(), + ..ConfigMapVolumeSource::default() + }), + ..Volume::default() + }) + .context(AddVolumeSnafu)?; } if merged_config.logging.enable_vector_agent { - pod_builder.add_container(product_logging::framework::vector_container( - resolved_product_image, - "config", - "log", - merged_config.logging.containers.get(&Container::Vector), - ResourceRequirementsBuilder::new() - .with_cpu_request("250m") - .with_cpu_limit("500m") - .with_memory_request("128Mi") - .with_memory_limit("128Mi") - .build(), - )); + pod_builder.add_container( + product_logging::framework::vector_container( + resolved_product_image, + "config", + "log", + merged_config.logging.containers.get(&Container::Vector), + ResourceRequirementsBuilder::new() + .with_cpu_request("250m") + .with_cpu_limit("500m") + .with_memory_request("128Mi") + .with_memory_limit("128Mi") + .build(), + ) + .context(ConfigureLoggingSnafu)?, + ); } nifi_auth_config @@ -1218,6 +1268,7 @@ async fn build_node_rolegroup_statefulset( }), ..Default::default() }) + .context(AddVolumeSnafu)? .add_volume(Volume { name: "conf".to_string(), config_map: Some(ConfigMapVolumeSource { @@ -1226,6 +1277,7 @@ async fn build_node_rolegroup_statefulset( }), ..Volume::default() }) + .context(AddVolumeSnafu)? .add_empty_dir_volume( "log", // Set volume size to higher than theoretically necessary to avoid running out of disk space as log rotation triggers are only checked by Logback every 5s. @@ -1237,6 +1289,7 @@ async fn build_node_rolegroup_statefulset( .into(), ), ) + .context(AddVolumeSnafu)? // One volume for the keystore and truststore data configmap .add_volume( build_tls_volume( @@ -1250,7 +1303,9 @@ async fn build_node_rolegroup_statefulset( ) .context(SecuritySnafu)?, ) + .context(AddVolumeSnafu)? .add_empty_dir_volume(TRUSTSTORE_VOLUME_NAME, None) + .context(AddVolumeSnafu)? .add_volume(Volume { name: "sensitiveproperty".to_string(), secret: Some(SecretVolumeSource { @@ -1259,6 +1314,7 @@ async fn build_node_rolegroup_statefulset( }), ..Volume::default() }) + .context(AddVolumeSnafu)? .add_volume(Volume { empty_dir: Some(EmptyDirVolumeSource { medium: None, @@ -1267,6 +1323,7 @@ async fn build_node_rolegroup_statefulset( name: "activeconf".to_string(), ..Volume::default() }) + .context(AddVolumeSnafu)? .service_account_name(sa_name) .security_context( PodSecurityContextBuilder::new() @@ -1411,10 +1468,13 @@ async fn get_proxy_hosts( } let node_role_service_fqdn = nifi - .node_role_service_fqdn() + .node_role_service_fqdn(&client.kubernetes_cluster_info) .context(NoRoleServiceFqdnSnafu)?; - let reporting_task_service_name = - reporting_task::build_reporting_task_fqdn_service_name(nifi).context(ReportingTaskSnafu)?; + let reporting_task_service_name = reporting_task::build_reporting_task_fqdn_service_name( + nifi, + &client.kubernetes_cluster_info, + ) + .context(ReportingTaskSnafu)?; let mut proxy_hosts_set = HashSet::from([ node_role_service_fqdn.clone(), format!("{node_role_service_fqdn}:{HTTPS_PORT}"), diff --git a/rust/operator-binary/src/main.rs b/rust/operator-binary/src/main.rs index 5a13b33c..a49dc753 100644 --- a/rust/operator-binary/src/main.rs +++ b/rust/operator-binary/src/main.rs @@ -49,6 +49,7 @@ async fn main() -> anyhow::Result<()> { product_config, watch_namespace, tracing_target, + cluster_info_opts, }) => { stackable_operator::logging::initialize_logging( "NIFI_OPERATOR_LOG", @@ -69,8 +70,11 @@ async fn main() -> anyhow::Result<()> { "/etc/stackable/nifi-operator/config-spec/properties.yaml", ])?; - let client = - stackable_operator::client::create_client(Some(OPERATOR_NAME.to_string())).await?; + let client = stackable_operator::client::initialize_operator( + Some(OPERATOR_NAME.to_string()), + &cluster_info_opts, + ) + .await?; let nifi_controller = Controller::new( watch_namespace.get_api::>(&client), diff --git a/rust/operator-binary/src/reporting_task/mod.rs b/rust/operator-binary/src/reporting_task/mod.rs index bd3f1ff0..b0a6b59e 100644 --- a/rust/operator-binary/src/reporting_task/mod.rs +++ b/rust/operator-binary/src/reporting_task/mod.rs @@ -30,6 +30,7 @@ use stackable_nifi_crd::{ }; use stackable_operator::{ builder::{ + self, meta::ObjectMetaBuilder, pod::{ container::ContainerBuilder, resources::ResourceRequirementsBuilder, @@ -46,6 +47,7 @@ use stackable_operator::{ }, kube::ResourceExt, kvp::Labels, + utils::cluster_info::KubernetesClusterInfo, }; use crate::security::{ @@ -98,6 +100,14 @@ pub enum Error { #[snafu(display("failed to create reporting task service, no role groups defined"))] FailedBuildReportingTaskService, + + #[snafu(display("failed to add needed volume"))] + AddVolume { source: builder::pod::Error }, + + #[snafu(display("failed to add needed volumeMount"))] + AddVolumeMount { + source: builder::pod::container::Error, + }, } type Result = std::result::Result; @@ -115,11 +125,18 @@ type Result = std::result::Result; pub fn build_reporting_task( nifi: &NifiCluster, resolved_product_image: &ResolvedProductImage, + cluster_info: &KubernetesClusterInfo, nifi_auth_config: &NifiAuthenticationConfig, sa_name: &str, ) -> Result<(Job, Service)> { Ok(( - build_reporting_task_job(nifi, resolved_product_image, nifi_auth_config, sa_name)?, + build_reporting_task_job( + nifi, + resolved_product_image, + cluster_info, + nifi_auth_config, + sa_name, + )?, build_reporting_task_service(nifi, resolved_product_image)?, )) } @@ -130,13 +147,16 @@ pub fn build_reporting_task_service_name(nifi_cluster_name: &str) -> String { } /// Return the FQDN (with namespace, domain) of the reporting task. -pub fn build_reporting_task_fqdn_service_name(nifi: &NifiCluster) -> Result { +pub fn build_reporting_task_fqdn_service_name( + nifi: &NifiCluster, + cluster_info: &KubernetesClusterInfo, +) -> Result { let nifi_cluster_name = nifi.name_any(); let nifi_namespace: &str = &nifi.namespace().context(ObjectHasNoNamespaceSnafu)?; let reporting_task_service_name = build_reporting_task_service_name(&nifi_cluster_name); - + let cluster_domain = &cluster_info.cluster_domain; Ok(format!( - "{reporting_task_service_name}.{nifi_namespace}.svc.cluster.local" + "{reporting_task_service_name}.{nifi_namespace}.svc.{cluster_domain}" )) } @@ -239,10 +259,12 @@ fn build_reporting_task_service( fn build_reporting_task_job( nifi: &NifiCluster, resolved_product_image: &ResolvedProductImage, + cluster_info: &KubernetesClusterInfo, nifi_auth_config: &NifiAuthenticationConfig, sa_name: &str, ) -> Result { - let reporting_task_fqdn_service_name = build_reporting_task_fqdn_service_name(nifi)?; + let reporting_task_fqdn_service_name = + build_reporting_task_fqdn_service_name(nifi, cluster_info)?; let product_version = &resolved_product_image.product_version; let nifi_connect_url = format!("https://{reporting_task_fqdn_service_name}:{HTTPS_PORT}/nifi-api",); @@ -282,6 +304,7 @@ fn build_reporting_task_job( REPORTING_TASK_CERT_VOLUME_NAME, REPORTING_TASK_CERT_VOLUME_MOUNT, ) + .context(AddVolumeMountSnafu)? .resources( ResourceRequirementsBuilder::new() .with_cpu_request("100m") @@ -331,6 +354,7 @@ fn build_reporting_task_job( ) .context(SecretVolumeBuildFailureSnafu)?, ) + .context(AddVolumeSnafu)? .build_template(); pod_template.merge_from( diff --git a/rust/operator-binary/src/security/authentication.rs b/rust/operator-binary/src/security/authentication.rs index 4a11f374..fd8b9e13 100644 --- a/rust/operator-binary/src/security/authentication.rs +++ b/rust/operator-binary/src/security/authentication.rs @@ -2,11 +2,18 @@ use indoc::{formatdoc, indoc}; use snafu::{OptionExt, ResultExt, Snafu}; use stackable_nifi_crd::authentication::AuthenticationClassResolved; use stackable_nifi_crd::NifiCluster; -use stackable_operator::builder::pod::{container::ContainerBuilder, PodBuilder}; -use stackable_operator::commons::authentication::oidc::{self, ClientAuthenticationOptions}; -use stackable_operator::commons::authentication::{ldap, static_}; - -use stackable_operator::k8s_openapi::api::core::v1::{KeyToPath, SecretVolumeSource, Volume}; +use stackable_operator::{ + builder::{ + self, + pod::{container::ContainerBuilder, PodBuilder}, + }, + commons::authentication::{ + ldap, + oidc::{self, ClientAuthenticationOptions}, + static_, + }, + k8s_openapi::api::core::v1::{KeyToPath, SecretVolumeSource, Volume}, +}; use super::oidc::build_oidc_admin_password_secret_name; @@ -44,6 +51,14 @@ pub enum Error { "The LDAP AuthenticationClass is missing the bind credentials. Currently the NiFi operator only supports connecting to LDAP servers using bind credentials" ))] LdapAuthenticationClassMissingBindCredentials {}, + + #[snafu(display("failed to add needed volume"))] + AddVolume { source: builder::pod::Error }, + + #[snafu(display("failed to add needed volumeMount"))] + AddVolumeMount { + source: builder::pod::container::Error, + }, } #[allow(clippy::large_enum_variant)] @@ -183,10 +198,13 @@ impl NifiAuthenticationConfig { }), ..Volume::default() }; - pod_builder.add_volume(admin_volume); + pod_builder + .add_volume(admin_volume) + .context(AddVolumeSnafu)?; for cb in container_builders { - cb.add_volume_mount(STACKABLE_ADMIN_USERNAME, STACKABLE_USER_VOLUME_MOUNT_PATH); + cb.add_volume_mount(STACKABLE_ADMIN_USERNAME, STACKABLE_USER_VOLUME_MOUNT_PATH) + .context(AddVolumeMountSnafu)?; } } Self::Ldap { provider } => { @@ -209,11 +227,14 @@ impl NifiAuthenticationConfig { }), ..Volume::default() }; - pod_builder.add_volume(admin_volume); + pod_builder + .add_volume(admin_volume) + .context(AddVolumeSnafu)?; - container_builders.iter_mut().for_each(|cb| { - cb.add_volume_mount(STACKABLE_ADMIN_USERNAME, STACKABLE_USER_VOLUME_MOUNT_PATH); - }); + for cb in &mut container_builders { + cb.add_volume_mount(STACKABLE_ADMIN_USERNAME, STACKABLE_USER_VOLUME_MOUNT_PATH) + .context(AddVolumeMountSnafu)?; + } provider .tls