From 650af7806da089b7ef735d4169a3056b477e2bd5 Mon Sep 17 00:00:00 2001 From: Xenia Date: Tue, 27 Aug 2024 11:41:02 +0200 Subject: [PATCH] chore: add override integration tests (#615) * add recapturing to immutable, fix broken link * add integration test for overrides with pod overrides * move security.properties evaluation and bump stackable-operator version * fix formatting * remove recapturing for now * rename test step files * test for env overrides * test config overrides * fix yaml lint --------- Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com> --- Cargo.lock | 167 +++++++------- Cargo.nix | 207 ++++++++++-------- Cargo.toml | 4 +- crate-hashes.json | 4 +- rust/crd/src/affinity.rs | 2 +- rust/operator-binary/src/druid_controller.rs | 41 ++-- .../kuttl/overrides/00-assert.yaml.j2 | 6 + .../kuttl/overrides/00-install-zk.yaml.j2 | 28 +++ .../kuttl/overrides/00-patch-ns.yaml.j2 | 9 + .../templates/kuttl/overrides/10-assert.yaml | 21 ++ .../kuttl/overrides/10-install-hdfs.yaml.j2 | 23 ++ .../templates/kuttl/overrides/20-assert.yaml | 45 ++++ .../kuttl/overrides/20-install-druid.yaml.j2 | 123 +++++++++++ .../templates/kuttl/overrides/21-assert.yaml | 28 +++ .../templates/kuttl/overrides/22-assert.yaml | 28 +++ tests/test-definition.yaml | 6 + 16 files changed, 545 insertions(+), 197 deletions(-) create mode 100644 tests/templates/kuttl/overrides/00-assert.yaml.j2 create mode 100644 tests/templates/kuttl/overrides/00-install-zk.yaml.j2 create mode 100644 tests/templates/kuttl/overrides/00-patch-ns.yaml.j2 create mode 100644 tests/templates/kuttl/overrides/10-assert.yaml create mode 100644 tests/templates/kuttl/overrides/10-install-hdfs.yaml.j2 create mode 100644 tests/templates/kuttl/overrides/20-assert.yaml create mode 100644 tests/templates/kuttl/overrides/20-install-druid.yaml.j2 create mode 100644 tests/templates/kuttl/overrides/21-assert.yaml create mode 100644 tests/templates/kuttl/overrides/22-assert.yaml diff --git a/Cargo.lock b/Cargo.lock index 56b88d1e..560eb32f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -146,7 +146,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -157,7 +157,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -270,12 +270,13 @@ checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cc" -version = "1.1.8" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504bdec147f2cc13c8b57ed9401fd8a147cc66b67ad5cb241394244f2c947549" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -299,9 +300,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.14" +version = "4.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c937d4061031a6d0c8da4b9a4f98a172fc2976dfb1c19213a9cf7d0d3c837e36" +checksum = "ed6719fffa43d0d87e5fd8caeab59be1554fb028cd30edc88fc4369b17971019" dependencies = [ "clap_builder", "clap_derive", @@ -309,9 +310,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.14" +version = "4.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85379ba512b21a328adf887e85f7742d12e96eb31f3ef077df4ffc26b506ffed" +checksum = "216aec2b177652e3846684cbfe25c9964d18ec45234f0f5da5157b207ed1aab6" dependencies = [ "anstream", "anstyle", @@ -328,7 +329,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -384,15 +385,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -443,7 +444,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -454,7 +455,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -465,7 +466,7 @@ checksum = "4e018fccbeeb50ff26562ece792ed06659b9c2dae79ece77c4456bb10d9bf79b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -687,7 +688,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -1006,9 +1007,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown", @@ -1069,9 +1070,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -1206,7 +1207,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -1245,9 +1246,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libgit2-sys" @@ -1263,9 +1264,9 @@ dependencies = [ [[package]] name = "libz-sys" -version = "1.1.18" +version = "1.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15da26e5af7e25c90b37a2d75cdbf940cf4a55316de9d84c679c9b8bfabf82e" +checksum = "fdc53a7799a7496ebc9fd29f31f7df80e83c9bda5299768af5f9e59eeea74647" dependencies = [ "cc", "libc", @@ -1321,9 +1322,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4569e456d394deccd22ce1c1913e6ea0e54519f577285001215d33557431afe4" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ "hermit-abi", "libc", @@ -1404,7 +1405,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -1583,7 +1584,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -1614,7 +1615,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -1799,9 +1800,9 @@ dependencies = [ [[package]] name = "rstest" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afd55a67069d6e434a95161415f5beeada95a01c7b815508a82dcb0e1593682" +checksum = "7b423f0e62bdd61734b67cd21ff50871dfaeb9cc74f869dcd6af974fbcb19936" dependencies = [ "futures 0.3.30", "futures-timer", @@ -1811,9 +1812,9 @@ dependencies = [ [[package]] name = "rstest_macros" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4165dfae59a39dd41d8dec720d3cbfbc71f69744efb480a3920f5d4e0cc6798d" +checksum = "c5e1711e7d14f74b12a58411c542185ef7fb7f2e7f8ee6e2940a883628522b42" dependencies = [ "cfg-if", "glob", @@ -1823,7 +1824,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.72", + "syn 2.0.75", "unicode-ident", ] @@ -1859,9 +1860,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a88d6d420651b496bdd98684116959239430022a115c1240e6c3993be0b15fba" +checksum = "04182dffc9091a404e0fc069ea5cd60e5b866c3adf881eff99a32d048242dffa" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -1940,7 +1941,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -1990,9 +1991,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.205" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33aedb1a7135da52b7c21791455563facbbcc43d0f0f66165b42c21b3dfb150" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] @@ -2009,13 +2010,13 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.205" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692d6f5ac90220161d6774db30c662202721e64aed9058d2c394f451261420c1" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -2026,14 +2027,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.122" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784b6203951c57ff748476b126ccb5e8e2959a5c19e5c617ab1956be3dbc68da" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", "memchr", @@ -2085,6 +2086,12 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -2148,7 +2155,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -2213,8 +2220,8 @@ dependencies = [ [[package]] name = "stackable-operator" -version = "0.73.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.73.0#4d98a29b08a7d959e5e287f774cf064c02ffbd62" +version = "0.74.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.74.0#c77a5423b66bc1667b63af7d8bec00de88a5303f" dependencies = [ "chrono", "clap", @@ -2227,7 +2234,6 @@ dependencies = [ "json-patch", "k8s-openapi", "kube", - "lazy_static", "opentelemetry-jaeger", "opentelemetry_sdk", "product-config", @@ -2251,12 +2257,12 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.73.0#4d98a29b08a7d959e5e287f774cf064c02ffbd62" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.74.0#c77a5423b66bc1667b63af7d8bec00de88a5303f" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -2284,7 +2290,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -2306,9 +2312,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.72" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -2332,7 +2338,7 @@ checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -2415,9 +2421,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.39.2" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa4fb1bc778bd6f04cbfc4bb2d06a7396a8f299dc33ea1900cedaa316f467b1" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", @@ -2439,7 +2445,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -2533,15 +2539,15 @@ dependencies = [ [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -2575,7 +2581,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] @@ -2689,9 +2695,9 @@ dependencies = [ [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "unsafe-libyaml" @@ -2758,34 +2764,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2793,22 +2800,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-time" @@ -2957,7 +2964,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.72", + "syn 2.0.75", ] [[package]] diff --git a/Cargo.nix b/Cargo.nix index 368f4b04..c3f551c3 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -446,7 +446,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" "visit-mut" ]; } ]; @@ -473,7 +473,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; usesDefaultFeatures = false; features = [ "full" "visit-mut" "parsing" "printing" "proc-macro" ]; } @@ -776,9 +776,9 @@ rec { }; "cc" = rec { crateName = "cc"; - version = "1.1.8"; + version = "1.1.13"; edition = "2018"; - sha256 = "0jbmjhn4y94l2cjcpmbsnrkcqix1v0gl1nbynp417k7j8z0xwjsh"; + sha256 = "0j6czmvfj9qhqmazznvg2wkzlyh7p65pwdqhnl1rpvpc8xwjznvj"; authors = [ "Alex Crichton " ]; @@ -796,6 +796,10 @@ rec { usesDefaultFeatures = false; target = { target, features }: (target."unix" or false); } + { + name = "shlex"; + packageId = "shlex"; + } ]; features = { "parallel" = [ "dep:libc" "dep:jobserver" ]; @@ -880,10 +884,10 @@ rec { }; "clap" = rec { crateName = "clap"; - version = "4.5.14"; + version = "4.5.16"; edition = "2021"; crateBin = []; - sha256 = "0dkyhcy0szfgm49r5hdivxv2kz3jl6c4z6jbvb4d19ii203d8dy9"; + sha256 = "068hjwbrndn4iz4fsc6d52q4ymg1kfsymjnqbxzdil23zbzijrzd"; dependencies = [ { name = "clap_builder"; @@ -921,9 +925,9 @@ rec { }; "clap_builder" = rec { crateName = "clap_builder"; - version = "4.5.14"; + version = "4.5.15"; edition = "2021"; - sha256 = "1vgz0ssjdz2gvxvz0ghzndpfj4idfkvqazl8vy5346mj2ajrndw5"; + sha256 = "1dmas5z20yqmlmfhykr38pn1hkcnr4jzxjw4cs2f6lkn2wmyqsi1"; dependencies = [ { name = "anstream"; @@ -979,7 +983,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" ]; } ]; @@ -1125,9 +1129,9 @@ rec { }; "core-foundation-sys" = rec { crateName = "core-foundation-sys"; - version = "0.8.6"; + version = "0.8.7"; edition = "2018"; - sha256 = "13w6sdf06r0hn7bx2b45zxsg1mm2phz34jikm6xc5qrbr6djpsh6"; + sha256 = "12w8j73lazxmr1z0h98hf3z623kl8ms7g07jch7n4p8f9nwlhdkp"; libName = "core_foundation_sys"; authors = [ "The Servo Project Developers" @@ -1139,9 +1143,9 @@ rec { }; "cpufeatures" = rec { crateName = "cpufeatures"; - version = "0.2.12"; + version = "0.2.13"; edition = "2018"; - sha256 = "012m7rrak4girqlii3jnqwrr73gv1i980q4wra5yyyhvzwk5xzjk"; + sha256 = "1b89kljf7phyh63vxwsvf9lbgwkv0dsj7pcjmqgysnwsvkk55s2i"; authors = [ "RustCrypto Developers" ]; @@ -1283,7 +1287,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" "extra-traits" ]; } ]; @@ -1313,7 +1317,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; } ]; @@ -1339,7 +1343,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" "visit-mut" ]; } ]; @@ -1912,7 +1916,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" ]; } ]; @@ -2973,9 +2977,9 @@ rec { }; "indexmap" = rec { crateName = "indexmap"; - version = "2.3.0"; + version = "2.4.0"; edition = "2021"; - sha256 = "182yvyck0zk3swa9bs8l9a8lmis3q7zy338wj6rx2bd81giw4gyy"; + sha256 = "0p2hwvmir50qcl5q6lib8fjq5dzv4f0gqy8czcyfva3yzhzdbslk"; dependencies = [ { name = "equivalent"; @@ -3115,9 +3119,9 @@ rec { }; "js-sys" = rec { crateName = "js-sys"; - version = "0.3.69"; - edition = "2018"; - sha256 = "0v99rz97asnzapb0jsc3jjhvxpfxr7h7qd97yqyrf9i7viimbh99"; + version = "0.3.70"; + edition = "2021"; + sha256 = "0yp3rz7vrn9mmqdpkds426r1p9vs6i8mkxx8ryqdfadr0s2q0s0q"; libName = "js_sys"; authors = [ "The wasm-bindgen Developers" @@ -3717,7 +3721,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "extra-traits" ]; } ]; @@ -3859,9 +3863,9 @@ rec { }; "libc" = rec { crateName = "libc"; - version = "0.2.155"; + version = "0.2.158"; edition = "2015"; - sha256 = "0z44c53z54znna8n322k5iwg80arxxpdzjj5260pxxzc9a58icwp"; + sha256 = "0fb4qldw1jrxljrwz6bsjn8lv4rqizlqmab41q3j98q332xw9bfq"; authors = [ "The Rust Project Developers" ]; @@ -3919,10 +3923,10 @@ rec { }; "libz-sys" = rec { crateName = "libz-sys"; - version = "1.1.18"; + version = "1.1.19"; edition = "2018"; links = "z"; - sha256 = "0bpqmfzvijbrqs29vphnafjz834lpz6pabbsnf85rqppb9pa4pf1"; + sha256 = "0is6lzp9xrgryn57d6ajvadkrs40vzvk37yjkyy6wjd7k5vkmigx"; libName = "libz_sys"; authors = [ "Alex Crichton " @@ -4084,9 +4088,9 @@ rec { }; "mio" = rec { crateName = "mio"; - version = "1.0.1"; + version = "1.0.2"; edition = "2021"; - sha256 = "1r5g65s5acsx440m0a3pylclbrd0dqz93hg15k9crpllsdbf8sa5"; + sha256 = "1v1cnnn44awxbcfm4zlavwgkvbyg7gp5zzjm8mqf1apkrwflvq40"; authors = [ "Carl Lerche " "Thomas de Zeeuw " @@ -4328,7 +4332,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" ]; } ]; @@ -4922,7 +4926,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; } ]; features = { @@ -4995,7 +4999,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" "visit-mut" ]; } ]; @@ -5555,9 +5559,9 @@ rec { }; "rstest" = rec { crateName = "rstest"; - version = "0.21.0"; + version = "0.22.0"; edition = "2021"; - sha256 = "10inb7hv1p42i981bf6705dakbgfbdgl2qaim4sf9mk9f2k5bzcs"; + sha256 = "0dlrn6y4z5xgsvf6ky3lrjwsxpvi13sizlkwnqs1gmmxc873yhkv"; authors = [ "Michele d'Amico " ]; @@ -5593,9 +5597,9 @@ rec { }; "rstest_macros" = rec { crateName = "rstest_macros"; - version = "0.21.0"; + version = "0.22.0"; edition = "2021"; - sha256 = "13brqq64wp8gjaiq1d7g8jbzcwdwpwy0swpcilfx97d3b6pdyra1"; + sha256 = "0hiba8l3d20ajkifd3kz5rzzpxsy311ca4c4ll94pxqlglg73qf5"; procMacro = true; authors = [ "Michele d'Amico " @@ -5632,7 +5636,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" "parsing" "extra-traits" "visit" "visit-mut" ]; } { @@ -5754,9 +5758,9 @@ rec { }; "rustls-native-certs" = rec { crateName = "rustls-native-certs"; - version = "0.7.1"; + version = "0.7.2"; edition = "2021"; - sha256 = "1fjzn7h3p6f3wr014p0i58131513b5li3146v6yrdd2i0r16v3d8"; + sha256 = "1ynz8a108bd3k7zix26z79n8cnqfsrfflsf01x7406h9r7zjs604"; libName = "rustls_native_certs"; dependencies = [ { @@ -5997,7 +6001,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "extra-traits" ]; } ]; @@ -6137,9 +6141,9 @@ rec { }; "serde" = rec { crateName = "serde"; - version = "1.0.205"; + version = "1.0.208"; edition = "2018"; - sha256 = "0l5ivyrj2b5lcmhzdw6h8g6bpb1zarai8y91ghmsap8klyqysfp3"; + sha256 = "1cng2zkvv6hh137jrrqdmhi2hllfnqwlqjgviqjalkv8rg98bw6g"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -6192,9 +6196,9 @@ rec { }; "serde_derive" = rec { crateName = "serde_derive"; - version = "1.0.205"; + version = "1.0.208"; edition = "2015"; - sha256 = "1h902hk53x4lqg95i47d9bk229r0cb331nvlcwfic802r5d6ybb9"; + sha256 = "1krblvy84j6d9zj12ms9l2wfbwf2w8jazkx0bf7fs4vnzy0qw014"; procMacro = true; authors = [ "Erick Tryzelaar " @@ -6215,7 +6219,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" "proc-macro" ]; } @@ -6247,7 +6251,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; usesDefaultFeatures = false; features = [ "clone-impls" "derive" "parsing" "printing" ]; } @@ -6256,9 +6260,9 @@ rec { }; "serde_json" = rec { crateName = "serde_json"; - version = "1.0.122"; + version = "1.0.125"; edition = "2021"; - sha256 = "1nk8phyvwmhrmcbwdr8rbjd9bqp8np62dcbnhisgymqwjl1n4jvq"; + sha256 = "1v9idlv5nq5f000qsv6v02h2zbsfk2m6d05af2zgbk3kl0sygj43"; authors = [ "Erick Tryzelaar " "David Tolnay " @@ -6428,6 +6432,24 @@ rec { "loom" = [ "dep:loom" ]; }; }; + "shlex" = rec { + crateName = "shlex"; + version = "1.3.0"; + edition = "2015"; + sha256 = "0r1y6bv26c1scpxvhg2cabimrmwgbp4p3wy6syj9n0c4s3q2znhg"; + authors = [ + "comex " + "Fenhl " + "Adrian Taylor " + "Alex Touchet " + "Daniel Parks " + "Garrett Berg " + ]; + features = { + "default" = [ "std" ]; + }; + resolvedDefaultFeatures = [ "default" "std" ]; + }; "signal-hook-registry" = rec { crateName = "signal-hook-registry"; version = "1.4.2"; @@ -6600,7 +6622,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" ]; } ]; @@ -6835,13 +6857,13 @@ rec { }; "stackable-operator" = rec { crateName = "stackable-operator"; - version = "0.73.0"; + version = "0.74.0"; edition = "2021"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "4d98a29b08a7d959e5e287f774cf064c02ffbd62"; - sha256 = "0cmfbc3v9kklsfkqbnhwig45106gfizhmlmg9p1qgdjp8az43l9m"; + rev = "c77a5423b66bc1667b63af7d8bec00de88a5303f"; + sha256 = "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya"; }; libName = "stackable_operator"; authors = [ @@ -6898,10 +6920,6 @@ rec { usesDefaultFeatures = false; features = [ "client" "jsonpatch" "runtime" "derive" "rustls-tls" ]; } - { - name = "lazy_static"; - packageId = "lazy_static"; - } { name = "opentelemetry-jaeger"; packageId = "opentelemetry-jaeger"; @@ -6994,8 +7012,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; - rev = "4d98a29b08a7d959e5e287f774cf064c02ffbd62"; - sha256 = "0cmfbc3v9kklsfkqbnhwig45106gfizhmlmg9p1qgdjp8az43l9m"; + rev = "c77a5423b66bc1667b63af7d8bec00de88a5303f"; + sha256 = "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -7017,7 +7035,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; } ]; @@ -7090,7 +7108,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "parsing" "extra-traits" ]; } ]; @@ -7143,11 +7161,11 @@ rec { }; resolvedDefaultFeatures = [ "clone-impls" "default" "derive" "extra-traits" "full" "parsing" "printing" "proc-macro" "quote" "visit" ]; }; - "syn 2.0.72" = rec { + "syn 2.0.75" = rec { crateName = "syn"; - version = "2.0.72"; + version = "2.0.75"; edition = "2021"; - sha256 = "1bx8wwx4ylyjz51dwd83b22j46wm3r3h80ic7wyhkn5dyadrnjyw"; + sha256 = "1nf72xc8pabwny8d0d4kjk5vmadg3fa240dywznka6gw6hq0dbzn"; authors = [ "David Tolnay " ]; @@ -7213,7 +7231,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; } ]; @@ -7452,9 +7470,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.39.2"; + version = "1.39.3"; edition = "2021"; - sha256 = "1cb7yhba7nnf00cylcywk7rai5kkdb8b4jzwrc26zgbqqwdzp96s"; + sha256 = "1xgzhj7bxqqpjaabjkgsx8hi0f600bzj4iyp9f0a9gr3k6dwkawv"; authors = [ "Tokio Contributors " ]; @@ -7575,7 +7593,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" ]; } ]; @@ -7983,9 +8001,9 @@ rec { }; "tower-layer" = rec { crateName = "tower-layer"; - version = "0.3.2"; + version = "0.3.3"; edition = "2018"; - sha256 = "1l7i17k9vlssrdg4s3b0ia5jjkmmxsvv8s9y9ih0jfi8ssz8s362"; + sha256 = "03kq92fdzxin51w8iqix06dcfgydyvx7yr6izjq0p626v9n2l70j"; libName = "tower_layer"; authors = [ "Tower Maintainers " @@ -7994,9 +8012,9 @@ rec { }; "tower-service" = rec { crateName = "tower-service"; - version = "0.3.2"; + version = "0.3.3"; edition = "2018"; - sha256 = "0lmfzmmvid2yp2l36mbavhmqgsvzqf7r2wiwz73ml4xmwaf1rg5n"; + sha256 = "1hzfkvkci33ra94xjx64vv3pp0sq346w06fpkcdwjcid7zhvdycd"; libName = "tower_service"; authors = [ "Tower Maintainers " @@ -8109,7 +8127,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; usesDefaultFeatures = false; features = [ "full" "parsing" "printing" "visit-mut" "clone-impls" "extra-traits" "proc-macro" ]; } @@ -8526,9 +8544,9 @@ rec { }; "unicode-xid" = rec { crateName = "unicode-xid"; - version = "0.2.4"; + version = "0.2.5"; edition = "2015"; - sha256 = "131dfzf7d8fsr1ivch34x42c2d1ik5ig3g78brxncnn0r1sdyqpr"; + sha256 = "02n96yhcjwx7vphbwf9p7xfqbwvqgzdw2qz4h0x3wd5wgxj315r2"; libName = "unicode_xid"; authors = [ "erick.tryzelaar " @@ -8682,9 +8700,9 @@ rec { }; "wasm-bindgen" = rec { crateName = "wasm-bindgen"; - version = "0.2.92"; - edition = "2018"; - sha256 = "1a4mcw13nsk3fr8fxjzf9kk1wj88xkfsmnm0pjraw01ryqfm7qjb"; + version = "0.2.93"; + edition = "2021"; + sha256 = "1dfr7pka5kwvky2fx82m9d060p842hc5fyyw8igryikcdb0xybm8"; libName = "wasm_bindgen"; authors = [ "The wasm-bindgen Developers" @@ -8694,6 +8712,10 @@ rec { name = "cfg-if"; packageId = "cfg-if"; } + { + name = "once_cell"; + packageId = "once_cell"; + } { name = "wasm-bindgen-macro"; packageId = "wasm-bindgen-macro"; @@ -8702,7 +8724,6 @@ rec { features = { "default" = [ "spans" "std" ]; "enable-interning" = [ "std" ]; - "gg-alloc" = [ "wasm-bindgen-test/gg-alloc" ]; "serde" = [ "dep:serde" ]; "serde-serialize" = [ "serde" "serde_json" "std" ]; "serde_json" = [ "dep:serde_json" ]; @@ -8714,9 +8735,9 @@ rec { }; "wasm-bindgen-backend" = rec { crateName = "wasm-bindgen-backend"; - version = "0.2.92"; - edition = "2018"; - sha256 = "1nj7wxbi49f0rw9d44rjzms26xlw6r76b2mrggx8jfbdjrxphkb1"; + version = "0.2.93"; + edition = "2021"; + sha256 = "0yypblaf94rdgqs5xw97499xfwgs1096yx026d6h88v563d9dqwx"; libName = "wasm_bindgen_backend"; authors = [ "The wasm-bindgen Developers" @@ -8744,7 +8765,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "full" ]; } { @@ -8759,9 +8780,9 @@ rec { }; "wasm-bindgen-macro" = rec { crateName = "wasm-bindgen-macro"; - version = "0.2.92"; - edition = "2018"; - sha256 = "09npa1srjjabd6nfph5yc03jb26sycjlxhy0c2a1pdrpx4yq5y51"; + version = "0.2.93"; + edition = "2021"; + sha256 = "1kycd1xfx4d9xzqknvzbiqhwb5fzvjqrrn88x692q1vblj8lqp2q"; procMacro = true; libName = "wasm_bindgen_macro"; authors = [ @@ -8785,9 +8806,9 @@ rec { }; "wasm-bindgen-macro-support" = rec { crateName = "wasm-bindgen-macro-support"; - version = "0.2.92"; - edition = "2018"; - sha256 = "1dqv2xs8zcyw4kjgzj84bknp2h76phmsb3n7j6hn396h4ssifkz9"; + version = "0.2.93"; + edition = "2021"; + sha256 = "0dp8w6jmw44srym6l752nkr3hkplyw38a2fxz5f3j1ch9p3l1hxg"; libName = "wasm_bindgen_macro_support"; authors = [ "The wasm-bindgen Developers" @@ -8803,7 +8824,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; features = [ "visit" "full" ]; } { @@ -8823,10 +8844,10 @@ rec { }; "wasm-bindgen-shared" = rec { crateName = "wasm-bindgen-shared"; - version = "0.2.92"; - edition = "2018"; + version = "0.2.93"; + edition = "2021"; links = "wasm_bindgen"; - sha256 = "15kyavsrna2cvy30kg03va257fraf9x00ny554vxngvpyaa0q6dg"; + sha256 = "1104bny0hv40jfap3hp8jhs0q4ya244qcrvql39i38xlghq0lan6"; libName = "wasm_bindgen_shared"; authors = [ "The wasm-bindgen Developers" @@ -9400,7 +9421,7 @@ rec { } { name = "syn"; - packageId = "syn 2.0.72"; + packageId = "syn 2.0.75"; } ]; diff --git a/Cargo.toml b/Cargo.toml index c40f88ea..e13392b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,13 +19,13 @@ indoc = "2.0" openssl = "0.10" product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.7.0" } pin-project = "1.1" -rstest = "0.21" +rstest = "0.22" semver = "1.0" 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.73.0" } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.74.0" } strum = { version = "0.26", features = ["derive"] } tokio = { version = "1.38", features = ["full"] } tracing = "0.1" diff --git a/crate-hashes.json b/crate-hashes.json index ddd91d81..8725a492 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,5 +1,5 @@ { - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.73.0#stackable-operator-derive@0.3.1": "0cmfbc3v9kklsfkqbnhwig45106gfizhmlmg9p1qgdjp8az43l9m", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.73.0#stackable-operator@0.73.0": "0cmfbc3v9kklsfkqbnhwig45106gfizhmlmg9p1qgdjp8az43l9m", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.74.0#stackable-operator-derive@0.3.1": "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.74.0#stackable-operator@0.74.0": "1g1a0v98wlcb36ibwv1nv75g3b3s1mjmaps443fc2w2maam94lya", "git+https://github.com/stackabletech/product-config.git?tag=0.7.0#product-config@0.7.0": "0gjsm80g6r75pm3824dcyiz4ysq1ka4c1if6k1mjm9cnd5ym0gny" } \ No newline at end of file diff --git a/rust/crd/src/affinity.rs b/rust/crd/src/affinity.rs index e16af5fe..d48f850b 100644 --- a/rust/crd/src/affinity.rs +++ b/rust/crd/src/affinity.rs @@ -5,7 +5,7 @@ use stackable_operator::{ use crate::{DeepStorageSpec, DruidRole, HdfsDeepStorageSpec, APP_NAME}; -/// Please have a look at the architecture diagram in +/// Please have a look at the architecture diagram in /// to understand which roles do communicate with each other. pub fn get_affinity( cluster_name: &str, diff --git a/rust/operator-binary/src/druid_controller.rs b/rust/operator-binary/src/druid_controller.rs index ecf4e4d6..5190d88c 100644 --- a/rust/operator-binary/src/druid_controller.rs +++ b/rust/operator-binary/src/druid_controller.rs @@ -766,16 +766,37 @@ fn build_rolegroup_config_map( to_java_properties_string(conf.iter()).context(PropertiesWriteSnafu)?; cm_conf_data.insert(RUNTIME_PROPS.to_string(), runtime_properties); } + PropertyNameKind::File(file_name) if file_name == JVM_CONFIG => { let (heap, direct) = merged_rolegroup_config .resources .get_memory_sizes(&role) .context(DeriveMemorySettingsSnafu)?; let jvm_config = get_jvm_config(&role, heap, direct).context(GetJvmConfigSnafu)?; - // the user can set overrides in the config, but currently they have no effect + // TODO the user can set overrides in the config, but currently they have no effect // if this is changed in the future, make sure to respect overrides! cm_conf_data.insert(JVM_CONFIG.to_string(), jvm_config); } + + PropertyNameKind::File(file_name) if file_name == JVM_SECURITY_PROPERTIES_FILE => { + let jvm_sec_props: BTreeMap> = rolegroup_config + .get(&PropertyNameKind::File( + JVM_SECURITY_PROPERTIES_FILE.to_string(), + )) + .cloned() + .unwrap_or_default() + .into_iter() + .map(|(k, v)| (k, Some(v))) + .collect(); + cm_conf_data.insert( + JVM_SECURITY_PROPERTIES_FILE.to_string(), + to_java_properties_string(jvm_sec_props.iter()).with_context(|_| { + JvmSecurityPropertiesSnafu { + rolegroup: rolegroup.role_group.clone(), + } + })?, + ); + } _ => {} } } @@ -802,24 +823,6 @@ fn build_rolegroup_config_map( config_map_builder.add_data(filename, file_content); } - let jvm_sec_props: BTreeMap> = rolegroup_config - .get(&PropertyNameKind::File( - JVM_SECURITY_PROPERTIES_FILE.to_string(), - )) - .cloned() - .unwrap_or_default() - .into_iter() - .map(|(k, v)| (k, Some(v))) - .collect(); - config_map_builder.add_data( - JVM_SECURITY_PROPERTIES_FILE, - to_java_properties_string(jvm_sec_props.iter()).with_context(|_| { - JvmSecurityPropertiesSnafu { - rolegroup: rolegroup.role_group.clone(), - } - })?, - ); - extend_role_group_config_map( rolegroup, vector_aggregator_address, diff --git a/tests/templates/kuttl/overrides/00-assert.yaml.j2 b/tests/templates/kuttl/overrides/00-assert.yaml.j2 new file mode 100644 index 00000000..b5613191 --- /dev/null +++ b/tests/templates/kuttl/overrides/00-assert.yaml.j2 @@ -0,0 +1,6 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: druid-zk-server-default +status: + availableReplicas: 1 \ No newline at end of file diff --git a/tests/templates/kuttl/overrides/00-install-zk.yaml.j2 b/tests/templates/kuttl/overrides/00-install-zk.yaml.j2 new file mode 100644 index 00000000..9fa0be75 --- /dev/null +++ b/tests/templates/kuttl/overrides/00-install-zk.yaml.j2 @@ -0,0 +1,28 @@ +--- +apiVersion: zookeeper.stackable.tech/v1alpha1 +kind: ZookeeperCluster +metadata: + name: druid-zk +spec: + image: + productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}" + servers: + roleGroups: + default: + replicas: 1 +--- +apiVersion: zookeeper.stackable.tech/v1alpha1 +kind: ZookeeperZnode +metadata: + name: druid-znode +spec: + clusterRef: + name: druid-zk +--- +apiVersion: zookeeper.stackable.tech/v1alpha1 +kind: ZookeeperZnode +metadata: + name: hdfs-znode +spec: + clusterRef: + name: druid-zk \ No newline at end of file diff --git a/tests/templates/kuttl/overrides/00-patch-ns.yaml.j2 b/tests/templates/kuttl/overrides/00-patch-ns.yaml.j2 new file mode 100644 index 00000000..67185acf --- /dev/null +++ b/tests/templates/kuttl/overrides/00-patch-ns.yaml.j2 @@ -0,0 +1,9 @@ +{% if test_scenario['values']['openshift'] == 'true' %} +# see https://github.com/stackabletech/issues/issues/566 +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestStep +commands: + - script: kubectl patch namespace $NAMESPACE -p '{"metadata":{"labels":{"pod-security.kubernetes.io/enforce":"privileged"}}}' + timeout: 120 +{% endif %} diff --git a/tests/templates/kuttl/overrides/10-assert.yaml b/tests/templates/kuttl/overrides/10-assert.yaml new file mode 100644 index 00000000..3dec75c6 --- /dev/null +++ b/tests/templates/kuttl/overrides/10-assert.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: hdfs-namenode-default +status: + availableReplicas: 2 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: hdfs-datanode-default +status: + availableReplicas: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: hdfs-journalnode-default +status: + availableReplicas: 1 diff --git a/tests/templates/kuttl/overrides/10-install-hdfs.yaml.j2 b/tests/templates/kuttl/overrides/10-install-hdfs.yaml.j2 new file mode 100644 index 00000000..682015a6 --- /dev/null +++ b/tests/templates/kuttl/overrides/10-install-hdfs.yaml.j2 @@ -0,0 +1,23 @@ +--- +apiVersion: hdfs.stackable.tech/v1alpha1 +kind: HdfsCluster +metadata: + name: hdfs +spec: + image: + productVersion: "{{ test_scenario['values']['hadoop-latest'] }}" + clusterConfig: + dfsReplication: 1 + zookeeperConfigMapName: hdfs-znode + nameNodes: + roleGroups: + default: + replicas: 2 + dataNodes: + roleGroups: + default: + replicas: 1 + journalNodes: + roleGroups: + default: + replicas: 1 diff --git a/tests/templates/kuttl/overrides/20-assert.yaml b/tests/templates/kuttl/overrides/20-assert.yaml new file mode 100644 index 00000000..eb8a3bff --- /dev/null +++ b/tests/templates/kuttl/overrides/20-assert.yaml @@ -0,0 +1,45 @@ +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: druid-broker-default +spec: + template: + metadata: + labels: + level: role +status: + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: druid-coordinator-default +spec: + template: + metadata: + labels: + level: role-group +status: + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: druid-historical-default +status: + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: druid-middlemanager-default +status: + readyReplicas: 1 +--- +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: druid-router-default +status: + readyReplicas: 1 diff --git a/tests/templates/kuttl/overrides/20-install-druid.yaml.j2 b/tests/templates/kuttl/overrides/20-install-druid.yaml.j2 new file mode 100644 index 00000000..4a5ed399 --- /dev/null +++ b/tests/templates/kuttl/overrides/20-install-druid.yaml.j2 @@ -0,0 +1,123 @@ +--- +apiVersion: druid.stackable.tech/v1alpha1 +kind: DruidCluster +metadata: + name: druid +spec: + image: + productVersion: "{{ test_scenario['values']['druid-latest'] }}" + clusterConfig: + deepStorage: + hdfs: + configMapName: hdfs + directory: /data + metadataStorageDatabase: + dbType: derby + connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true + host: localhost + port: 1527 + tls: null + zookeeperConfigMapName: druid-znode + brokers: + envOverrides: + ROLE_VAR: role-value + COMMON_VAR: role-value + configOverrides: + runtime.properties: + prop.common: role-value + prop.role: role-value + podOverrides: + metadata: + labels: + level: role + roleGroups: + default: + replicas: 1 + envOverrides: + GROUP_VAR: group-value + COMMON_VAR: group-value + configOverrides: + runtime.properties: + prop.common: group-value + prop.group: group-value + coordinators: + envOverrides: + ROLE_VAR: role-value + COMMON_VAR: role-value + configOverrides: + runtime.properties: + prop.common: role-value + prop.role: role-value + podOverrides: + metadata: + labels: + level: role + roleGroups: + default: + replicas: 1 + podOverrides: + metadata: + labels: + level: role-group + envOverrides: + GROUP_VAR: group-value + COMMON_VAR: group-value + configOverrides: + runtime.properties: + prop.common: group-value + prop.group: group-value + + historicals: + envOverrides: + ROLE_VAR: role-value + COMMON_VAR: role-value + configOverrides: + runtime.properties: + prop.common: role-value + prop.role: role-value + roleGroups: + default: + replicas: 1 + envOverrides: + GROUP_VAR: group-value + COMMON_VAR: group-value + configOverrides: + runtime.properties: + prop.common: group-value + prop.group: group-value + middleManagers: + envOverrides: + ROLE_VAR: role-value + COMMON_VAR: role-value + configOverrides: + runtime.properties: + prop.common: role-value + prop.role: role-value + roleGroups: + default: + replicas: 1 + envOverrides: + GROUP_VAR: group-value + COMMON_VAR: group-value + configOverrides: + runtime.properties: + prop.common: group-value + prop.group: group-value + routers: + envOverrides: + ROLE_VAR: role-value + COMMON_VAR: role-value + configOverrides: + runtime.properties: + prop.common: role-value + prop.role: role-value + roleGroups: + default: + replicas: 1 + envOverrides: + GROUP_VAR: group-value + COMMON_VAR: group-value + configOverrides: + runtime.properties: + prop.common: group-value + prop.group: group-value diff --git a/tests/templates/kuttl/overrides/21-assert.yaml b/tests/templates/kuttl/overrides/21-assert.yaml new file mode 100644 index 00000000..82f4ea70 --- /dev/null +++ b/tests/templates/kuttl/overrides/21-assert.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 600 +commands: + # + # Test envOverrides + # + - script: | + kubectl -n $NAMESPACE get sts druid-broker-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-broker-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-broker-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")' + - script: | + kubectl -n $NAMESPACE get sts druid-coordinator-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-coordinator-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-coordinator-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")' + - script: | + kubectl -n $NAMESPACE get sts druid-historical-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-historical-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-historical-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")' + - script: | + kubectl -n $NAMESPACE get sts druid-middlemanager-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-middlemanager-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-middlemanager-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")' + - script: | + kubectl -n $NAMESPACE get sts druid-router-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "COMMON_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-router-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "GROUP_VAR" and .value == "group-value")' + kubectl -n $NAMESPACE get sts druid-router-default -o yaml | yq -e '.spec.template.spec.containers[] | select (.name == "druid") | .env[] | select (.name == "ROLE_VAR" and .value == "role-value")' diff --git a/tests/templates/kuttl/overrides/22-assert.yaml b/tests/templates/kuttl/overrides/22-assert.yaml new file mode 100644 index 00000000..216a3ac8 --- /dev/null +++ b/tests/templates/kuttl/overrides/22-assert.yaml @@ -0,0 +1,28 @@ +--- +apiVersion: kuttl.dev/v1beta1 +kind: TestAssert +timeout: 600 +commands: + # + # Test configOverrides + # + - script: | + kubectl -n $NAMESPACE get cm druid-broker-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.common=group-value" + kubectl -n $NAMESPACE get cm druid-broker-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.group=group-value" + kubectl -n $NAMESPACE get cm druid-broker-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.role=role-value" + - script: | + kubectl -n $NAMESPACE get cm druid-coordinator-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.common=group-value" + kubectl -n $NAMESPACE get cm druid-coordinator-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.group=group-value" + kubectl -n $NAMESPACE get cm druid-coordinator-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.role=role-value" + - script: | + kubectl -n $NAMESPACE get cm druid-historical-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.common=group-value" + kubectl -n $NAMESPACE get cm druid-historical-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.group=group-value" + kubectl -n $NAMESPACE get cm druid-historical-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.role=role-value" + - script: | + kubectl -n $NAMESPACE get cm druid-middlemanager-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.common=group-value" + kubectl -n $NAMESPACE get cm druid-middlemanager-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.group=group-value" + kubectl -n $NAMESPACE get cm druid-middlemanager-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.role=role-value" + - script: | + kubectl -n $NAMESPACE get cm druid-router-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.common=group-value" + kubectl -n $NAMESPACE get cm druid-router-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.group=group-value" + kubectl -n $NAMESPACE get cm druid-router-default -o yaml | yq -e '.data."runtime.properties"' | grep "prop.role=role-value" diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index 33947ea5..6fec2a90 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -144,6 +144,12 @@ tests: - s3-use-tls - openshift - oidc-use-tls + - name: overrides + dimensions: + - zookeeper-latest + - hadoop-latest + - druid-latest + - openshift suites: - name: nightly patch: