diff --git a/Cargo.lock b/Cargo.lock index b1eb1807..f61e92c4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -169,9 +169,9 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b52af3cb4058c895d37317bb27508dccc8e5f2d39454016b297bf4a400597b8" +checksum = "31b698c5f9a010f6573133b09e0de5408834d0c82f8d7475a89fc1867a71cd90" dependencies = [ "axum-core", "bytes", @@ -265,9 +265,9 @@ checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af" +checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" [[package]] name = "block-buffer" @@ -331,9 +331,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b193af5b67834b676abd72466a96c1024e6a6ad978a1f484bd90b85c94041351" +checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" dependencies = [ "clap_builder", "clap_derive", @@ -353,9 +353,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.0" +version = "4.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1110bd8a634a1ab8cb04345d8d878267d57c3cf1b38d91b71af6686408bbca6a" +checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" dependencies = [ "heck", "proc-macro2", @@ -392,11 +392,12 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "const_format" -version = "0.2.35" +version = "0.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7faa7469a93a566e9ccc1c73fe783b4a65c274c5ace346038dca9c39fe0030ad" +checksum = "4481a617ad9a412be3b97c5d403fef8ed023103368908b9c50af598ff467cc1e" dependencies = [ "const_format_proc_macros", + "konst", ] [[package]] @@ -1159,9 +1160,9 @@ dependencies = [ [[package]] name = "hyper-rustls" -version = "0.27.7" +version = "0.27.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" +checksum = "33ca68d021ef39cf6463ab54c1d0f5daf03377b70561305bb89a8f83aab66e0f" dependencies = [ "http", "hyper", @@ -1169,7 +1170,6 @@ dependencies = [ "log", "rustls", "rustls-native-certs", - "rustls-pki-types", "tokio", "tokio-rustls", "tower-service", @@ -1464,9 +1464,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.94" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e04e2ef80ce82e13552136fabeef8a5ed1f985a96805761cbb9a2c34e7664d9" +checksum = "2964e92d1d9dc3364cae4d718d93f227e3abb088e747d92e0395bfdedf1c12ca" dependencies = [ "cfg-if", "futures-util", @@ -1532,6 +1532,21 @@ dependencies = [ "snafu 0.9.0", ] +[[package]] +name = "konst" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "128133ed7824fcd73d6e7b17957c5eb7bacb885649bd8c69708b2331a10bcefb" +dependencies = [ + "konst_macro_rules", +] + +[[package]] +name = "konst_macro_rules" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4933f3f57a8e9d9da04db23fb153356ecaf00cbd14aee46279c33dc80925c37" + [[package]] name = "kube" version = "3.1.0" @@ -1651,9 +1666,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.184" +version = "0.2.185" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f5d2a454e16a5ea0f4ced81bd44e4cfc7bd3a507b61887c99fd3538b28e4af" +checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" [[package]] name = "libgit2-sys" @@ -1774,7 +1789,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand 0.8.5", + "rand 0.8.6", "smallvec", "zeroize", ] @@ -1921,7 +1936,7 @@ dependencies = [ "futures-util", "opentelemetry", "percent-encoding", - "rand 0.9.2", + "rand 0.9.4", "thiserror 2.0.18", "tokio", "tokio-stream", @@ -2094,9 +2109,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +checksum = "19f132c84eca552bf34cab8ec81f1c1dcc229b811638f9d283dceabe58c5569e" [[package]] name = "portable-atomic" @@ -2106,9 +2121,9 @@ checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" [[package]] name = "portable-atomic-util" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "091397be61a01d4be58e7841595bd4bfedb15f1cd54977d79b8271e94ed799a3" +checksum = "c2a106d1259c23fac8e543272398ae0e3c0b8d33c88ed73d0cc71b0f1d902618" dependencies = [ "portable-atomic", ] @@ -2220,9 +2235,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "rand" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ "rand_chacha 0.3.1", "rand_core 0.6.4", @@ -2230,9 +2245,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" dependencies = [ "rand_chacha 0.9.0", "rand_core 0.9.5", @@ -2459,9 +2474,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.37" +version = "0.23.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758025cb5fccfd3bc2fd74708fd4682be41d99e5dff73c377c0646c6012c73a4" +checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" dependencies = [ "log", "once_cell", @@ -2495,9 +2510,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.11" +version = "0.103.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20a6af516fea4b20eccceaf166e8aa666ac996208e8a644ce3ef5aa783bc7cd4" +checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" dependencies = [ "ring", "rustls-pki-types", @@ -2889,7 +2904,7 @@ dependencies = [ "k8s-openapi", "kube", "p256", - "rand 0.9.2", + "rand 0.9.4", "rand_core 0.6.4", "rsa", "sha2", @@ -2948,7 +2963,7 @@ dependencies = [ "k8s-openapi", "kube", "product-config", - "rand 0.9.2", + "rand 0.9.4", "regex", "schemars", "semver", @@ -3068,7 +3083,7 @@ dependencies = [ "kube", "opentelemetry", "opentelemetry-semantic-conventions", - "rand 0.9.2", + "rand 0.9.4", "serde", "serde_json", "snafu 0.9.0", @@ -3117,6 +3132,12 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + [[package]] name = "syn" version = "1.0.109" @@ -3272,9 +3293,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.51.1" +version = "1.52.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes", "libc", @@ -3467,11 +3488,12 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" +checksum = "050686193eb999b4bb3bc2acfa891a13da00f79734704c4b8b4ef1a10b368a3c" dependencies = [ "crossbeam-channel", + "symlink", "thiserror 2.0.18", "time", "tracing-subscriber", @@ -3564,9 +3586,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "typenum" -version = "1.19.0" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb" +checksum = "40ce102ab67701b8526c123c1bab5cbe42d7040ccfd0f64af1a385808d2f43de" [[package]] name = "ucd-trie" @@ -3664,18 +3686,18 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.2+wasi-0.2.9" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0551fc1bb415591e3372d0bc4780db7e587d84e2a7e79da121051c5c4b89d0b0" +checksum = "0bf938a0bacb0469e83c1e148908bd7d5a6010354cf4fb73279b7447422e3a89" dependencies = [ "cfg-if", "once_cell", @@ -3686,9 +3708,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.67" +version = "0.4.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03623de6905b7206edd0a75f69f747f134b7f0a2323392d664448bf2d3c5d87e" +checksum = "f371d383f2fb139252e0bfac3b81b265689bf45b6874af544ffa4c975ac1ebf8" dependencies = [ "js-sys", "wasm-bindgen", @@ -3696,9 +3718,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fbdf9a35adf44786aecd5ff89b4563a90325f9da0923236f6104e603c7e86be" +checksum = "eeff24f84126c0ec2db7a449f0c2ec963c6a49efe0698c4242929da037ca28ed" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3706,9 +3728,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dca9693ef2bab6d4e6707234500350d8dad079eb508dca05530c85dc3a529ff2" +checksum = "9d08065faf983b2b80a79fd87d8254c409281cf7de75fc4b773019824196c904" dependencies = [ "bumpalo", "proc-macro2", @@ -3719,18 +3741,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.117" +version = "0.2.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39129a682a6d2d841b6c429d0c51e5cb0ed1a03829d8b3d1e69a011e62cb3d3b" +checksum = "5fd04d9e306f1907bd13c6361b5c6bfc7b3b3c095ed3f8a9246390f8dbdee129" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.94" +version = "0.3.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd70027e39b12f0849461e08ffc50b9cd7688d942c1c8e3c7b22273236b4dd0a" +checksum = "4f2dfbb17949fa2088e5d39408c48368947b86f7834484e87b73de55bc14d97d" dependencies = [ "js-sys", "wasm-bindgen", @@ -3898,9 +3920,9 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.51.0" +version = "0.57.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" [[package]] name = "writeable" diff --git a/Cargo.nix b/Cargo.nix index 8ab0d15d..088715df 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -499,9 +499,9 @@ rec { }; "axum" = rec { crateName = "axum"; - version = "0.8.8"; + version = "0.8.9"; edition = "2021"; - sha256 = "1f4p0m04mgwpn8b40i9r5mgqxk6w11sv4yri6xfqk305nhyayllb"; + sha256 = "146df5x8dhczm1sp939gr3839220wl6rxc1k65bzc450z72ridii"; dependencies = [ { name = "axum-core"; @@ -866,9 +866,9 @@ rec { }; "bitflags" = rec { crateName = "bitflags"; - version = "2.11.0"; + version = "2.11.1"; edition = "2021"; - sha256 = "1bwjibwry5nfwsfm9kjg2dqx5n5nja9xymwbfl6svnn8jsz6ff44"; + sha256 = "1cvqijg3rvwgis20a66vfdxannjsxfy5fgjqkaq3l13gyfcj4lf4"; authors = [ "The Rust Project Developers" ]; @@ -1060,10 +1060,10 @@ rec { }; "clap" = rec { crateName = "clap"; - version = "4.6.0"; + version = "4.6.1"; edition = "2024"; crateBin = []; - sha256 = "0l8k0ja5rf4hpn2g98bqv5m6lkh2q6b6likjpmm6fjw3cxdsz4xi"; + sha256 = "0lcf88l7vlg796rrqr7wipbbmfa5sgsgx4211b7xmxxv8dz13nqx"; dependencies = [ { name = "clap_builder"; @@ -1141,9 +1141,9 @@ rec { }; "clap_derive" = rec { crateName = "clap_derive"; - version = "4.6.0"; + version = "4.6.1"; edition = "2024"; - sha256 = "0snapc468s7n3avr33dky4y7rmb7ha3qsp9l0k5vh6jacf5bs40i"; + sha256 = "1acpz49hi00iv9jkapixjzcv7s51x8qkfaqscjm36rqgf428dkpj"; procMacro = true; dependencies = [ { @@ -1226,9 +1226,9 @@ rec { }; "const_format" = rec { crateName = "const_format"; - version = "0.2.35"; + version = "0.2.36"; edition = "2021"; - sha256 = "1b9h03z3k76ail1ldqxcqmsc4raa7dwgwwqwrjf6wmism5lp9akz"; + sha256 = "07ncczs8yndga2f8p4386c827l4fxwzl0pbwp7ijnhcsmlbsd0a4"; authors = [ "rodrimati1992 " ]; @@ -1237,6 +1237,12 @@ rec { name = "const_format_proc_macros"; packageId = "const_format_proc_macros"; } + { + name = "konst"; + packageId = "konst"; + usesDefaultFeatures = false; + features = [ "rust_1_64" ]; + } ]; features = { "__debug" = [ "const_format_proc_macros/debug" ]; @@ -1250,10 +1256,9 @@ rec { "constant_time_as_str" = [ "fmt" ]; "derive" = [ "fmt" "const_format_proc_macros/derive" ]; "fmt" = [ "rust_1_83" ]; - "konst" = [ "dep:konst" ]; "more_str_macros" = [ "rust_1_64" ]; "nightly_const_generics" = [ "const_generics" ]; - "rust_1_64" = [ "rust_1_51" "konst" "konst/rust_1_64" ]; + "rust_1_64" = [ "rust_1_51" ]; "rust_1_83" = [ "rust_1_64" ]; }; resolvedDefaultFeatures = [ "default" ]; @@ -3628,9 +3633,9 @@ rec { }; "hyper-rustls" = rec { crateName = "hyper-rustls"; - version = "0.27.7"; + version = "0.27.9"; edition = "2021"; - sha256 = "0n6g8998szbzhnvcs1b7ibn745grxiqmlpg53xz206v826v3xjg3"; + sha256 = "03vfnsm873wsp1dk0q85nxvk7w6syp8c2m5bcdjcyfgg4786ijik"; libName = "hyper_rustls"; dependencies = [ { @@ -3663,11 +3668,6 @@ rec { packageId = "rustls-native-certs"; optional = true; } - { - name = "rustls-pki-types"; - packageId = "rustls-pki-types"; - rename = "pki-types"; - } { name = "tokio"; packageId = "tokio"; @@ -4661,9 +4661,9 @@ rec { }; "js-sys" = rec { crateName = "js-sys"; - version = "0.3.94"; + version = "0.3.95"; edition = "2021"; - sha256 = "1nb4fr7c78mrrdhmg04nbac1zvd5z3panvqka8sy30nfh3py411f"; + sha256 = "1jhj3kgxxgwm0cpdjiz7i2qapqr7ya9qswadmr63dhwx3lnyjr19"; libName = "js_sys"; authors = [ "The wasm-bindgen Developers" @@ -4868,7 +4868,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; libName = "k8s_version"; authors = [ @@ -4895,6 +4895,53 @@ rec { }; resolvedDefaultFeatures = [ "darling" ]; }; + "konst" = rec { + crateName = "konst"; + version = "0.2.20"; + edition = "2018"; + sha256 = "1yyf1fhk28wbf1lqrga9as4cpfmpbry9a5vvdqyxgz14g3nk708j"; + authors = [ + "rodrimati1992 " + ]; + dependencies = [ + { + name = "konst_macro_rules"; + packageId = "konst_macro_rules"; + } + ]; + features = { + "__ui" = [ "__test" "trybuild" "rust_latest_stable" ]; + "const_generics" = [ "rust_1_51" ]; + "constant_time_slice" = [ "rust_latest_stable" ]; + "default" = [ "cmp" "parsing" ]; + "deref_raw_in_fn" = [ "rust_1_56" ]; + "konst_proc_macros" = [ "dep:konst_proc_macros" ]; + "mut_refs" = [ "rust_latest_stable" "konst_macro_rules/mut_refs" ]; + "nightly_mut_refs" = [ "mut_refs" "konst_macro_rules/nightly_mut_refs" ]; + "parsing" = [ "parsing_no_proc" "konst_proc_macros" ]; + "rust_1_51" = [ "konst_macro_rules/rust_1_51" ]; + "rust_1_55" = [ "rust_1_51" "konst_macro_rules/rust_1_55" ]; + "rust_1_56" = [ "rust_1_55" "konst_macro_rules/rust_1_56" ]; + "rust_1_57" = [ "rust_1_56" "konst_macro_rules/rust_1_57" ]; + "rust_1_61" = [ "rust_1_57" "konst_macro_rules/rust_1_61" ]; + "rust_1_64" = [ "rust_1_61" ]; + "rust_latest_stable" = [ "rust_1_64" ]; + "trybuild" = [ "dep:trybuild" ]; + }; + resolvedDefaultFeatures = [ "rust_1_51" "rust_1_55" "rust_1_56" "rust_1_57" "rust_1_61" "rust_1_64" ]; + }; + "konst_macro_rules" = rec { + crateName = "konst_macro_rules"; + version = "0.2.19"; + edition = "2018"; + sha256 = "0dswja0dqcww4x3fwjnirc0azv2n6cazn8yv0kddksd8awzkz4x4"; + authors = [ + "rodrimati1992 " + ]; + features = { + }; + resolvedDefaultFeatures = [ "rust_1_51" "rust_1_55" "rust_1_56" "rust_1_57" "rust_1_61" ]; + }; "kube" = rec { crateName = "kube"; version = "3.1.0"; @@ -5471,9 +5518,9 @@ rec { }; "libc" = rec { crateName = "libc"; - version = "0.2.184"; + version = "0.2.185"; edition = "2021"; - sha256 = "1bz4525m7lwzr63iidh7lp9ppz2c9va1pn6fyjh5wsp1ajjd5xa8"; + sha256 = "13rbdaa59l3w92q7kfcxx8zbikm99zzw54h59aqvcv5wx47jrzsj"; authors = [ "The Rust Project Developers" ]; @@ -5848,7 +5895,7 @@ rec { } { name = "rand"; - packageId = "rand 0.8.5"; + packageId = "rand 0.8.6"; optional = true; usesDefaultFeatures = false; } @@ -5867,7 +5914,7 @@ rec { devDependencies = [ { name = "rand"; - packageId = "rand 0.8.5"; + packageId = "rand 0.8.6"; features = [ "small_rng" ]; } ]; @@ -6411,7 +6458,7 @@ rec { } { name = "rand"; - packageId = "rand 0.9.2"; + packageId = "rand 0.9.4"; optional = true; usesDefaultFeatures = false; features = [ "std" "std_rng" "small_rng" "os_rng" "thread_rng" ]; @@ -6950,9 +6997,9 @@ rec { }; "pkg-config" = rec { crateName = "pkg-config"; - version = "0.3.32"; + version = "0.3.33"; edition = "2018"; - sha256 = "0k4h3gnzs94sjb2ix6jyksacs52cf1fanpwsmlhjnwrdnp8dppby"; + sha256 = "17jnqmcbxsnwhg9gjf0nh6dj5k0x3hgwi3mb9krjnmfa9v435w8r"; libName = "pkg_config"; authors = [ "Alex Crichton " @@ -6974,9 +7021,9 @@ rec { }; "portable-atomic-util" = rec { crateName = "portable-atomic-util"; - version = "0.2.6"; + version = "0.2.7"; edition = "2018"; - sha256 = "18wrsx7fjwc2kgbpfjfm3igv3vdzsidmjhbqivjln7d0c6z9f4q9"; + sha256 = "0616j0fhy6y71hyxg3n86f6hng0fmsc269s3wp4gl8ww4p8hd8f2"; libName = "portable_atomic_util"; dependencies = [ { @@ -6987,6 +7034,7 @@ rec { } ]; features = { + "serde" = [ "dep:serde" ]; "std" = [ "alloc" ]; }; resolvedDefaultFeatures = [ "alloc" ]; @@ -7270,11 +7318,11 @@ rec { "rustc-dep-of-std" = [ "core" ]; }; }; - "rand 0.8.5" = rec { + "rand 0.8.6" = rec { crateName = "rand"; - version = "0.8.5"; + version = "0.8.6"; edition = "2018"; - sha256 = "013l6931nn7gkc23jz5mm3qdhf93jjf0fg64nz2lp4i51qd8vbrl"; + sha256 = "12kd4rljn86m00rcaz4c1rcya4mb4gk5ig6i8xq00a8wjgxfr82w"; authors = [ "The Rand Project Developers" "The Rust Project Developers" @@ -7296,22 +7344,19 @@ rec { "default" = [ "std" "std_rng" ]; "getrandom" = [ "rand_core/getrandom" ]; "libc" = [ "dep:libc" ]; - "log" = [ "dep:log" ]; - "packed_simd" = [ "dep:packed_simd" ]; "rand_chacha" = [ "dep:rand_chacha" ]; "serde" = [ "dep:serde" ]; "serde1" = [ "serde" "rand_core/serde1" ]; - "simd_support" = [ "packed_simd" ]; "std" = [ "rand_core/std" "rand_chacha/std" "alloc" "getrandom" "libc" ]; "std_rng" = [ "rand_chacha" ]; }; resolvedDefaultFeatures = [ "rand_chacha" "std_rng" ]; }; - "rand 0.9.2" = rec { + "rand 0.9.4" = rec { crateName = "rand"; - version = "0.9.2"; + version = "0.9.4"; edition = "2021"; - sha256 = "1lah73ainvrgl7brcxx0pwhpnqa3sm3qaj672034jz8i0q7pgckd"; + sha256 = "1sknbxgs6nfg0nxdd7689lwbyr2i4vaswchrv4b34z8vpc3azia4"; authors = [ "The Rand Project Developers" "The Rust Project Developers" @@ -7331,7 +7376,6 @@ rec { ]; features = { "default" = [ "std" "std_rng" "os_rng" "small_rng" "thread_rng" ]; - "log" = [ "dep:log" ]; "os_rng" = [ "rand_core/os_rng" ]; "serde" = [ "dep:serde" "rand_core/serde" ]; "std" = [ "rand_core/std" "rand_chacha?/std" "alloc" ]; @@ -8206,9 +8250,9 @@ rec { }; "rustls" = rec { crateName = "rustls"; - version = "0.23.37"; + version = "0.23.38"; edition = "2021"; - sha256 = "193k5h0wcih6ghvkrxyzwncivr1bd3a8yw3lzp13pzfcbz5jb03m"; + sha256 = "089ssmhd79f0kd22brh6lkaadql2p3pi6579ax1s0kn1n9pldyb9"; dependencies = [ { name = "log"; @@ -8328,9 +8372,9 @@ rec { }; "rustls-webpki" = rec { crateName = "rustls-webpki"; - version = "0.103.11"; + version = "0.103.12"; edition = "2021"; - sha256 = "1m3wpj1sfnpgwd6692lf42bcjsk6mbl6dwgarkn20jzadx8sz9i0"; + sha256 = "01nxzkfd1l96jzp04svc7iznlkarzx3wb9p63a0i17rc4y2vnyc2"; libName = "webpki"; dependencies = [ { @@ -9498,7 +9542,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; libName = "stackable_certs"; authors = [ @@ -9534,7 +9578,7 @@ rec { } { name = "rand"; - packageId = "rand 0.9.2"; + packageId = "rand 0.9.4"; } { name = "rand_core"; @@ -9706,7 +9750,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; libName = "stackable_operator"; authors = [ @@ -9782,7 +9826,7 @@ rec { } { name = "rand"; - packageId = "rand 0.9.2"; + packageId = "rand 0.9.4"; } { name = "regex"; @@ -9886,7 +9930,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -9921,7 +9965,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; libName = "stackable_shared"; authors = [ @@ -10002,7 +10046,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; libName = "stackable_telemetry"; authors = [ @@ -10112,7 +10156,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; libName = "stackable_versioned"; authors = [ @@ -10156,7 +10200,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -10224,7 +10268,7 @@ rec { src = pkgs.fetchgit { url = "https://github.com/stackabletech/operator-rs.git"; rev = "95490f2d703d20cf1895e5976fdc5fb8f02aa293"; - sha256 = "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2"; + sha256 = "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44"; }; libName = "stackable_webhook"; authors = [ @@ -10283,7 +10327,7 @@ rec { } { name = "rand"; - packageId = "rand 0.9.2"; + packageId = "rand 0.9.4"; } { name = "serde"; @@ -10426,6 +10470,16 @@ rec { }; resolvedDefaultFeatures = [ "i128" ]; }; + "symlink" = rec { + crateName = "symlink"; + version = "0.1.0"; + edition = "2015"; + sha256 = "02h1i0b81mxb4vns4xrvrfibpcvs7jqqav8p3yilwik8cv73r5x7"; + authors = [ + "Chris Morgan " + ]; + + }; "syn 1.0.109" = rec { crateName = "syn"; version = "1.0.109"; @@ -10858,9 +10912,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.51.1"; + version = "1.52.1"; edition = "2021"; - sha256 = "131vl4p3hdn8kpvgv6qv06lspfxj7yvk9avq7r6p4jysbicgjszn"; + sha256 = "1imw1dkkv38p66i33m5hsyk3d6prsbyrayjvqhndjvz89ybywzdn"; authors = [ "Tokio Contributors " ]; @@ -11699,9 +11753,9 @@ rec { }; "tracing-appender" = rec { crateName = "tracing-appender"; - version = "0.2.4"; + version = "0.2.5"; edition = "2018"; - sha256 = "1bxf7xvsr89glbq174cx0b9pinaacbhlmc85y1ssniv2rq5lhvbq"; + sha256 = "0g4a6q5s3wafid5lqw1ljzvh1nhk3a4zmb627fxv96dr7qcqc1h5"; libName = "tracing_appender"; authors = [ "Zeki Sherif " @@ -11712,6 +11766,10 @@ rec { name = "crossbeam-channel"; packageId = "crossbeam-channel"; } + { + name = "symlink"; + packageId = "symlink"; + } { name = "thiserror"; packageId = "thiserror 2.0.18"; @@ -12066,9 +12124,9 @@ rec { }; "typenum" = rec { crateName = "typenum"; - version = "1.19.0"; + version = "1.20.0"; edition = "2018"; - sha256 = "1fw2mpbn2vmqan56j1b3fbpcdg80mz26fm53fs16bq5xcq84hban"; + sha256 = "1pj35y6q11d3y55gdl6g1h2dfhmybjming0jdi9bh0bpnqm11kj0"; authors = [ "Paho Lurie-Gregg " "Andre Bogus " @@ -12300,9 +12358,9 @@ rec { }; "wasip2" = rec { crateName = "wasip2"; - version = "1.0.2+wasi-0.2.9"; + version = "1.0.3+wasi-0.2.9"; edition = "2021"; - sha256 = "1xdw7v08jpfjdg94sp4lbdgzwa587m5ifpz6fpdnkh02kwizj5wm"; + sha256 = "1mi3w855dz99xzjqc4aa8c9q5b6z1y5c963pkk4cvmr6vdr4c1i0"; dependencies = [ { name = "wit-bindgen"; @@ -12320,9 +12378,9 @@ rec { }; "wasm-bindgen" = rec { crateName = "wasm-bindgen"; - version = "0.2.117"; + version = "0.2.118"; edition = "2021"; - sha256 = "1c6hi55mq70546hrvrx7wa27sn3yvf04gg6hf8riwn8mnhdzql85"; + sha256 = "129s5r14fx4v4xrzpx2c6l860nkxpl48j50y7kl6j16bpah3iy8b"; libName = "wasm_bindgen"; authors = [ "The wasm-bindgen Developers" @@ -12371,9 +12429,9 @@ rec { }; "wasm-bindgen-futures" = rec { crateName = "wasm-bindgen-futures"; - version = "0.4.67"; + version = "0.4.68"; edition = "2021"; - sha256 = "0znqqp9z52s4ckb94crjlbqbfd7i8zvnjpx7s3nhcwjvj3k3sqh3"; + sha256 = "1y7bq5d9fk7s9xaayx38bgs9ns35na0kpb5zw19944zvya1x6wgk"; libName = "wasm_bindgen_futures"; authors = [ "The wasm-bindgen Developers" @@ -12400,9 +12458,9 @@ rec { }; "wasm-bindgen-macro" = rec { crateName = "wasm-bindgen-macro"; - version = "0.2.117"; + version = "0.2.118"; edition = "2021"; - sha256 = "1gl6gqy60khhyqv354m0kmgk541sass8kzymxim7hi6zbaizkgbz"; + sha256 = "1v98r8vs17cj8918qsg0xx4nlg4nxk1g0jd4nwnyrh1687w29zzf"; procMacro = true; libName = "wasm_bindgen_macro"; authors = [ @@ -12424,9 +12482,9 @@ rec { }; "wasm-bindgen-macro-support" = rec { crateName = "wasm-bindgen-macro-support"; - version = "0.2.117"; + version = "0.2.118"; edition = "2021"; - sha256 = "1wlza8xdr18cac2wm3ahxdwx1nnqa01m0d3jf3kd9dmsy8z6kafw"; + sha256 = "0169jr0q469hfx5zqxfyywf2h2f4aj17vn4zly02nfwqmxghc24x"; libName = "wasm_bindgen_macro_support"; authors = [ "The wasm-bindgen Developers" @@ -12460,10 +12518,10 @@ rec { }; "wasm-bindgen-shared" = rec { crateName = "wasm-bindgen-shared"; - version = "0.2.117"; + version = "0.2.118"; edition = "2021"; links = "wasm_bindgen"; - sha256 = "0frxrdi1w0cswv8v7n1972hd23nbwm8hr7a2dhdq8bbd59l9l4ir"; + sha256 = "0ag1vvdzi4334jlzilsy14y3nyzwddf1ndn62fyhf6bg62g4vl2z"; libName = "wasm_bindgen_shared"; authors = [ "The wasm-bindgen Developers" @@ -12478,9 +12536,9 @@ rec { }; "web-sys" = rec { crateName = "web-sys"; - version = "0.3.94"; + version = "0.3.95"; edition = "2021"; - sha256 = "02nxnhv349r2gcy8w71cjj6nimww1g2zy20y8r4hhbxi75z04w6d"; + sha256 = "0zfr2jy5bpkkggl88i43yy37p538hg20i56kwn421yj9g6qznbag"; libName = "web_sys"; authors = [ "The wasm-bindgen Developers" @@ -13802,19 +13860,20 @@ rec { }; "wit-bindgen" = rec { crateName = "wit-bindgen"; - version = "0.51.0"; + version = "0.57.1"; edition = "2024"; - sha256 = "19fazgch8sq5cvjv3ynhhfh5d5x08jq2pkw8jfb05vbcyqcr496p"; + sha256 = "0vjk2jb593ri9k1aq4iqs2si9mrw5q46wxnn78im7hm7hx799gqy"; libName = "wit_bindgen"; authors = [ "Alex Crichton " ]; features = { - "async" = [ "std" "wit-bindgen-rust-macro?/async" ]; - "async-spawn" = [ "async" "dep:futures" ]; + "async-spawn" = [ "async" "dep:futures" "std" ]; "bitflags" = [ "dep:bitflags" ]; - "default" = [ "macros" "realloc" "async" "std" "bitflags" ]; + "default" = [ "macros" "realloc" "async" "std" "bitflags" "macro-string" ]; + "futures-stream" = [ "async" "dep:futures" ]; "inter-task-wakeup" = [ "async" ]; + "macro-string" = [ "wit-bindgen-rust-macro?/macro-string" ]; "macros" = [ "dep:wit-bindgen-rust-macro" ]; "rustc-dep-of-std" = [ "dep:core" "dep:alloc" ]; }; diff --git a/Cargo.toml b/Cargo.toml index ec611a56..a337e931 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -31,6 +31,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" } diff --git a/crate-hashes.json b/crate-hashes.json index 33e75762..1f3488f2 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,12 +1,12 @@ { - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#k8s-version@0.1.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-certs@0.4.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-operator-derive@0.3.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-operator@0.110.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-shared@0.1.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-telemetry@0.6.3": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-versioned-macros@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-versioned@0.9.0": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-webhook@0.9.1": "1fgc7i8rhq1nl9m4s69sbfiywy2jx4narpynvm3g54vd5yd4c6m2", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#k8s-version@0.1.3": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-certs@0.4.0": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-operator-derive@0.3.1": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-operator@0.110.0": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-shared@0.1.0": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-telemetry@0.6.3": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-versioned-macros@0.9.0": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-versioned@0.9.0": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", + "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.0#stackable-webhook@0.9.1": "0svjfddsbx72mscsmg1nh581pkdb4ay8nia5gmly0wbfzj7wgq44", "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..598aa95c 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 + credentialsSecretName: 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..598aa95c 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 + credentialsSecretName: 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..c8b1d8ea 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 + credentialsSecretName: 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..4da4d022 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 + credentialsSecretName: 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..f6a0234c 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 + credentialsSecretName: hive-credentials metastore: roleGroups: default: diff --git a/extra/crds.yaml b/extra/crds.yaml index 48c4d76f..27a5ed10 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: + credentialsSecretName: + 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 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: + - credentialsSecretName + - database + - host + type: object + postgresql: + description: Connection settings for a [PostgreSQL](https://www.postgresql.org/) database. + properties: + credentialsSecretName: + 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: + - credentialsSecretName + - 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 07c61508..c65c90ef 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -95,6 +95,8 @@ fn is_heap_jvm_argument(jvm_argument: &str) -> bool { #[cfg(test)] mod tests { + use stackable_operator::utils::yaml_from_str_singleton_map; + use super::*; use crate::crd::HiveRole; @@ -109,10 +111,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 +144,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: @@ -191,7 +189,8 @@ mod tests { fn construct_boilerplate( hive_cluster: &str, ) -> (HiveCluster, MetaStoreConfig, HiveRoleType, String) { - let hive: HiveCluster = serde_yaml::from_str(hive_cluster).expect("illegal test input"); + let hive: HiveCluster = + yaml_from_str_singleton_map(hive_cluster).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 fe2f0d8d..37458acb 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -40,13 +40,14 @@ use stackable_operator::{ }, constants::RESTART_CONTROLLER_ENABLED_LABEL, crd::{listener::v1alpha1::Listener, s3}, + database_connections::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::{ @@ -91,12 +92,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, derby_driver_class}, v1alpha1::{self, HiveMetastoreRoleConfig}, }, discovery::{self}, @@ -330,6 +332,11 @@ pub enum Error { TlsCertSecretClassVolumeBuild { source: stackable_operator::builder::pod::volume::SecretOperatorVolumeSourceBuilderError, }, + + #[snafu(display("invalid metadata database connection"))] + InvalidMetadataDatabaseConnection { + source: stackable_operator::database_connections::Error, + }, } type Result = std::result::Result; @@ -375,6 +382,13 @@ pub async fn reconcile_hive( None }; + let metadata_database_connection_details = hive + .spec + .cluster_config + .metadata_database + .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( @@ -466,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, @@ -477,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(), @@ -596,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, @@ -613,14 +630,41 @@ 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(_) => { + derby_driver_class(&resolved_product_image.product_version) + } + _ => 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_url.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( @@ -760,6 +804,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, @@ -775,13 +820,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)?, @@ -795,6 +834,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 { @@ -867,7 +907,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..4e8d2eef 100644 --- a/rust/operator-binary/src/crd/affinity.rs +++ b/rust/operator-binary/src/crd/affinity.rs @@ -30,6 +30,7 @@ mod tests { api::core::v1::{PodAffinityTerm, PodAntiAffinity, WeightedPodAffinityTerm}, apimachinery::pkg::apis::meta::v1::LabelSelector, }, + utils::yaml_from_str_singleton_map, }; use super::*; @@ -47,16 +48,15 @@ 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 hive: v1alpha1::HiveCluster = + yaml_from_str_singleton_map(input).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..e7760ad0 --- /dev/null +++ b/rust/operator-binary/src/crd/databases.rs @@ -0,0 +1,71 @@ +use std::ops::Deref; + +use serde::{Deserialize, Serialize}; +use stackable_operator::{ + database_connections::{ + 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. We could e.g. create a new struct with + // #[serde(flatten)] of the GenericJdbcDatabaseConnection and an additional field + // `metastoreDbType` (or similar). +} + +impl Deref for MetadataDatabaseConnection { + type Target = dyn JdbcDatabaseConnection; + + fn deref(&self) -> &Self::Target { + match self { + Self::Postgresql(p) => p, + Self::Mysql(m) => m, + Self::Derby(d) => d, + } + } +} + +impl MetadataDatabaseConnection { + /// 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", + } + } +} + +/// (Hive specific) Derby driver class. +/// +/// The driver class changed for Hive 4.2.0 from `org.apache.derby.jdbc.EmbeddedDriver` to +/// `org.apache.derby.iapi.jdbc.AutoloadedDriver`. +pub fn derby_driver_class(product_version: &str) -> &str { + if product_version.starts_with("3.") + || product_version.starts_with("4.0.") + || product_version.starts_with("4.1.") + { + "org.apache.derby.jdbc.EmbeddedDriver" + } else { + "org.apache.derby.iapi.jdbc.AutoloadedDriver" + } +} diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 15fe3868..bd447662 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}; @@ -38,6 +39,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"; @@ -69,12 +71,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); pub type HiveRoleType = Role< @@ -165,7 +161,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). @@ -175,8 +171,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")] @@ -320,10 +317,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 @@ -543,68 +536,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; @@ -627,7 +558,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> { @@ -640,19 +571,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..49ec2332 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 + credentialsSecretName: 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..72bb549e 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 + credentialsSecretName: 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..16e30f49 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 + credentialsSecretName: 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..05ef47b1 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 + credentialsSecretName: 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..1418b147 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 + credentialsSecretName: hive-credentials {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %}