diff --git a/Cargo.lock b/Cargo.lock index d0041398..04e63eb0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1353,9 +1353,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" @@ -1401,9 +1401,9 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.21" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3e3d65f018c6ae946ab16e80944b97096ed73c35b221d1c478a6c81d8f57940" +checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -1416,9 +1416,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.21" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17c2b211d863c7fde02cbea8a3c1a439b98e109286554f2860bdded7ff83818" +checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" dependencies = [ "proc-macro2", "quote", @@ -1427,9 +1427,9 @@ dependencies = [ [[package]] name = "jiff-tzdb" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68971ebff725b9e2ca27a601c5eb38a4c5d64422c4cbab0c535f248087eda5c2" +checksum = "c900ef84826f1338a557697dc8fc601df9ca9af4ac137c7fb61d4c6f2dfd3076" [[package]] name = "jiff-tzdb-platform" @@ -1452,9 +1452,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.90" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14dc6f6450b3f6d4ed5b16327f38fed626d375a886159ca555bd7822c0c3a5a6" +checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" dependencies = [ "once_cell", "wasm-bindgen", @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "darling", "regex", @@ -2028,18 +2028,18 @@ dependencies = [ [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "f1749c7ed4bcaf4c3d0a3efc28538844fb29bcdd7d2b67b2be7e20ba861ff517" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "d9b20ed30f105399776b9c883e68e536ef602a16ae6f596d2c473591d6ad64c6" dependencies = [ "proc-macro2", "quote", @@ -2048,9 +2048,9 @@ dependencies = [ [[package]] name = "pin-project-lite" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" +checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "pin-utils" @@ -2135,9 +2135,9 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" +checksum = "e67ba7e9b2b56446f1d419b1d807906278ffa1a658a8a5d8a39dcb1f5a78614f" dependencies = [ "toml_edit", ] @@ -2192,9 +2192,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -2848,7 +2848,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "const-oid", "ecdsa", @@ -2897,7 +2897,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.106.2" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "clap", "const_format", @@ -2936,7 +2936,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "darling", "proc-macro2", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "jiff", "k8s-openapi", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "axum", "clap", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "schemars", "serde", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "convert_case", "convert_case_extras", @@ -3019,7 +3019,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#f9b117c8c08557e9774f33145bb009fb74cb2437" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#a21b8bd33081b66fcb5d296ff51fd34d17ecc422" dependencies = [ "arc-swap", "async-trait", @@ -3235,9 +3235,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.49.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -3252,9 +3252,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", @@ -3298,18 +3298,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.7.5+spec-1.1.0" +version = "1.0.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347" +checksum = "32c2555c699578a4f59f0cc68e5116c8d7cabbd45e1409b989d4be085b53f13e" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.23.10+spec-1.0.0" +version = "0.25.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" +checksum = "a0a07913e63758bc95142d9863a5a45173b71515e68b690cad70cf99c3255ce1" dependencies = [ "indexmap", "toml_datetime", @@ -3636,9 +3636,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.113" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60722a937f594b7fde9adb894d7c092fc1bb6612897c46368d18e7a20208eff2" +checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" dependencies = [ "cfg-if", "once_cell", @@ -3649,9 +3649,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.63" +version = "0.4.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a89f4650b770e4521aa6573724e2aed4704372151bd0de9d16a3bbabb87441a" +checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" dependencies = [ "cfg-if", "futures-util", @@ -3663,9 +3663,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.113" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac8c6395094b6b91c4af293f4c79371c163f9a6f56184d2c9a85f5a95f3950" +checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3673,9 +3673,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.113" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3fabce6159dc20728033842636887e4877688ae94382766e00b180abac9d60" +checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" dependencies = [ "bumpalo", "proc-macro2", @@ -3686,18 +3686,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.113" +version = "0.2.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0e091bdb824da87dc01d967388880d017a0a9bc4f3bdc0d86ee9f9336e3bb5" +checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.90" +version = "0.3.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705eceb4ce901230f8625bd1d665128056ccbe4b7408faa625eec1ba80f59a97" +checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" dependencies = [ "js-sys", "wasm-bindgen", diff --git a/Cargo.nix b/Cargo.nix index c4b5eadf..cc229fbb 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4338,18 +4338,20 @@ rec { }; "ipnet" = rec { crateName = "ipnet"; - version = "2.11.0"; + version = "2.12.0"; edition = "2018"; - sha256 = "0c5i9sfi2asai28m8xp48k5gvwkqrg5ffpi767py6mzsrswv17s6"; + sha256 = "1qpq2y0asyv0jppw7zww9y96fpnpinwap8a0phhqqgyy3znnz3yr"; authors = [ "Kris Price " ]; features = { "default" = [ "std" ]; - "heapless" = [ "dep:heapless" ]; - "json" = [ "serde" "schemars" ]; - "schemars" = [ "dep:schemars" ]; - "ser_as_str" = [ "heapless" ]; + "heapless" = [ "dep:heapless" "serde" ]; + "json" = [ "schemars08" "serde" ]; + "schemars" = [ "schemars08" ]; + "schemars08" = [ "dep:schemars08" ]; + "schemars1" = [ "dep:schemars1" ]; + "ser_as_str" = [ "dep:heapless" ]; "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; @@ -4456,9 +4458,9 @@ rec { }; "jiff" = rec { crateName = "jiff"; - version = "0.2.21"; + version = "0.2.23"; edition = "2021"; - sha256 = "0h3rypc82v4a8wf1s8jvqdryv5khp520ks0nmd3fjslc05gxdqxk"; + sha256 = "0nc37n7jvgrzxdkcgc2hsfdf70lfagigjalh4igjrm5njvf4cd8s"; authors = [ "Andrew Gallant " ]; @@ -4538,9 +4540,9 @@ rec { }; "jiff-static" = rec { crateName = "jiff-static"; - version = "0.2.21"; + version = "0.2.23"; edition = "2021"; - sha256 = "061qz1zyvp8bhvr58r9817hri6s338y8msnb0bg7yg463lhjnz51"; + sha256 = "192ss3cnixvg79cpa76clwkhn4mmz10vnwsbf7yjw8i484s8p31a"; procMacro = true; libName = "jiff_static"; authors = [ @@ -4567,9 +4569,9 @@ rec { }; "jiff-tzdb" = rec { crateName = "jiff-tzdb"; - version = "0.1.5"; + version = "0.1.6"; edition = "2021"; - sha256 = "1hm5xn3q092zac6apjy4492ddid473mwa0d64z5f5f95yyzix5v8"; + sha256 = "0xihzlnnyk0xnrzpq4xcyjdcmy8xc3ychzb9ayjkh4vgha2fy069"; libName = "jiff_tzdb"; libPath = "lib.rs"; authors = [ @@ -4620,9 +4622,9 @@ rec { }; "js-sys" = rec { crateName = "js-sys"; - version = "0.3.90"; + version = "0.3.91"; edition = "2021"; - sha256 = "19m5qg024y5xanjrq5c6m1sx69nnzqw7ychnbgnx9xmka1j6zp0l"; + sha256 = "171rzgq33wc1nxkgnvhlqqwwnrifs13mg3jjpjj5nf1z0yvib5xl"; libName = "js_sys"; authors = [ "The wasm-bindgen Developers" @@ -4811,9 +4813,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; libName = "k8s_version"; authors = [ @@ -6812,9 +6814,9 @@ rec { }; "pin-project" = rec { crateName = "pin-project"; - version = "1.1.10"; + version = "1.1.11"; edition = "2021"; - sha256 = "12kadbnfm1f43cyadw9gsbyln1cy7vj764wz5c8wxaiza3filzv7"; + sha256 = "05zm3y3bl83ypsr6favxvny2kys4i19jiz1y18ylrbxwsiz9qx7i"; libName = "pin_project"; dependencies = [ { @@ -6826,9 +6828,9 @@ rec { }; "pin-project-internal" = rec { crateName = "pin-project-internal"; - version = "1.1.10"; + version = "1.1.11"; edition = "2021"; - sha256 = "0qgqzfl0f4lzaz7yl5llhbg97g68r15kljzihaw9wm64z17qx4bf"; + sha256 = "1ik4mpb92da75inmjvxf2qm61vrnwml3x24wddvrjlqh1z9hxcnr"; procMacro = true; libName = "pin_project_internal"; dependencies = [ @@ -6851,9 +6853,9 @@ rec { }; "pin-project-lite" = rec { crateName = "pin-project-lite"; - version = "0.2.16"; + version = "0.2.17"; edition = "2018"; - sha256 = "16wzc7z7dfkf9bmjin22f5282783f6mdksnr0nv0j5ym5f9gyg1v"; + sha256 = "1kfmwvs271si96zay4mm8887v5khw0c27jc9srw1a75ykvgj54x8"; libName = "pin_project_lite"; }; @@ -7065,9 +7067,9 @@ rec { }; "proc-macro-crate" = rec { crateName = "proc-macro-crate"; - version = "3.4.0"; + version = "3.5.0"; edition = "2021"; - sha256 = "10v9qi51n4phn1lrj5r94kjq7yhci9jrkqnn6wpan05yjsgb3711"; + sha256 = "0kv1g1d1zjwxlgcaba2qlshzyy32j03xic8rskqlcr5mnblsfyz6"; libName = "proc_macro_crate"; authors = [ "Bastian Köcher " @@ -7227,9 +7229,9 @@ rec { }; "quote" = rec { crateName = "quote"; - version = "1.0.44"; + version = "1.0.45"; edition = "2021"; - sha256 = "1r7c7hxl66vz3q9qizgjhy77pdrrypqgk4ghc7260xvvfb7ypci1"; + sha256 = "095rb5rg7pbnwdp6v8w5jw93wndwyijgci1b5lw8j1h5cscn3wj1"; authors = [ "David Tolnay " ]; @@ -9420,9 +9422,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; libName = "stackable_certs"; authors = [ @@ -9628,9 +9630,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; libName = "stackable_operator"; authors = [ @@ -9801,9 +9803,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -9836,9 +9838,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; libName = "stackable_shared"; authors = [ @@ -9917,9 +9919,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; libName = "stackable_telemetry"; authors = [ @@ -10027,9 +10029,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; libName = "stackable_versioned"; authors = [ @@ -10071,9 +10073,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -10139,9 +10141,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "f9b117c8c08557e9774f33145bb009fb74cb2437"; - sha256 = "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "a21b8bd33081b66fcb5d296ff51fd34d17ecc422"; + sha256 = "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av"; }; libName = "stackable_webhook"; authors = [ @@ -10771,9 +10773,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.49.0"; + version = "1.50.0"; edition = "2021"; - sha256 = "11ix3pl03s0bp71q3wddrbf8xr0cpn47d7fzr6m42r3kswy918kj"; + sha256 = "0bc2c5kd57p2xd4l6hagb0bkrp798k5vw0f3xzzwy0sf6ws5xb97"; authors = [ "Tokio Contributors " ]; @@ -10886,9 +10888,9 @@ rec { }; "tokio-macros" = rec { crateName = "tokio-macros"; - version = "2.6.0"; + version = "2.6.1"; edition = "2021"; - sha256 = "19czvgliginbzyhhfbmj77wazqn2y8g27y2nirfajdlm41bphh5g"; + sha256 = "172nwz3s7mmh266hb8l5xdnc7v9kqahisppqhinfd75nz3ps4maw"; procMacro = true; libName = "tokio_macros"; authors = [ @@ -11056,9 +11058,9 @@ rec { }; "toml_datetime" = rec { crateName = "toml_datetime"; - version = "0.7.5+spec-1.1.0"; + version = "1.0.0+spec-1.1.0"; edition = "2021"; - sha256 = "0iqkgvgsxmszpai53dbip7sf2igic39s4dby29dbqf1h9bnwzqcj"; + sha256 = "0gpiaddhignli6whj52ysjxwmmy82r8qxihckzss8y4md5f5bhij"; dependencies = [ { name = "serde_core"; @@ -11077,9 +11079,9 @@ rec { }; "toml_edit" = rec { crateName = "toml_edit"; - version = "0.23.10+spec-1.0.0"; + version = "0.25.3+spec-1.1.0"; edition = "2021"; - sha256 = "0saj5c676j8a3sqaj9akkp09wambg8aflji4zblwwa70azvvkj44"; + sha256 = "1qaw4p1rkkvhml66k2z62lavfwsiljjn761d2javqn1pwq9pk850"; dependencies = [ { name = "indexmap"; @@ -12227,9 +12229,9 @@ rec { }; "wasm-bindgen" = rec { crateName = "wasm-bindgen"; - version = "0.2.113"; + version = "0.2.114"; edition = "2021"; - sha256 = "1wpg101a5rqqilv4cz4929kbph9g15y4v2fvkbg7yjsrgy9jlwk0"; + sha256 = "13nkhw552hpllrrmkd2x9y4bmcxr82kdpky2n667kqzcq6jzjck5"; libName = "wasm_bindgen"; authors = [ "The wasm-bindgen Developers" @@ -12278,9 +12280,9 @@ rec { }; "wasm-bindgen-futures" = rec { crateName = "wasm-bindgen-futures"; - version = "0.4.63"; + version = "0.4.64"; edition = "2021"; - sha256 = "06j4hyxvlfvas7lhvgai44vh8izd59774wv5m8hla3kp1djz92ca"; + sha256 = "1f3xnr40wwims4zhvh119dhwmffz4h4x82cffi118ri878mm5ig9"; libName = "wasm_bindgen_futures"; authors = [ "The wasm-bindgen Developers" @@ -12331,9 +12333,9 @@ rec { }; "wasm-bindgen-macro" = rec { crateName = "wasm-bindgen-macro"; - version = "0.2.113"; + version = "0.2.114"; edition = "2021"; - sha256 = "0l1rbylzb1cs5i6ihmkgk8zic71pg563yadgqj8nnjq9jmiqrb0g"; + sha256 = "1rhq9kkl7n0zjrag9p25xsi4aabpgfkyf02zn4xv6pqhrw7xb8hq"; procMacro = true; libName = "wasm_bindgen_macro"; authors = [ @@ -12355,9 +12357,9 @@ rec { }; "wasm-bindgen-macro-support" = rec { crateName = "wasm-bindgen-macro-support"; - version = "0.2.113"; + version = "0.2.114"; edition = "2021"; - sha256 = "0q4xmjmq1c80drv84hz9i9l7fj3yi0v2d11kh1r21p2rc77angxb"; + sha256 = "1qriqqjpn922kv5c7f7627fj823k5aifv06j2gvwsiy5map4rkh3"; libName = "wasm_bindgen_macro_support"; authors = [ "The wasm-bindgen Developers" @@ -12391,10 +12393,10 @@ rec { }; "wasm-bindgen-shared" = rec { crateName = "wasm-bindgen-shared"; - version = "0.2.113"; + version = "0.2.114"; edition = "2021"; links = "wasm_bindgen"; - sha256 = "1d9vdqrzksbfv30bvwy4kc57l08di24775hxq1yshkc2vcdhj3ny"; + sha256 = "05lc6w64jxlk4wk8rjci4z61lhx2ams90la27a41gvi3qaw2d8vm"; libName = "wasm_bindgen_shared"; authors = [ "The wasm-bindgen Developers" @@ -12409,9 +12411,9 @@ rec { }; "web-sys" = rec { crateName = "web-sys"; - version = "0.3.90"; + version = "0.3.91"; edition = "2021"; - sha256 = "15wsyn0bmhgf4nkgl23l9fzcqml029jxdlavcbw304lhrsscwpkh"; + sha256 = "1y91r8f4dy4iqgrr03swdzqffz6wmllrgninp8kgpaq4n5xs2jw5"; libName = "web_sys"; authors = [ "The wasm-bindgen Developers" diff --git a/Cargo.toml b/Cargo.toml index befc8c19..ff2c0bb1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,6 +33,6 @@ strum = { version = "0.28", features = ["derive"] } tokio = { version = "1.40", features = ["full"] } tracing = "0.1" -# [patch."https://github.com/stackabletech/operator-rs.git"] +[patch."https://github.com/stackabletech/operator-rs.git"] # stackable-operator = { path = "../operator-rs/crates/stackable-operator" } -# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" } +stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "spike/generic-databases" } diff --git a/crate-hashes.json b/crate-hashes.json index 54177107..4a09e1e7 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -4,14 +4,14 @@ "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-derive@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-runtime@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#k8s-version@0.1.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-certs@0.4.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-operator-derive@0.3.1": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-operator@0.106.2": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-shared@0.1.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-telemetry@0.6.1": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-versioned-macros@0.8.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-versioned@0.8.3": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.106.2#stackable-webhook@0.9.0": "0b4li7f8c118vqgd7gzgd54mmicniawnfkri42pab55qj3kd6mlb", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#k8s-version@0.1.3": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-certs@0.4.0": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator-derive@0.3.1": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator@0.106.2": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-shared@0.1.0": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-telemetry@0.6.1": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned-macros@0.8.3": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned@0.8.3": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-webhook@0.9.0": "0k5s32fq0938raw0qjblavmgzn27rg3j26djzm5qq4142rv815av", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file diff --git a/deploy/config-spec/properties.yaml b/deploy/config-spec/properties.yaml index 78b63887..4ba37d15 100644 --- a/deploy/config-spec/properties.yaml +++ b/deploy/config-spec/properties.yaml @@ -58,62 +58,6 @@ properties: comment: "TTL for domain names that cannot be resolved." description: "TTL for domain names that cannot be resolved." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionURL" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - # unit: *unitUri - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - description: "JDBC connect string for a JDBC metastore. - To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL. - For example, jdbc:postgresql://myhost/db?ssl=true for postgres database." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionDriverName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - unit: *unitClassName - roles: - - name: "metastore" - # This property *is* required even though it is set to `false` here. - # The required value changed in Derby in version 4.2.0. - # We now set this value depending on the Hive version (and its corresponding Derby version) and add it to the ConfigMap programatically. - required: false - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionUserName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionPassword" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - property: propertyNames: - name: "hive.metastore.port" diff --git a/deploy/helm/hive-operator/configs/properties.yaml b/deploy/helm/hive-operator/configs/properties.yaml index 78b63887..4ba37d15 100644 --- a/deploy/helm/hive-operator/configs/properties.yaml +++ b/deploy/helm/hive-operator/configs/properties.yaml @@ -58,62 +58,6 @@ properties: comment: "TTL for domain names that cannot be resolved." description: "TTL for domain names that cannot be resolved." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionURL" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - # unit: *unitUri - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - description: "JDBC connect string for a JDBC metastore. - To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL. - For example, jdbc:postgresql://myhost/db?ssl=true for postgres database." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionDriverName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - unit: *unitClassName - roles: - - name: "metastore" - # This property *is* required even though it is set to `false` here. - # The required value changed in Derby in version 4.2.0. - # We now set this value depending on the Hive version (and its corresponding Derby version) and add it to the ConfigMap programatically. - required: false - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionUserName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionPassword" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - property: propertyNames: - name: "hive.metastore.port" diff --git a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml index 48ad049c..d71c4fe8 100644 --- a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml +++ b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml @@ -7,10 +7,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio metastore: diff --git a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 index 48ad049c..d71c4fe8 100644 --- a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 +++ b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 @@ -7,10 +7,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio metastore: diff --git a/docs/modules/hive/pages/reference/discovery.adoc b/docs/modules/hive/pages/reference/discovery.adoc index bed75059..213e07d1 100644 --- a/docs/modules/hive/pages/reference/discovery.adoc +++ b/docs/modules/hive/pages/reference/discovery.adoc @@ -23,10 +23,11 @@ metadata: namespace: {namespace} # <2> spec: clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials metastore: roleGroups: default: # <3> diff --git a/docs/modules/hive/pages/usage-guide/database-driver.adoc b/docs/modules/hive/pages/usage-guide/database-driver.adoc index 18a26cc8..1dbc22ea 100644 --- a/docs/modules/hive/pages/usage-guide/database-driver.adoc +++ b/docs/modules/hive/pages/usage-guide/database-driver.adoc @@ -149,10 +149,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:mysql://mysql:3306/hive # <1> - credentialsSecret: hive-credentials # <2> - dbType: mysql + metadataDatabase: + mysql: + host: mysql + database: hive + credentialsSecret: hive-credentials s3: reference: minio # <3> metastore: @@ -224,7 +225,7 @@ spec: custom: oci.stackable.tech/sdp/hive:4.2.0-stackable0.0.0-dev-mysql # <1> productVersion: 4.2.0 clusterConfig: - database: + metadataDatabase: ... s3: ... diff --git a/docs/modules/hive/pages/usage-guide/derby-example.adoc b/docs/modules/hive/pages/usage-guide/derby-example.adoc index 83285c8b..e2e52263 100644 --- a/docs/modules/hive/pages/usage-guide/derby-example.adoc +++ b/docs/modules/hive/pages/usage-guide/derby-example.adoc @@ -9,7 +9,6 @@ It should generally be safe to simply use the latest image version that is avail .Create a single node Apache Hive Metastore cluster using Derby: [source,yaml] ---- ---- apiVersion: hive.stackable.tech/v1alpha1 kind: HiveCluster metadata: @@ -18,23 +17,12 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/metastore_db;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} metastore: roleGroups: default: replicas: 1 ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine ---- WARNING: You should not use the `Derby` database in production. Derby stores data locally which does not work in high availability setups (multiple replicas) and all data is lost after Pod restarts. @@ -63,7 +51,6 @@ Then, connect to localhost:9001 and login with the user `minio-access-key` and p Deploy the hive cluster: [source,yaml] ---- ---- apiVersion: hive.stackable.tech/v1alpha1 kind: HiveCluster metadata: @@ -72,10 +59,8 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/stackable/metastore_db;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} s3: inline: host: minio @@ -107,15 +92,6 @@ metadata: stringData: accessKey: minio-access-key secretKey: minio-secret-key ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine ---- @@ -153,10 +129,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: hive-postgresql.default.svc.cluster.local + database: hive + credentialsSecret: hive-credentials metastore: roleGroups: default: diff --git a/examples/hive-opa-cluster.yaml b/examples/hive-opa-cluster.yaml index 5ec312f5..2d17fc2b 100644 --- a/examples/hive-opa-cluster.yaml +++ b/examples/hive-opa-cluster.yaml @@ -30,10 +30,11 @@ spec: opa: configMapName: opa package: hms - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-postgresql-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-postgresql-credentials metastore: roleGroups: default: diff --git a/examples/simple-hive-cluster-postgres-s3.yaml b/examples/simple-hive-cluster-postgres-s3.yaml index f14843af..d126034e 100644 --- a/examples/simple-hive-cluster-postgres-s3.yaml +++ b/examples/simple-hive-cluster-postgres-s3.yaml @@ -30,10 +30,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: hive-postgresql.default.svc.cluster.local + database: hive + credentialsSecret: hive-credentials s3: inline: host: test-minio diff --git a/examples/simple-hive-cluster.yaml b/examples/simple-hive-cluster.yaml index e239dd61..ae269512 100644 --- a/examples/simple-hive-cluster.yaml +++ b/examples/simple-hive-cluster.yaml @@ -11,10 +11,8 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} metastore: roleGroups: default: diff --git a/extra/crds.yaml b/extra/crds.yaml index 9574ae09..3cc97010 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -74,36 +74,6 @@ spec: - configMapName type: object type: object - database: - description: Database connection specification for the metadata database. - properties: - connString: - description: |- - A connection string for the database. For example: - `jdbc:postgresql://hivehdfs-postgresql:5432/hivehdfs` - type: string - credentialsSecret: - description: |- - A reference to a Secret containing the database credentials. - The Secret needs to contain the keys `username` and `password`. - type: string - dbType: - description: |- - The type of database to connect to. Supported are: - `postgres`, `mysql`, `oracle`, `mssql` and `derby`. - This value is used to configure the jdbc driver class. - enum: - - derby - - mysql - - postgres - - oracle - - mssql - type: string - required: - - connString - - credentialsSecret - - dbType - type: object hdfs: description: HDFS connection specification. nullable: true @@ -118,6 +88,113 @@ spec: required: - configMap type: object + metadataDatabase: + description: |- + Configure the database where the Hive metastore stores all it's internal metadata, such + as schema and tables. + oneOf: + - required: + - postgresql + - required: + - mysql + - required: + - derby + properties: + derby: + description: |- + Connection settings for an embedded [Apache Derby](https://db.apache.org/derby/) database. + + Derby is an embedded, file-based Java database engine that requires no separate server process. + It is typically used for development, testing, or as a lightweight metastore backend (e.g. for + Apache Hive). + properties: + location: + description: |- + Path on the filesystem where Derby stores its database files. + + If not specified, defaults to `/tmp/derby/{unique_database_name}/derby.db`. + The `{unique_database_name}` part is automatically handled by the operator and is added to + prevent clashing database files. The `create=true` flag is always appended to the JDBC URL, + so the database is created automatically if it does not yet exist at this location. + nullable: true + type: string + type: object + mysql: + description: |- + Connection settings for a [MySQL](https://www.mysql.com/) database. + + Please note that - due to license issues - we don't ship the mysql driver, you need to add + it it yourself. + See for details. + properties: + credentialsSecret: + description: |- + Name of a Secret containing the `username` and `password` keys used to authenticate + against the MySQL server. + type: string + database: + description: Name of the database (schema) to connect to. + type: string + host: + description: Hostname or IP address of the MySQL server. + type: string + parameters: + additionalProperties: + type: string + default: {} + description: |- + Additional map of JDBC connection parameters to append to the connection URL. The given + `HashMap` will be converted to query parameters in the form of + `?param1=value1¶m2=value2`. + type: object + port: + default: 3306 + description: Port the MySQL server is listening on. Defaults to `3306`. + format: uint16 + maximum: 65535.0 + minimum: 0.0 + type: integer + required: + - credentialsSecret + - database + - host + type: object + postgresql: + description: Connection settings for a [PostgreSQL](https://www.postgresql.org/) database. + properties: + credentialsSecret: + description: |- + Name of a Secret containing the `username` and `password` keys used to authenticate + against the PostgreSQL server. + type: string + database: + description: Name of the database (schema) to connect to. + type: string + host: + description: Hostname or IP address of the PostgreSQL server. + type: string + parameters: + additionalProperties: + type: string + default: {} + description: |- + Additional map of JDBC connection parameters to append to the connection URL. The given + `HashMap` will be converted to query parameters in the form of + `?param1=value1¶m2=value2`. + type: object + port: + default: 5432 + description: Port the PostgreSQL server is listening on. Defaults to `5432`. + format: uint16 + maximum: 65535.0 + minimum: 0.0 + type: integer + required: + - credentialsSecret + - database + - host + type: object + type: object s3: description: |- S3 connection specification. This can be either `inline` or a `reference` to an @@ -278,7 +355,7 @@ spec: nullable: true type: string required: - - database + - metadataDatabase type: object clusterOperation: default: diff --git a/rust/operator-binary/src/command.rs b/rust/operator-binary/src/command.rs index ee08f56d..0ce91957 100644 --- a/rust/operator-binary/src/command.rs +++ b/rust/operator-binary/src/command.rs @@ -3,10 +3,9 @@ use stackable_operator::crd::s3; use crate::{ config::opa::HiveOpaConfig, crd::{ - DB_PASSWORD_ENV, DB_PASSWORD_PLACEHOLDER, DB_USERNAME_ENV, DB_USERNAME_PLACEHOLDER, - HIVE_METASTORE_LOG4J2_PROPERTIES, HIVE_SITE_XML, STACKABLE_CONFIG_DIR, - STACKABLE_CONFIG_MOUNT_DIR, STACKABLE_LOG_CONFIG_MOUNT_DIR, STACKABLE_TRUST_STORE, - STACKABLE_TRUST_STORE_PASSWORD, v1alpha1, + HIVE_METASTORE_LOG4J2_PROPERTIES, STACKABLE_CONFIG_DIR, STACKABLE_CONFIG_MOUNT_DIR, + STACKABLE_LOG_CONFIG_MOUNT_DIR, STACKABLE_TRUST_STORE, STACKABLE_TRUST_STORE_PASSWORD, + v1alpha1, }, }; @@ -63,13 +62,6 @@ pub fn build_container_command_args( } } - // db credentials - args.extend([ - format!("echo replacing {DB_USERNAME_PLACEHOLDER} and {DB_PASSWORD_PLACEHOLDER} with secret values."), - format!("sed -i \"s|{DB_USERNAME_PLACEHOLDER}|${DB_USERNAME_ENV}|g\" {STACKABLE_CONFIG_DIR}/{HIVE_SITE_XML}"), - format!("sed -i \"s|{DB_PASSWORD_PLACEHOLDER}|${DB_PASSWORD_ENV}|g\" {STACKABLE_CONFIG_DIR}/{HIVE_SITE_XML}"), - ]); - // metastore start command args.push(start_command); diff --git a/rust/operator-binary/src/config/jvm.rs b/rust/operator-binary/src/config/jvm.rs index 0acfaca6..9f7bc9f2 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -109,10 +109,8 @@ mod tests { image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - dbType: derby - credentialsSecret: mySecret + metadataDatabase: + derby: {} metastore: roleGroups: default: @@ -144,10 +142,8 @@ mod tests { image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - dbType: derby - credentialsSecret: mySecret + metadataDatabase: + derby: {} metastore: config: resources: @@ -196,7 +192,10 @@ mod tests { Role, String, ) { - let hive: HiveCluster = serde_yaml::from_str(hive_cluster).expect("illegal test input"); + let deserializer = serde_yaml::Deserializer::from_str(hive_cluster); + let hive: HiveCluster = + serde_yaml::with::singleton_map_recursive::deserialize(deserializer) + .expect("invalid test input"); let hive_role = HiveRole::MetaStore; let rolegroup_ref = hive.metastore_rolegroup_ref("default"); diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 036f2798..1598595f 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -39,13 +39,14 @@ use stackable_operator::{ }, constants::RESTART_CONTROLLER_ENABLED_LABEL, crd::{listener::v1alpha1::Listener, s3}, + databases::drivers::jdbc::JDBCDatabaseConnectionDetails, k8s_openapi::{ DeepMerge, api::{ apps::v1::{StatefulSet, StatefulSetSpec}, core::v1::{ - ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, Probe, TCPSocketAction, - Volume, + ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, EnvVar, Probe, + TCPSocketAction, Volume, }, }, apimachinery::pkg::{ @@ -90,12 +91,13 @@ use crate::{ opa::{HiveOpaConfig, OPA_TLS_VOLUME_NAME}, }, crd::{ - APP_NAME, CORE_SITE_XML, Container, DB_PASSWORD_ENV, DB_USERNAME_ENV, HIVE_PORT, - HIVE_PORT_NAME, HIVE_SITE_XML, HiveClusterStatus, HiveRole, JVM_SECURITY_PROPERTIES_FILE, - METRICS_PORT, METRICS_PORT_NAME, MetaStoreConfig, STACKABLE_CONFIG_DIR, - STACKABLE_CONFIG_DIR_NAME, STACKABLE_CONFIG_MOUNT_DIR, STACKABLE_CONFIG_MOUNT_DIR_NAME, + APP_NAME, CORE_SITE_XML, Container, HIVE_PORT, HIVE_PORT_NAME, HIVE_SITE_XML, + HiveClusterStatus, HiveRole, JVM_SECURITY_PROPERTIES_FILE, METRICS_PORT, METRICS_PORT_NAME, + MetaStoreConfig, STACKABLE_CONFIG_DIR, STACKABLE_CONFIG_DIR_NAME, + STACKABLE_CONFIG_MOUNT_DIR, STACKABLE_CONFIG_MOUNT_DIR_NAME, STACKABLE_LOG_CONFIG_MOUNT_DIR, STACKABLE_LOG_CONFIG_MOUNT_DIR_NAME, STACKABLE_LOG_DIR, STACKABLE_LOG_DIR_NAME, + databases::MetadataDatabaseConnection, v1alpha1::{self, HiveMetastoreRoleConfig}, }, discovery::{self}, @@ -329,6 +331,11 @@ pub enum Error { TlsCertSecretClassVolumeBuild { source: stackable_operator::builder::pod::volume::SecretOperatorVolumeSourceBuilderError, }, + + #[snafu(display("invalid metadata database connection"))] + InvalidMetadataDatabaseConnection { + source: stackable_operator::databases::Error, + }, } type Result = std::result::Result; @@ -374,6 +381,14 @@ pub async fn reconcile_hive( None }; + let metadata_database_connection_details = hive + .spec + .cluster_config + .metadata_database + .as_jdbc_database_connection() + .jdbc_connection_details("METADATA") + .context(InvalidMetadataDatabaseConnectionSnafu)?; + let validated_config = validate_all_roles_and_groups_config( &resolved_product_image.product_version, &transform_all_roles_to_config( @@ -465,6 +480,7 @@ pub async fn reconcile_hive( &resolved_product_image, &rolegroup, rolegroup_config, + &metadata_database_connection_details, s3_connection_spec.as_ref(), &config, &client.kubernetes_cluster_info, @@ -476,6 +492,7 @@ pub async fn reconcile_hive( &resolved_product_image, &rolegroup, rolegroup_config, + &metadata_database_connection_details, s3_connection_spec.as_ref(), &config, &rbac_sa.name_any(), @@ -595,6 +612,7 @@ fn build_metastore_rolegroup_config_map( resolved_product_image: &ResolvedProductImage, rolegroup: &RoleGroupRef, role_group_config: &HashMap>, + database_connection_details: &JDBCDatabaseConnectionDetails, s3_connection_spec: Option<&s3::v1alpha1::ConnectionSpec>, merged_config: &MetaStoreConfig, cluster_info: &KubernetesClusterInfo, @@ -612,14 +630,48 @@ fn build_metastore_rolegroup_config_map( Some("/stackable/warehouse".to_string()), ); + // The Derby driver class needs some special handling + let driver = match &hive.spec.cluster_config.metadata_database { + MetadataDatabaseConnection::Derby(_) => { + // The driver class changed for hive 4.2.0 + if ["3.1.3", "4.0.0", "4.0.1", "4.1.0"] + .contains(&resolved_product_image.product_version.as_str()) + { + "org.apache.derby.jdbc.EmbeddedDriver" + } else { + "org.apache.derby.iapi.jdbc.AutoloadedDriver" + } + } + _ => database_connection_details.driver.as_str(), + }; data.insert( MetaStoreConfig::CONNECTION_DRIVER_NAME.to_string(), - Some( - hive.db_type() - .get_jdbc_driver_class(&resolved_product_image.product_version) - .to_string(), - ), + Some(driver.to_owned()), + ); + data.insert( + MetaStoreConfig::CONNECTION_URL.to_string(), + Some(database_connection_details.connection_uri.to_string()), ); + if let Some(EnvVar { + name: username_env_name, + .. + }) = &database_connection_details.username_env + { + data.insert( + MetaStoreConfig::CONNECTION_USER_NAME.to_string(), + Some(format!("${{env:{username_env_name}}}",)), + ); + } + if let Some(EnvVar { + name: password_env_name, + .. + }) = &database_connection_details.password_env + { + data.insert( + MetaStoreConfig::CONNECTION_PASSWORD.to_string(), + Some(format!("${{env:{password_env_name}}}",)), + ); + } if let Some(s3) = s3_connection_spec { data.insert( @@ -759,6 +811,7 @@ fn build_metastore_rolegroup_statefulset( resolved_product_image: &ResolvedProductImage, rolegroup_ref: &RoleGroupRef, metastore_config: &HashMap>, + database_connection_details: &JDBCDatabaseConnectionDetails, s3_connection: Option<&s3::v1alpha1::ConnectionSpec>, merged_config: &MetaStoreConfig, sa_name: &str, @@ -774,13 +827,7 @@ fn build_metastore_rolegroup_statefulset( name: APP_NAME.to_string(), })?; - let credentials_secret_name = hive.spec.cluster_config.database.credentials_secret.clone(); - container_builder - // load database credentials to environment variables: these will be used to replace - // the placeholders in hive-site.xml so that the operator does not "touch" the secret. - .add_env_var_from_secret(DB_USERNAME_ENV, &credentials_secret_name, "username") - .add_env_var_from_secret(DB_PASSWORD_ENV, &credentials_secret_name, "password") .add_env_var( "HADOOP_HEAPSIZE", construct_hadoop_heapsize_env(merged_config).context(ConstructJvmArgumentsSnafu)?, @@ -794,6 +841,7 @@ fn build_metastore_rolegroup_statefulset( "CONTAINERDEBUG_LOG_DIRECTORY", format!("{STACKABLE_LOG_DIR}/containerdebug"), ); + database_connection_details.add_to_container(&mut container_builder); for (property_name_kind, config) in metastore_config { if property_name_kind == &PropertyNameKind::Env { @@ -862,7 +910,7 @@ fn build_metastore_rolegroup_statefulset( .context(AddVolumeSnafu)?; } - let db_type = hive.db_type(); + let db_type = hive.spec.cluster_config.metadata_database.as_hive_db_type(); let start_command = if resolved_product_image.product_version.starts_with("3.") { // The schematool version in 3.1.x does *not* support the `-initOrUpgradeSchema` flag yet, so we can not use that. // As we *only* support HMS 3.1.x (or newer) since SDP release 23.11, we can safely assume we are always coming diff --git a/rust/operator-binary/src/crd/affinity.rs b/rust/operator-binary/src/crd/affinity.rs index 40ed8052..e187d9a4 100644 --- a/rust/operator-binary/src/crd/affinity.rs +++ b/rust/operator-binary/src/crd/affinity.rs @@ -47,16 +47,17 @@ mod tests { image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - dbType: derby - credentialsSecret: mySecret + metadataDatabase: + derby: {} metastore: roleGroups: default: replicas: 1 "#; - let hive: v1alpha1::HiveCluster = serde_yaml::from_str(input).expect("illegal test input"); + let deserializer = serde_yaml::Deserializer::from_str(input); + let hive: v1alpha1::HiveCluster = + serde_yaml::with::singleton_map_recursive::deserialize(deserializer) + .expect("invalid test input"); let merged_config = hive .merged_config(&role, &role.rolegroup_ref(&hive, "default")) .unwrap(); diff --git a/rust/operator-binary/src/crd/databases.rs b/rust/operator-binary/src/crd/databases.rs new file mode 100644 index 00000000..40265375 --- /dev/null +++ b/rust/operator-binary/src/crd/databases.rs @@ -0,0 +1,49 @@ +use serde::{Deserialize, Serialize}; +use stackable_operator::{ + databases::{ + databases::{ + derby::DerbyConnection, mysql::MysqlConnection, postgresql::PostgresqlConnection, + }, + drivers::jdbc::JDBCDatabaseConnection, + }, + schemars::{self, JsonSchema}, +}; + +#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum MetadataDatabaseConnection { + // Docs are on the struct + Postgresql(PostgresqlConnection), + + /// Connection settings for a [MySQL](https://www.mysql.com/) database. + /// + /// Please note that - due to license issues - we don't ship the mysql driver, you need to add + /// it it yourself. + /// See for details. + Mysql(MysqlConnection), + + // Docs are on the struct + Derby(DerbyConnection), + // We don't support generic (yet?), as we need to tell the metastore the `--dbtype` on startup, + // which is not known for generic connection. + // Generic(GenericJDBCDatabaseConnection), +} + +impl MetadataDatabaseConnection { + pub fn as_jdbc_database_connection(&self) -> &dyn JDBCDatabaseConnection { + match self { + Self::Postgresql(p) => p, + Self::Mysql(m) => m, + Self::Derby(d) => d, + } + } + + /// Name of the database as it should be passed using the `--db-type` CLI argument to Hive + pub fn as_hive_db_type(&self) -> &str { + match self { + MetadataDatabaseConnection::Postgresql(_) => "postgres", + MetadataDatabaseConnection::Mysql(_) => "mysql", + MetadataDatabaseConnection::Derby(_) => "derby", + } + } +} diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 9192e191..82ecd09c 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -1,5 +1,6 @@ use std::{collections::BTreeMap, str::FromStr}; +use databases::MetadataDatabaseConnection; use security::AuthenticationConfig; use serde::{Deserialize, Serialize}; use snafu::{OptionExt, ResultExt, Snafu}; @@ -37,6 +38,7 @@ use v1alpha1::HiveMetastoreRoleConfig; use crate::{crd::affinity::get_affinity, listener::metastore_default_listener_class}; pub mod affinity; +pub mod databases; pub mod security; pub const FIELD_MANAGER: &str = "hive-operator"; @@ -68,12 +70,6 @@ pub const METRICS_PORT: u16 = 9084; pub const STACKABLE_TRUST_STORE: &str = "/stackable/truststore.p12"; pub const STACKABLE_TRUST_STORE_PASSWORD: &str = "changeit"; -// DB credentials -pub const DB_USERNAME_PLACEHOLDER: &str = "xxx_db_username_xxx"; -pub const DB_PASSWORD_PLACEHOLDER: &str = "xxx_db_password_xxx"; -pub const DB_USERNAME_ENV: &str = "DB_USERNAME_ENV"; -pub const DB_PASSWORD_ENV: &str = "DB_PASSWORD_ENV"; - const DEFAULT_METASTORE_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(5); #[derive(Snafu, Debug)] @@ -155,7 +151,7 @@ pub mod versioned { pub listener_class: String, } - #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct HiveClusterConfig { /// Settings related to user [authentication](DOCS_BASE_URL_PLACEHOLDER/hive/usage-guide/security). @@ -165,8 +161,9 @@ pub mod versioned { /// Learn more in the [Hive authorization usage guide](DOCS_BASE_URL_PLACEHOLDER/hive/usage-guide/security#authorization). pub authorization: Option, - // no doc - docs in DatabaseConnectionSpec struct. - pub database: DatabaseConnectionSpec, + /// Configure the database where the Hive metastore stores all it's internal metadata, such + /// as schema and tables. + pub metadata_database: MetadataDatabaseConnection, /// HDFS connection specification. #[serde(default, skip_serializing_if = "Option::is_none")] @@ -296,10 +293,6 @@ impl v1alpha1::HiveCluster { .map(|k| k.secret_class.clone()) } - pub fn db_type(&self) -> &DbType { - &self.spec.cluster_config.database.db_type - } - pub fn get_opa_config(&self) -> Option<&OpaConfig> { self.spec .cluster_config @@ -501,68 +494,6 @@ impl MetaStoreConfig { } } -#[derive( - Clone, Debug, Deserialize, Eq, Hash, JsonSchema, PartialEq, Serialize, Display, EnumString, -)] -pub enum DbType { - #[serde(rename = "derby")] - #[strum(serialize = "derby")] - Derby, - - #[serde(rename = "mysql")] - #[strum(serialize = "mysql")] - Mysql, - - #[serde(rename = "postgres")] - #[strum(serialize = "postgres")] - Postgres, - - #[serde(rename = "oracle")] - #[strum(serialize = "oracle")] - Oracle, - - #[serde(rename = "mssql")] - #[strum(serialize = "mssql")] - Mssql, -} - -impl DbType { - pub fn get_jdbc_driver_class(&self, product_version: &str) -> &str { - match self { - DbType::Derby => { - // The driver class changed for hive 4.2.0 - if ["3.1.3", "4.0.0", "4.0.1", "4.1.0"].contains(&product_version) { - "org.apache.derby.jdbc.EmbeddedDriver" - } else { - "org.apache.derby.iapi.jdbc.AutoloadedDriver" - } - } - DbType::Mysql => "com.mysql.jdbc.Driver", - DbType::Postgres => "org.postgresql.Driver", - DbType::Mssql => "com.microsoft.sqlserver.jdbc.SQLServerDriver", - DbType::Oracle => "oracle.jdbc.driver.OracleDriver", - } - } -} - -/// Database connection specification for the metadata database. -#[derive(Clone, Debug, Deserialize, Eq, Hash, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct DatabaseConnectionSpec { - /// A connection string for the database. For example: - /// `jdbc:postgresql://hivehdfs-postgresql:5432/hivehdfs` - pub conn_string: String, - - /// The type of database to connect to. Supported are: - /// `postgres`, `mysql`, `oracle`, `mssql` and `derby`. - /// This value is used to configure the jdbc driver class. - pub db_type: DbType, - - /// A reference to a Secret containing the database credentials. - /// The Secret needs to contain the keys `username` and `password`. - pub credentials_secret: String, -} - impl Configuration for MetaStoreConfigFragment { type Configurable = v1alpha1::HiveCluster; @@ -585,7 +516,7 @@ impl Configuration for MetaStoreConfigFragment { fn compute_files( &self, - hive: &Self::Configurable, + _hive: &Self::Configurable, _role_name: &str, file: &str, ) -> Result>, product_config_utils::Error> { @@ -598,19 +529,6 @@ impl Configuration for MetaStoreConfigFragment { Some(warehouse_dir.to_string()), ); } - result.insert( - MetaStoreConfig::CONNECTION_URL.to_string(), - Some(hive.spec.cluster_config.database.conn_string.clone()), - ); - // use a placeholder that will be replaced in the start command (also for the password) - result.insert( - MetaStoreConfig::CONNECTION_USER_NAME.to_string(), - Some(DB_USERNAME_PLACEHOLDER.into()), - ); - result.insert( - MetaStoreConfig::CONNECTION_PASSWORD.to_string(), - Some(DB_PASSWORD_PLACEHOLDER.into()), - ); result.insert( MetaStoreConfig::METASTORE_METRICS_ENABLED.to_string(), Some("true".to_string()), diff --git a/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 index e7f4f782..25ecb9aa 100644 --- a/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} @@ -27,12 +25,3 @@ spec: roleGroups: default: replicas: 1 ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine diff --git a/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 index 9bb428d7..37b0476f 100644 --- a/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 @@ -4,29 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby -{% if lookup('env', 'VECTOR_AGGREGATOR') %} - vectorAggregatorConfigMapName: vector-aggregator-discovery -{% endif %} clusterOperation: stopped: true reconciliationPaused: false - metastore: - config: - logging: - enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} - roleGroups: - default: - replicas: 1 diff --git a/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 index 17001faf..ca23843d 100644 --- a/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 @@ -4,29 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby -{% if lookup('env', 'VECTOR_AGGREGATOR') %} - vectorAggregatorConfigMapName: vector-aggregator-discovery -{% endif %} clusterOperation: stopped: false reconciliationPaused: true - metastore: - config: - logging: - enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} - roleGroups: - default: - replicas: 1 diff --git a/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 index 91905872..ac4b348c 100644 --- a/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 @@ -4,29 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby -{% if lookup('env', 'VECTOR_AGGREGATOR') %} - vectorAggregatorConfigMapName: vector-aggregator-discovery -{% endif %} clusterOperation: stopped: false reconciliationPaused: false - metastore: - config: - logging: - enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} - roleGroups: - default: - replicas: 1 diff --git a/tests/templates/kuttl/external-access/install-hive.yaml.j2 b/tests/templates/kuttl/external-access/install-hive.yaml.j2 index 84b8d47c..2f100403 100644 --- a/tests/templates/kuttl/external-access/install-hive.yaml.j2 +++ b/tests/templates/kuttl/external-access/install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 b/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 index 840be987..ee3faed4 100644 --- a/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 +++ b/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 @@ -19,10 +19,11 @@ commands: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials hdfs: configMap: hdfs authentication: diff --git a/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 b/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 index d60c0ef9..a87f676b 100644 --- a/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 +++ b/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 @@ -19,10 +19,11 @@ commands: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio authentication: diff --git a/tests/templates/kuttl/logging/04-install-hive.yaml.j2 b/tests/templates/kuttl/logging/04-install-hive.yaml.j2 index 571f73f6..b42b8cc9 100644 --- a/tests/templates/kuttl/logging/04-install-hive.yaml.j2 +++ b/tests/templates/kuttl/logging/04-install-hive.yaml.j2 @@ -47,10 +47,11 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://hive-postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: hive-postgresql + database: hive + credentialsSecret: hive-credentials vectorAggregatorConfigMapName: hive-vector-aggregator-discovery metastore: roleGroups: diff --git a/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 b/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 index cd8b1df0..7464dc42 100644 --- a/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 +++ b/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} @@ -29,12 +27,3 @@ spec: replicas: 1 remove: replicas: 1 ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine diff --git a/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 b/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 index 19ae7250..ddc0eda0 100644 --- a/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 +++ b/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 @@ -4,19 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby metastore: roleGroups: remove: null diff --git a/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml b/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml index 669d5592..712baac9 100644 --- a/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml +++ b/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml @@ -4,11 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby metastore: roleGroups: default: null diff --git a/tests/templates/kuttl/resources/10-install-hive.yaml.j2 b/tests/templates/kuttl/resources/10-install-hive.yaml.j2 index a985772d..7c847240 100644 --- a/tests/templates/kuttl/resources/10-install-hive.yaml.j2 +++ b/tests/templates/kuttl/resources/10-install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} @@ -52,12 +50,3 @@ spec: cpu: 500m limits: cpu: 3100m ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine diff --git a/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 b/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 index 1f35f82a..25d900a9 100644 --- a/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 +++ b/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 @@ -17,10 +17,11 @@ spec: opa: configMapName: opa package: hms - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio {% if lookup('env', 'VECTOR_AGGREGATOR') %} diff --git a/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 b/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 index 39d7fe02..5a2b0edb 100644 --- a/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 +++ b/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 @@ -13,10 +13,11 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %}