diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f105a717..0f56b77b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -48,7 +48,7 @@ jobs: - name: Check for changed files id: check - uses: stackabletech/actions/detect-changes@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/detect-changes@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: patterns: | - '.github/workflows/build.yaml' @@ -166,7 +166,7 @@ jobs: - name: Build Container Image id: build - uses: stackabletech/actions/build-container-image@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/build-container-image@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: image-name: ${{ env.OPERATOR_NAME }} image-index-manifest-tag: ${{ steps.version.outputs.OPERATOR_VERSION }} @@ -175,7 +175,7 @@ jobs: - name: Publish Container Image if: ${{ !github.event.pull_request.head.repo.fork }} - uses: stackabletech/actions/publish-image@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/publish-image@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: image-registry-uri: oci.stackable.tech image-registry-username: robot$sdp+github-action-build @@ -203,7 +203,7 @@ jobs: persist-credentials: false - name: Publish and Sign Image Index - uses: stackabletech/actions/publish-image-index-manifest@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/publish-image-index-manifest@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: image-registry-uri: oci.stackable.tech image-registry-username: robot$sdp+github-action-build @@ -230,7 +230,7 @@ jobs: submodules: recursive - name: Package, Publish, and Sign Helm Chart - uses: stackabletech/actions/publish-helm-chart@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/publish-helm-chart@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: chart-registry-uri: oci.stackable.tech chart-registry-username: robot$sdp-charts+github-action-build @@ -260,7 +260,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Run OpenShift Preflight Check - uses: stackabletech/actions/run-openshift-preflight@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/run-openshift-preflight@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: image-index-uri: oci.stackable.tech/sdp/${{ env.OPERATOR_NAME }}:${{ needs.build-container-image.outputs.operator-version }} image-architecture: ${{ matrix.arch }} @@ -300,7 +300,7 @@ jobs: persist-credentials: false - name: Send Notification - uses: stackabletech/actions/send-slack-notification@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/send-slack-notification@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: publish-helm-chart-result: ${{ needs.publish-helm-chart.result }} publish-manifests-result: ${{ needs.publish-index-manifest.result }} diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 6ef8c57d..6dfd3bd4 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -41,7 +41,7 @@ jobs: # TODO: Enable the scheduled runs which hard-code what profile to use - name: Run Integration Test id: test - uses: stackabletech/actions/run-integration-test@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/run-integration-test@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: replicated-api-token: ${{ secrets.REPLICATED_API_TOKEN }} test-mode-input: ${{ inputs.test-mode-input }} @@ -51,7 +51,7 @@ jobs: - name: Send Notification if: ${{ failure() || github.run_attempt > 1 }} - uses: stackabletech/actions/send-slack-notification@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + uses: stackabletech/actions/send-slack-notification@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: slack-token: ${{ secrets.SLACK_INTEGRATION_TEST_TOKEN }} failed-tests: ${{ steps.test.outputs.failed-tests }} diff --git a/.github/workflows/pr_pre-commit.yaml b/.github/workflows/pr_pre-commit.yaml index b096292f..9d5ad19e 100644 --- a/.github/workflows/pr_pre-commit.yaml +++ b/.github/workflows/pr_pre-commit.yaml @@ -27,7 +27,7 @@ jobs: persist-credentials: false submodules: recursive fetch-depth: 0 - - uses: stackabletech/actions/run-pre-commit@9848c5593dff4793aacba240116a648c02f20fa4 # v0.13.1 + - uses: stackabletech/actions/run-pre-commit@6a84fcfccf4ee37d85217407bc6a94742afbb45f # v0.14.2 with: python-version: ${{ env.PYTHON_VERSION }} rust: ${{ env.RUST_TOOLCHAIN_VERSION }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 68fbd577..3c9b85c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,11 +11,19 @@ All notable changes to this project will be documented in this file. ### Changed - BREAKING: `configOverrides` now only accepts the supported config file names `runtime.properties`, `jvm.config` and `security.properties`. Previously arbitrary keys were silently accepted but ignored ([#813]). +- BREAKING: Implement generic database connection for metadata storage ([#814]). + The `.clusterConfig.metadataStorageDatabase` has subfields according to the supported db types: `postgresql`, `mysql` and `derby`. +- BREAKING: The `.clusterConfig.metadataStorageDatabase` field has been renamed to `.clusterConfig.metadataDatabase` for consistency ([#814]). - Bump `stackable-operator` to 0.110.1 and `kube` to 3.1.0 ([#813]). - Document Helm deployed RBAC permissions and remove unnecessary permissions ([#810]). +### Deleted + +- Removed all metadata storage related properties from product config ([#814]). + [#810]: https://github.com/stackabletech/druid-operator/pull/810 [#813]: https://github.com/stackabletech/druid-operator/pull/813 +[#814]: https://github.com/stackabletech/druid-operator/pull/814 ## [26.3.0] - 2026-03-16 diff --git a/Cargo.lock b/Cargo.lock index e2587fbc..72bc36f9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -302,9 +302,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.2.60" +version = "1.2.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c5703da9466b66a946814e1adf53ea2c90f10063b86290cc9eb67ce3478a20" +checksum = "d16d90359e986641506914ba71350897565610e87ce0ad9e6f28569db3dd5c6d" dependencies = [ "find-msvc-tools", "jobserver", @@ -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]] @@ -1427,9 +1428,9 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" +checksum = "f00b5dbd620d61dfdcb6007c9c1f6054ebd75319f163d886a9055cec1155073d" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -1442,9 +1443,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.23" +version = "0.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" +checksum = "e000de030ff8022ea1da3f466fbb0f3a809f5e51ed31f6dd931c35181ad8e6d7" dependencies = [ "proc-macro2", "quote", @@ -1539,13 +1540,28 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "darling", "regex", "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" @@ -1665,9 +1681,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.185" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ff2c0fe9bc6cb6b14a0592c2ff4fa9ceb83eea9db979b0487cd054946a2b8f" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libgit2-sys" @@ -1788,7 +1804,7 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand 0.8.5", + "rand 0.8.6", "smallvec", "zeroize", ] @@ -1843,9 +1859,9 @@ checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "openssl" -version = "0.10.77" +version = "0.10.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe4646e360ec77dff7dde40ed3d6c5fee52d156ef4a62f53973d38294dad87f" +checksum = "f38c4372413cdaaf3cc79dd92d29d7d9f5ab09b51b10dded508fb90bb70b9222" dependencies = [ "bitflags", "cfg-if", @@ -1875,9 +1891,9 @@ checksum = "7c87def4c32ab89d880effc9e097653c8da5d6ef28e6b539d313baaacfbafcbe" [[package]] name = "openssl-sys" -version = "0.9.113" +version = "0.9.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad2f2c0eba47118757e4c6d2bff2838f3e0523380021356e7875e858372ce644" +checksum = "13ce1245cd07fcc4cfdb438f7507b0c7e4f3849a69fd84d52374c66d83741bb6" dependencies = [ "cc", "libc", @@ -2158,9 +2174,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", ] @@ -2272,9 +2288,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", @@ -2511,9 +2527,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.38" +version = "0.23.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69f9466fb2c14ea04357e91413efb882e2a6d4a406e625449bc0a5d360d53a21" +checksum = "7c2c118cb077cca2822033836dfb1b975355dfb784b5e8da48f7b6c5db74e60e" dependencies = [ "log", "once_cell", @@ -2547,9 +2563,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.12" +version = "0.103.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8279bb85272c9f10811ae6a6c547ff594d6a7f3c6c6b02ee9726d1d0dcfcdd06" +checksum = "61c429a8649f110dddef65e2a5ad240f747e85f7758a6bccc7e5777bd33f756e" dependencies = [ "ring", "rustls-pki-types", @@ -2934,7 +2950,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "const-oid", "ecdsa", @@ -2984,7 +3000,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.110.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "base64", "clap", @@ -3025,7 +3041,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "darling", "proc-macro2", @@ -3036,7 +3052,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "jiff", "k8s-openapi", @@ -3053,7 +3069,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "axum", "clap", @@ -3077,8 +3093,9 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.9.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ + "kube", "schemars", "serde", "serde_json", @@ -3090,7 +3107,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.9.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "convert_case", "convert_case_extras", @@ -3108,7 +3125,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#96f42571ea185a3cd76fedde351fcabbeefcae16" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#71788ad8e17f0a79ffafa832ad6969e441e0d08d" dependencies = [ "arc-swap", "async-trait", @@ -3170,6 +3187,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" @@ -3325,9 +3348,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.52.0" +version = "1.52.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a91135f59b1cbf38c91e73cf3386fca9bb77915c45ce2771460c9d92f0f3d776" +checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes", "libc", @@ -3520,11 +3543,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", @@ -3617,9 +3641,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" @@ -3717,9 +3741,9 @@ 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", ] @@ -3942,18 +3966,18 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" +checksum = "2ee1708bef14716a11bae175f579062d4554d95be2c6829f518df847b7b3fdd0" dependencies = [ "memchr", ] [[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 7b791636..a06e5836 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -961,9 +961,9 @@ rec { }; "cc" = rec { crateName = "cc"; - version = "1.2.60"; + version = "1.2.61"; edition = "2018"; - sha256 = "084a8ziprdlyrj865f3303qr0b7aaggilkl18slncss6m4yp1ia3"; + sha256 = "0vawvnrrsmi8dygavq3wx085cmlp10sp3fhld5842rlqkqsr0vfi"; authors = [ "Alex Crichton " ]; @@ -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" ]; @@ -4520,9 +4525,9 @@ rec { }; "jiff" = rec { crateName = "jiff"; - version = "0.2.23"; + version = "0.2.24"; edition = "2021"; - sha256 = "0nc37n7jvgrzxdkcgc2hsfdf70lfagigjalh4igjrm5njvf4cd8s"; + sha256 = "0g87al8yqp05m63dhqzi359xgsslc0grqz00nvfdyq8dcayms2zh"; authors = [ "Andrew Gallant " ]; @@ -4602,9 +4607,9 @@ rec { }; "jiff-static" = rec { crateName = "jiff-static"; - version = "0.2.23"; + version = "0.2.24"; edition = "2021"; - sha256 = "192ss3cnixvg79cpa76clwkhn4mmz10vnwsbf7yjw8i484s8p31a"; + sha256 = "1mz6v0d1hd8wjgfzccgda5g9z01s1yxnyiizvahjw0pq1w1xw070"; procMacro = true; libName = "jiff_static"; authors = [ @@ -4889,9 +4894,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; libName = "k8s_version"; authors = [ @@ -4918,6 +4923,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"; @@ -5494,9 +5546,9 @@ rec { }; "libc" = rec { crateName = "libc"; - version = "0.2.185"; + version = "0.2.186"; edition = "2021"; - sha256 = "13rbdaa59l3w92q7kfcxx8zbikm99zzw54h59aqvcv5wx47jrzsj"; + sha256 = "0rnyhzjyqq9x56skkllbjzzzwym3r61lq3l4hqj64v71gw0r3av8"; authors = [ "The Rust Project Developers" ]; @@ -5871,7 +5923,7 @@ rec { } { name = "rand"; - packageId = "rand 0.8.5"; + packageId = "rand 0.8.6"; optional = true; usesDefaultFeatures = false; } @@ -5890,7 +5942,7 @@ rec { devDependencies = [ { name = "rand"; - packageId = "rand 0.8.5"; + packageId = "rand 0.8.6"; features = [ "small_rng" ]; } ]; @@ -6032,9 +6084,9 @@ rec { }; "openssl" = rec { crateName = "openssl"; - version = "0.10.77"; + version = "0.10.78"; edition = "2021"; - sha256 = "0zyqvaa85lvk77sn4jpgav8m5vjzdhyysh6ygpzpviqf6rp69r5z"; + sha256 = "08lj1fvhpfcga3nxs40vnl4spxfrswljvncxqwyazniw85r4737k"; authors = [ "Steven Fackler " ]; @@ -6115,10 +6167,10 @@ rec { }; "openssl-sys" = rec { crateName = "openssl-sys"; - version = "0.9.113"; + version = "0.9.114"; edition = "2021"; links = "openssl"; - sha256 = "0i765hvmis3mg1p3a88070ihaglghgrbzln6wibqf4a7p872qbxd"; + sha256 = "1dhvfj1nvikl4gaq9zb9ka2g7r67n03pb3s3vg7w9z07rm2i5khk"; build = "build/main.rs"; libName = "openssl_sys"; authors = [ @@ -7111,9 +7163,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 = [ { @@ -7124,6 +7176,7 @@ rec { } ]; features = { + "serde" = [ "dep:serde" ]; "std" = [ "alloc" ]; }; resolvedDefaultFeatures = [ "alloc" ]; @@ -7407,11 +7460,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" @@ -7433,12 +7486,9 @@ 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" ]; }; @@ -8342,9 +8392,9 @@ rec { }; "rustls" = rec { crateName = "rustls"; - version = "0.23.38"; + version = "0.23.39"; edition = "2021"; - sha256 = "089ssmhd79f0kd22brh6lkaadql2p3pi6579ax1s0kn1n9pldyb9"; + sha256 = "03p6fkdwbdpp93dfidc4nzgmalwp3gxnv0rk421a5k3pn2612b3w"; dependencies = [ { name = "log"; @@ -8464,9 +8514,9 @@ rec { }; "rustls-webpki" = rec { crateName = "rustls-webpki"; - version = "0.103.12"; + version = "0.103.13"; edition = "2021"; - sha256 = "01nxzkfd1l96jzp04svc7iznlkarzx3wb9p63a0i17rc4y2vnyc2"; + sha256 = "0vkm7z9pnxz5qz66p2kmyy2pwx0g4jnsbqk5xzfhs4czcjl2ki31"; libName = "webpki"; dependencies = [ { @@ -9632,9 +9682,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; libName = "stackable_certs"; authors = [ @@ -9844,9 +9894,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; libName = "stackable_operator"; authors = [ @@ -10024,9 +10074,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -10059,9 +10109,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; libName = "stackable_shared"; authors = [ @@ -10140,9 +10190,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; libName = "stackable_telemetry"; authors = [ @@ -10250,15 +10300,21 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; libName = "stackable_versioned"; authors = [ "Stackable GmbH " ]; dependencies = [ + { + name = "kube"; + packageId = "kube"; + usesDefaultFeatures = false; + features = [ "client" "jsonpatch" "runtime" "derive" "admission" "rustls-tls" "ring" ]; + } { name = "schemars"; packageId = "schemars"; @@ -10294,9 +10350,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -10362,9 +10418,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "96f42571ea185a3cd76fedde351fcabbeefcae16"; - sha256 = "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "71788ad8e17f0a79ffafa832ad6969e441e0d08d"; + sha256 = "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs"; }; libName = "stackable_webhook"; authors = [ @@ -10566,6 +10622,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"; @@ -10998,9 +11064,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.52.0"; + version = "1.52.1"; edition = "2021"; - sha256 = "0xnpygq9578c8rqjgkj5bj8pgfx9zj337kvk3v4kigqwkgska4d9"; + sha256 = "1imw1dkkv38p66i33m5hsyk3d6prsbyrayjvqhndjvz89ybywzdn"; authors = [ "Tokio Contributors " ]; @@ -11839,9 +11905,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 " @@ -11852,6 +11918,10 @@ rec { name = "crossbeam-channel"; packageId = "crossbeam-channel"; } + { + name = "symlink"; + packageId = "symlink"; + } { name = "thiserror"; packageId = "thiserror 2.0.18"; @@ -12206,9 +12276,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 " @@ -12440,9 +12510,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"; @@ -13917,9 +13987,9 @@ rec { }; "winnow" = rec { crateName = "winnow"; - version = "1.0.1"; + version = "1.0.2"; edition = "2021"; - sha256 = "1dbji1bwviy08pl74f2qw2m4w9hc4p3vyl3lfj05jdydy59w1nh9"; + sha256 = "1l7xnfvlgy4da6gq5ip2bgcm8i9d0rwzaxg1p88nlw8lxy5p1q9f"; dependencies = [ { name = "memchr"; @@ -13942,19 +14012,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 dee8f8ca..6bc1c1d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,8 @@ repository = "https://github.com/stackabletech/druid-operator" [workspace.dependencies] product-config = { git = "https://github.com/stackabletech/product-config.git", tag = "0.8.0" } -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "stackable-operator-0.110.1", features = ["crds", "webhook"] } +# We don't want to wait for a 0.111.0 release, so we pick a commit from main +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", rev = "adc92d42cf8f5523588b10086b7073ed9940d061", features = ["crds", "webhook"] } anyhow = "1.0" built = { version = "0.8", features = ["chrono", "git2"] } @@ -34,4 +35,4 @@ tracing = "0.1" [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 = "feat/derby-host-part" } diff --git a/Makefile b/Makefile index 2187f630..738dbdc8 100644 --- a/Makefile +++ b/Makefile @@ -76,3 +76,9 @@ run-dev: check-nix check-kubernetes stop-dev: check-nix check-kubernetes nix run --extra-experimental-features "nix-command flakes" -f. tilt -- down + +helm-install: + helm install \ + --values deploy/helm/${OPERATOR_NAME}/values.yaml \ + --values deploy/helm/${OPERATOR_NAME}/values/$(OCI_REGISTRY_HOSTNAME).yaml \ + ${OPERATOR_NAME} deploy/helm/${OPERATOR_NAME} diff --git a/Tiltfile b/Tiltfile index 53c3a8e4..58c64304 100644 --- a/Tiltfile +++ b/Tiltfile @@ -1,16 +1,19 @@ -# If tilt_options.json exists read it and load the default_registry value from it +# Load the metadata first, so that we immediately get access to the operator name +meta = read_json('nix/meta.json') +operator_name = meta['operator']['name'] + +# If tilt_options.json exists read it and load the default_registry and default_repository value from it settings = read_json('tilt_options.json', default={}) -registry = settings.get('default_registry', 'oci.stackable.tech/sandbox') +registry = settings.get('default_registry', 'oci.stackable.tech') +repository = settings.get('default_repository', registry + '/' + 'sdp') +operator_image_name = repository + '/' + operator_name -# Configure default registry either read from config file above, or with default value of "oci.stackable.tech/sandbox" +# Configure default registry either read from config file above, or with default value of "oci.stackable.tech" default_registry(registry) -meta = read_json('nix/meta.json') -operator_name = meta['operator']['name'] - custom_build( - registry + '/' + operator_name, - 'make regenerate-nix && nix-build . -A docker --argstr dockerName "${EXPECTED_REGISTRY}/' + operator_name + '" && ./result/load-image | docker load', + operator_image_name, + 'make regenerate-nix && nix-build . -A docker --argstr dockerName "' + operator_image_name + '" && ./result/load-image | docker load', deps=['rust', 'Cargo.toml', 'Cargo.lock', 'default.nix', "nix", 'build.rs', 'vendor'], ignore=['*.~undo-tree~'], # ignore=['result*', 'Cargo.nix', 'target', *.yaml], @@ -28,7 +31,7 @@ k8s_kind('DaemonSet', image_json_path='{.spec.template.metadata.annotations.inte # supported by helm(set). helm_values = settings.get('helm_values', None) -helm_override_image_repository = 'image.repository=' + registry + '/' + operator_name +helm_override_image_repository = 'image.repository=' + repository k8s_yaml(helm( 'deploy/helm/' + operator_name, diff --git a/crate-hashes.json b/crate-hashes.json index e19b553d..5f02d593 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.1#k8s-version@0.1.3": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-certs@0.4.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-operator-derive@0.3.1": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-operator@0.110.1": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-shared@0.1.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-telemetry@0.6.3": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-versioned-macros@0.9.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-versioned@0.9.0": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.110.1#stackable-webhook@0.9.1": "0d58yvxvy8hbai12bjhcyvh4zw182j5dsfyqja4k2xc1vzjy29by", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#k8s-version@0.1.3": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-certs@0.4.0": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-operator-derive@0.3.1": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-operator@0.110.1": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-shared@0.1.0": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-telemetry@0.6.3": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-versioned-macros@0.9.0": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-versioned@0.9.0": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", + "git+https://github.com/stackabletech//operator-rs.git?branch=feat%2Fderby-host-part#stackable-webhook@0.9.1": "19rv0g13a529yzk2fc0y3hxznhc2a1r1zfcpl6wx3w3m7cwrnhjs", "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/deny.toml b/deny.toml index 4fa854b9..eb48345d 100644 --- a/deny.toml +++ b/deny.toml @@ -18,9 +18,9 @@ ignore = [ # https://rustsec.org/advisories/RUSTSEC-2023-0071 # "rsa" crate: Marvin Attack: potential key recovery through timing sidechannel # - # No patch is yet available, however work is underway to migrate to a fully constant-time implementation - # So we need to accept this, as of SDP 25.3 we are not using the rsa crate to create certificates used in production - # setups. + # No patch is yet available, however work is underway to migrate to a fully constant-time implementation. + # So we need to accept this, as of SDP 26.3 we are "only" using the crate to create private + + # public key pairs used by webhooks, such as conversion or mutating webhooks. # # https://github.com/RustCrypto/RSA/issues/19 is the tracking issue "RUSTSEC-2023-0071", diff --git a/deploy/config-spec/properties.yaml b/deploy/config-spec/properties.yaml index 5b620e02..e4ede43b 100644 --- a/deploy/config-spec/properties.yaml +++ b/deploy/config-spec/properties.yaml @@ -1,3 +1,4 @@ +--- version: 0.1.0 spec: units: @@ -8,13 +9,15 @@ spec: - "/tmp/xyz" - unit: &unitPort name: "port" - regex: "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$" + regex: "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]\ + |6553[0-5])$" - unit: &unitPrometheusNamespace name: "prometheusNamespace" regex: "^[a-zA-Z_:][a-zA-Z0-9_:]*$" - unit: &unitDuration name: "duration" - regex: "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$" + regex: "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)\ + ?)?$" examples: - "PT300S" @@ -214,7 +217,6 @@ properties: comment: "TTL for host names that cannot be resolved." description: "TTL for host names that cannot be resolved." - - property: &plaintextPort propertyNames: - name: "druid.plaintextPort" @@ -418,139 +420,6 @@ properties: required: true asOfVersion: "0.0.0" - - property: &metadataStorageType - propertyNames: - - name: "druid.metadata.storage.type" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - allowedValues: - - "mysql" - - "postgresql" - - "derby" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageConnectURI - propertyNames: - - name: "druid.metadata.storage.connector.connectURI" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageHost - propertyNames: - - name: "druid.metadata.storage.connector.host" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStoragePort - propertyNames: - - name: "druid.metadata.storage.connector.port" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "integer" - min: "1024" - max: "65535" - unit: *unitPort - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageUser - propertyNames: - - name: "druid.metadata.storage.connector.user" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: false - - name: "coordinator" - required: false - - name: "historical" - required: false - - name: "middlemanager" - required: false - - name: "router" - required: false - asOfVersion: "0.0.0" - - - property: &metadataStoragePassword - propertyNames: - - name: "druid.metadata.storage.connector.password" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: false - - name: "coordinator" - required: false - - name: "historical" - required: false - - name: "middlemanager" - required: false - - name: "router" - required: false - asOfVersion: "0.0.0" - - property: &indexerLogsDirectory propertyNames: - name: "druid.indexer.logs.directory" @@ -661,7 +530,10 @@ properties: type: "string" defaultValues: - fromVersion: "0.0.0" - value: "-server -Xms256m -Xmx256m -XX:MaxDirectMemorySize=300m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager" + value: "-server -Xms256m -Xmx256m -XX:MaxDirectMemorySize=300m + -Duser.timezone=UTC -Dfile.encoding=UTF-8 + -XX:+ExitOnOutOfMemoryError + -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager" roles: - name: "broker" required: false diff --git a/deploy/helm/chart_testing.yaml b/deploy/helm/chart_testing.yaml index 82b39c26..253af46d 100644 --- a/deploy/helm/chart_testing.yaml +++ b/deploy/helm/chart_testing.yaml @@ -1,3 +1,4 @@ +--- remote: origin target-branch: main chart-dirs: diff --git a/deploy/helm/druid-operator/.helmignore b/deploy/helm/druid-operator/.helmignore index fef44b7e..85530816 100644 --- a/deploy/helm/druid-operator/.helmignore +++ b/deploy/helm/druid-operator/.helmignore @@ -6,6 +6,8 @@ # Patterns to ignore when building packages. # This supports shell glob matching, relative path matching, and # negation (prefixed with !). Only one pattern per line. +# Ignore the file itself +.helmignore .DS_Store # Common VCS dirs .git/ @@ -26,3 +28,5 @@ .idea/ *.tmproj .vscode/ +# Partial, unmerged, registry-specific values files +values/ diff --git a/deploy/helm/druid-operator/configs/properties.yaml b/deploy/helm/druid-operator/configs/properties.yaml index 5b620e02..e4ede43b 100644 --- a/deploy/helm/druid-operator/configs/properties.yaml +++ b/deploy/helm/druid-operator/configs/properties.yaml @@ -1,3 +1,4 @@ +--- version: 0.1.0 spec: units: @@ -8,13 +9,15 @@ spec: - "/tmp/xyz" - unit: &unitPort name: "port" - regex: "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$" + regex: "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]\ + |6553[0-5])$" - unit: &unitPrometheusNamespace name: "prometheusNamespace" regex: "^[a-zA-Z_:][a-zA-Z0-9_:]*$" - unit: &unitDuration name: "duration" - regex: "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$" + regex: "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)\ + ?)?$" examples: - "PT300S" @@ -214,7 +217,6 @@ properties: comment: "TTL for host names that cannot be resolved." description: "TTL for host names that cannot be resolved." - - property: &plaintextPort propertyNames: - name: "druid.plaintextPort" @@ -418,139 +420,6 @@ properties: required: true asOfVersion: "0.0.0" - - property: &metadataStorageType - propertyNames: - - name: "druid.metadata.storage.type" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - allowedValues: - - "mysql" - - "postgresql" - - "derby" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageConnectURI - propertyNames: - - name: "druid.metadata.storage.connector.connectURI" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageHost - propertyNames: - - name: "druid.metadata.storage.connector.host" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStoragePort - propertyNames: - - name: "druid.metadata.storage.connector.port" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "integer" - min: "1024" - max: "65535" - unit: *unitPort - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageUser - propertyNames: - - name: "druid.metadata.storage.connector.user" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: false - - name: "coordinator" - required: false - - name: "historical" - required: false - - name: "middlemanager" - required: false - - name: "router" - required: false - asOfVersion: "0.0.0" - - - property: &metadataStoragePassword - propertyNames: - - name: "druid.metadata.storage.connector.password" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: false - - name: "coordinator" - required: false - - name: "historical" - required: false - - name: "middlemanager" - required: false - - name: "router" - required: false - asOfVersion: "0.0.0" - - property: &indexerLogsDirectory propertyNames: - name: "druid.indexer.logs.directory" @@ -661,7 +530,10 @@ properties: type: "string" defaultValues: - fromVersion: "0.0.0" - value: "-server -Xms256m -Xmx256m -XX:MaxDirectMemorySize=300m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager" + value: "-server -Xms256m -Xmx256m -XX:MaxDirectMemorySize=300m + -Duser.timezone=UTC -Dfile.encoding=UTF-8 + -XX:+ExitOnOutOfMemoryError + -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager" roles: - name: "broker" required: false diff --git a/deploy/helm/druid-operator/templates/_helpers.tpl b/deploy/helm/druid-operator/templates/_helpers.tpl index 1096ffc6..9d7b1896 100644 --- a/deploy/helm/druid-operator/templates/_helpers.tpl +++ b/deploy/helm/druid-operator/templates/_helpers.tpl @@ -77,3 +77,10 @@ Labels for Kubernetes objects created by helm test {{- define "operator.testLabels" -}} helm.sh/test: {{ include "operator.chart" . }} {{- end }} + +{{/* +Build the full container image reference. +*/}} +{{- define "operator.image" -}} +{{- printf "%s/%s:%s" .Values.image.repository .Chart.Name (.Values.image.tag | default .Chart.AppVersion) -}} +{{- end }} diff --git a/deploy/helm/druid-operator/templates/deployment.yaml b/deploy/helm/druid-operator/templates/deployment.yaml index 0f4d902e..10c39dfb 100644 --- a/deploy/helm/druid-operator/templates/deployment.yaml +++ b/deploy/helm/druid-operator/templates/deployment.yaml @@ -15,7 +15,7 @@ spec: template: metadata: annotations: - internal.stackable.tech/image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + internal.stackable.tech/image: {{ include "operator.image" . }} checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} {{- with .Values.podAnnotations }} {{- toYaml . | nindent 8 }} @@ -37,7 +37,7 @@ spec: - name: {{ include "operator.appname" . }} securityContext: {{- toYaml .Values.securityContext | nindent 12 }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: {{ include "operator.image" . }} imagePullPolicy: {{ .Values.image.pullPolicy }} resources: {{- toYaml .Values.resources | nindent 12 }} @@ -70,6 +70,10 @@ spec: - name: OPERATOR_SERVICE_NAME value: {{ include "operator.fullname" . }} + # The image repository, like "oci.stackable.tech/sdp" + - name: IMAGE_REPOSITORY + value: {{ .Values.image.repository }} + # Operators need to know the node name they are running on, to e.g. discover the # Kubernetes domain name from the kubelet API. - name: KUBERNETES_NODE_NAME diff --git a/deploy/helm/druid-operator/values.yaml b/deploy/helm/druid-operator/values.yaml index 04cfca36..18db1ac3 100644 --- a/deploy/helm/druid-operator/values.yaml +++ b/deploy/helm/druid-operator/values.yaml @@ -1,7 +1,6 @@ # Default values for druid-operator. --- image: - repository: oci.stackable.tech/sdp/druid-operator pullPolicy: IfNotPresent pullSecrets: [] diff --git a/deploy/helm/druid-operator/values/oci.stackable.tech.yaml b/deploy/helm/druid-operator/values/oci.stackable.tech.yaml new file mode 100644 index 00000000..ac0b0605 --- /dev/null +++ b/deploy/helm/druid-operator/values/oci.stackable.tech.yaml @@ -0,0 +1,4 @@ +--- +# Values overlay for chart packages published to oci.stackable.tech. +image: + repository: oci.stackable.tech/sdp diff --git a/dev-cluster.yml b/dev-cluster.yml index 01279c6f..513d9242 100644 --- a/dev-cluster.yml +++ b/dev-cluster.yml @@ -1,3 +1,4 @@ +--- # # Create a cluster: # @@ -10,13 +11,13 @@ kind: Cluster apiVersion: kind.x-k8s.io/v1alpha4 nodes: -- role: control-plane -- role: worker - kubeadmConfigPatches: - - | - kind: JoinConfiguration - nodeRegistration: - kubeletExtraArgs: - node-labels: "nodeType=druid-data" -- role: worker -- role: worker + - role: control-plane + - role: worker + kubeadmConfigPatches: + - | + kind: JoinConfiguration + nodeRegistration: + kubeletExtraArgs: + node-labels: "nodeType=druid-data" + - role: worker + - role: worker diff --git a/docs/modules/druid/examples/getting_started/druid.yaml b/docs/modules/druid/examples/getting_started/druid.yaml index 7106458b..7da5cf42 100644 --- a/docs/modules/druid/examples/getting_started/druid.yaml +++ b/docs/modules/druid/examples/getting_started/druid.yaml @@ -12,12 +12,11 @@ spec: hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://postgresql-druid/druid - host: postgresql-druid - port: 5432 - credentialsSecret: druid-db-credentials + metadataDatabase: + postgresql: + host: postgresql-druid + database: druid + credentialsSecretName: druid-db-credentials brokers: roleGroups: default: diff --git a/docs/modules/druid/examples/getting_started/druid.yaml.j2 b/docs/modules/druid/examples/getting_started/druid.yaml.j2 index 7106458b..7da5cf42 100644 --- a/docs/modules/druid/examples/getting_started/druid.yaml.j2 +++ b/docs/modules/druid/examples/getting_started/druid.yaml.j2 @@ -12,12 +12,11 @@ spec: hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://postgresql-druid/druid - host: postgresql-druid - port: 5432 - credentialsSecret: druid-db-credentials + metadataDatabase: + postgresql: + host: postgresql-druid + database: druid + credentialsSecretName: druid-db-credentials brokers: roleGroups: default: diff --git a/docs/modules/druid/pages/getting_started/first_steps.adoc b/docs/modules/druid/pages/getting_started/first_steps.adoc index 7a7db01a..f4c8cf7b 100644 --- a/docs/modules/druid/pages/getting_started/first_steps.adoc +++ b/docs/modules/druid/pages/getting_started/first_steps.adoc @@ -76,10 +76,6 @@ include::example$getting_started/getting_started.sh[tag=install-druid] This creates the actual Druid Stacklet. -WARNING: This Druid instance uses Derby (`dbType: derby`) as a metadata store, which is an interal SQL database. -It is not persisted and not suitable for production use! -Consult the https://druid.apache.org/docs/latest/dependencies/metadata-storage.html#available-metadata-stores[Druid documentation] for a list of supported databases and setup instructions for production instances. - == Verify that it works Submit an ingestion job and then query the ingested data -- either through the web interface or the API. diff --git a/extra/crds.yaml b/extra/crds.yaml index 959d6c31..0e61f44f 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -1453,44 +1453,109 @@ spec: type: string type: object type: object - metadataStorageDatabase: + metadataDatabase: description: Druid requires an SQL database to store metadata into. Specify connection information here. + oneOf: + - required: + - postgresql + - required: + - mysql + - required: + - derby properties: - connString: + derby: description: |- - The connect string for the database, for Postgres this could look like: - `jdbc:postgresql://postgresql-druid/druid` - type: string - credentialsSecret: - description: |- - A reference to a Secret containing the database credentials. - The Secret needs to contain the keys `username` and `password`. - nullable: true - type: string - dbType: + 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: |- - The database type. Supported values are: `derby`, `mysql` and `postgres`. - Note that a Derby database created locally in the container is not persisted! - Derby is not suitable for production use. - enum: - - derby - - mysql - - postgresql - type: string - host: - description: The host, i.e. `postgresql-druid`. - type: string - port: - description: The port, i.e. 5432 - format: uint16 - maximum: 65535.0 - minimum: 0.0 - type: integer - required: - - connString - - dbType - - host - - port + 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. + 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 tls: default: @@ -1529,7 +1594,7 @@ spec: type: string required: - deepStorage - - metadataStorageDatabase + - metadataDatabase - zookeeperConfigMapName type: object clusterOperation: diff --git a/rust/operator-binary/src/config/jvm.rs b/rust/operator-binary/src/config/jvm.rs index 86b88be1..90f8ffa0 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -100,12 +100,11 @@ mod tests { hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: simple-druid-znode brokers: roleGroups: @@ -187,12 +186,11 @@ mod tests { hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: simple-druid-znode brokers: roleGroups: diff --git a/rust/operator-binary/src/crd/affinity.rs b/rust/operator-binary/src/crd/affinity.rs index e3d882df..23b61397 100644 --- a/rust/operator-binary/src/crd/affinity.rs +++ b/rust/operator-binary/src/crd/affinity.rs @@ -112,12 +112,11 @@ mod tests { hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: simple-druid-znode brokers: roleGroups: diff --git a/rust/operator-binary/src/crd/authentication.rs b/rust/operator-binary/src/crd/authentication.rs index 1d1f1088..034723e5 100644 --- a/rust/operator-binary/src/crd/authentication.rs +++ b/rust/operator-binary/src/crd/authentication.rs @@ -258,11 +258,8 @@ deepStorage: hdfs: configMapName: druid-hdfs directory: /druid -metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 +metadataDatabase: + derby: {} zookeeperConfigMapName: zk-config-map "#; diff --git a/rust/operator-binary/src/crd/database.rs b/rust/operator-binary/src/crd/database.rs new file mode 100644 index 00000000..91116627 --- /dev/null +++ b/rust/operator-binary/src/crd/database.rs @@ -0,0 +1,119 @@ +use serde::{Deserialize, Serialize}; +use stackable_operator::{ + database_connections::{ + self, TemplatingMechanism, + databases::{ + derby::DerbyConnection, mysql::MysqlConnection, postgresql::PostgresqlConnection, + }, + drivers::jdbc::{JdbcDatabaseConnection, JdbcDatabaseConnectionDetails}, + }, + schemars::{self, JsonSchema}, +}; + +// metadata storage config properties +pub const METADATA_STORAGE_TYPE: &str = "druid.metadata.storage.type"; +pub const METADATA_STORAGE_CONNECTOR_CONNECT_URI: &str = + "druid.metadata.storage.connector.connectURI"; +pub const METADATA_STORAGE_USER: &str = "druid.metadata.storage.connector.user"; +pub const METADATA_STORAGE_PASSWORD: &str = "druid.metadata.storage.connector.password"; + +#[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. + Mysql(MysqlConnection), + + // Docs are on the struct + Derby(DerbyConnection), + // We don't support generic as druid only offers the types mentioned above for metadata storage + // See +} + +impl MetadataDatabaseConnection { + /// Name of the database as it should be passed using `METADATA_STORAGE_TYPE` ("druid.metadata.storage.type") property. + pub fn as_metadata_storage_type(&self) -> &str { + match self { + Self::Postgresql(_) => "postgresql", + Self::Mysql(_) => "mysql", + Self::Derby(_) => "derby", + } + } +} + +impl JdbcDatabaseConnection for MetadataDatabaseConnection { + /// We do *not* implement [`std::ops::Deref`]` for [`MetadataDatabaseConnection`], as we need + /// some special handling for Derby. + fn jdbc_connection_details_with_templating( + &self, + unique_database_name: &str, + templating_mechanism: &TemplatingMechanism, + ) -> Result { + match self { + Self::Postgresql(p) => p.jdbc_connection_details_with_templating( + unique_database_name, + templating_mechanism, + ), + Self::Mysql(m) => m.jdbc_connection_details_with_templating( + unique_database_name, + templating_mechanism, + ), + Self::Derby(d) => { + // According to the [Druid docs](https://druid.apache.org/docs/latest/design/metadata-storage/#derby) + // we should configure something like + // `jdbc:derby://localhost:1527//opt/var/druid_state/derby;create=true` + // instead of the usual `jdbc:derby:/opt/var/druid_state/derby;create=true`. + // + // It looks like Druid always starts Derby at `localhost:1527`, regardless of what we configure here, + // so we can hardcode it here. + d.jdbc_connection_details_for_network_access(unique_database_name, "localhost:1527") + } + } + } +} + +#[cfg(test)] +mod tests { + use rstest::rstest; + use stackable_operator::utils::yaml_from_str_singleton_map; + + use super::*; + + #[rstest] + #[case::postgres( + "postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: druid-postgres-credentials", + "jdbc:postgresql://druid-postgresql:5432/druid" + )] + #[case::derby( + "derby: {}", + "jdbc:derby://localhost:1527//tmp/derby/METADATA/derby.db;create=true" + )] + #[case::derby_custom_location( + "derby: + location: /user/provided.db", + "jdbc:derby://localhost:1527//user/provided.db;create=true" + )] + fn test_connection_url( + #[case] database_connection_yaml: &str, + #[case] expected_connection_url: &str, + ) { + let database_connection: MetadataDatabaseConnection = + yaml_from_str_singleton_map(database_connection_yaml).expect("invalid YAML"); + + let jdbc_connection_details = database_connection + .jdbc_connection_details("METADATA") + .expect("failed to get JDBC connection details"); + assert_eq!( + jdbc_connection_details.connection_url.as_str(), + expected_connection_url + ); + } +} diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 4c202368..a79d3e21 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -46,6 +46,7 @@ use strum::{Display, EnumDiscriminants, EnumIter, EnumString, IntoStaticStr}; use crate::crd::{ affinity::get_affinity, authorization::DruidAuthorization, + database::MetadataDatabaseConnection, resource::RoleResource, tls::{DruidTls, default_druid_tls}, }; @@ -53,6 +54,7 @@ use crate::crd::{ pub mod affinity; pub mod authentication; pub mod authorization; +pub mod database; pub mod memory; pub mod resource; pub mod security; @@ -109,21 +111,12 @@ pub const AUTH_AUTHORIZERS_VALUE: &str = "[\"OpaAuthorizer\"]"; pub const AUTH_AUTHORIZER_OPA_TYPE: &str = "druid.auth.authorizer.OpaAuthorizer.type"; pub const AUTH_AUTHORIZER_OPA_TYPE_VALUE: &str = "opa"; pub const AUTH_AUTHORIZER_OPA_URI: &str = "druid.auth.authorizer.OpaAuthorizer.opaUri"; -// metadata storage config properties -const METADATA_STORAGE_TYPE: &str = "druid.metadata.storage.type"; -const METADATA_STORAGE_URI: &str = "druid.metadata.storage.connector.connectURI"; -const METADATA_STORAGE_HOST: &str = "druid.metadata.storage.connector.host"; -const METADATA_STORAGE_PORT: &str = "druid.metadata.storage.connector.port"; -const METADATA_STORAGE_USER: &str = "druid.metadata.storage.connector.user"; -const METADATA_STORAGE_PASSWORD: &str = "druid.metadata.storage.connector.password"; // indexer properties pub const INDEXER_JAVA_OPTS: &str = "druid.indexer.runner.javaOptsArray"; // historical settings pub const PROCESSING_BUFFER_SIZE_BYTES: &str = "druid.processing.buffer.sizeBytes"; pub const PROCESSING_NUM_MERGE_BUFFERS: &str = "druid.processing.numMergeBuffers"; pub const PROCESSING_NUM_THREADS: &str = "druid.processing.numThreads"; -// extra -pub const CREDENTIALS_SECRET_PROPERTY: &str = "credentialsSecret"; // logs pub const MAX_DRUID_LOG_FILES_SIZE: MemoryQuantity = MemoryQuantity { value: 10.0, @@ -136,10 +129,6 @@ pub const METRICS_PORT: u16 = 9090; pub const COOKIE_PASSPHRASE_ENV: &str = "OIDC_COOKIE_PASSPHRASE"; -// DB credentials - both of these are read from an env var by Druid with the ${env:...} syntax -pub const DB_USERNAME_ENV: &str = "DB_USERNAME_ENV"; -pub const DB_PASSWORD_ENV: &str = "DB_PASSWORD_ENV"; - // Graceful shutdown timeouts const DEFAULT_BROKER_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(5); const DEFAULT_COORDINATOR_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(5); @@ -361,7 +350,7 @@ pub mod versioned { pub ingestion: Option, /// Druid requires an SQL database to store metadata into. Specify connection information here. - pub metadata_storage_database: DatabaseConnectionSpec, + pub metadata_database: MetadataDatabaseConnection, /// TLS encryption settings for Druid, more information in the /// [security documentation](DOCS_BASE_URL_PLACEHOLDER/druid/usage-guide/security). @@ -420,34 +409,6 @@ impl v1alpha1::DruidCluster { match file { JVM_CONFIG => {} RUNTIME_PROPS => { - let mds = &self.spec.cluster_config.metadata_storage_database; - result.insert( - METADATA_STORAGE_TYPE.to_string(), - Some(mds.db_type.to_string()), - ); - result.insert( - METADATA_STORAGE_URI.to_string(), - Some(mds.conn_string.to_string()), - ); - result.insert( - METADATA_STORAGE_HOST.to_string(), - Some(mds.host.to_string()), - ); - result.insert( - METADATA_STORAGE_PORT.to_string(), - Some(mds.port.to_string()), - ); - if mds.credentials_secret.is_some() { - result.insert( - METADATA_STORAGE_USER.to_string(), - Some(format!("${{env:{DB_USERNAME_ENV}}}")), - ); - result.insert( - METADATA_STORAGE_PASSWORD.to_string(), - Some(format!("${{env:{DB_PASSWORD_ENV}}}")), - ); - } - // OPA if let Some(DruidAuthorization { opa: _ }) = &self.spec.cluster_config.authorization { @@ -835,6 +796,79 @@ impl v1alpha1::DruidCluster { } } +#[cfg(test)] +impl stackable_operator::versioned::test_utils::RoundtripTestData for v1alpha1::DruidClusterSpec { + fn roundtrip_test_data() -> Vec { + stackable_operator::utils::yaml_from_str_singleton_map(indoc::indoc! {" + - image: + productVersion: 30.0.0 + pullPolicy: IfNotPresent + clusterOperation: + stopped: false + reconciliationPaused: false + clusterConfig: + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret + deepStorage: + hdfs: + configMapName: simple-hdfs + directory: /druid + ingestion: + s3connection: + inline: + host: s3-de-central.profitbricks.com + credentials: + secretClass: s3-credentials-class + zookeeperConfigMapName: simple-druid-znode + authorization: + opa: + configMapName: test-opa + package: druid + vectorAggregatorConfigMapName: vector-aggregator-discovery + brokers: + config: + gracefulShutdownTimeout: 1s + logging: + enableVectorAgent: true + containers: + druid: + console: + level: INFO + file: + level: INFO + loggers: + ROOT: + level: INFO + configOverrides: + runtime.properties: &runtime-properties + druid.foo: bar + roleGroups: + default: + replicas: 1 + coordinators: + roleGroups: + default: + replicas: 1 + historicals: + roleGroups: + default: + replicas: 1 + middleManagers: + roleGroups: + default: + replicas: 1 + routers: + roleGroups: + default: + replicas: 1 + "}) + .expect("Failed to parse DruidClusterSpec YAML") + } +} + #[derive( Clone, Debug, @@ -1155,43 +1189,6 @@ impl DruidRole { } } -#[derive(Clone, Debug, Default, Deserialize, JsonSchema, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct DatabaseConnectionSpec { - /// The database type. Supported values are: `derby`, `mysql` and `postgres`. - /// Note that a Derby database created locally in the container is not persisted! - /// Derby is not suitable for production use. - pub db_type: DbType, - /// The connect string for the database, for Postgres this could look like: - /// `jdbc:postgresql://postgresql-druid/druid` - pub conn_string: String, - /// The host, i.e. `postgresql-druid`. - pub host: String, - /// The port, i.e. 5432 - pub port: u16, - /// A reference to a Secret containing the database credentials. - /// The Secret needs to contain the keys `username` and `password`. - pub credentials_secret: Option, -} - -#[derive( - Clone, Debug, Default, Deserialize, Eq, JsonSchema, PartialEq, Serialize, Display, EnumString, -)] -pub enum DbType { - #[serde(rename = "derby")] - #[strum(serialize = "derby")] - #[default] - Derby, - - #[serde(rename = "mysql")] - #[strum(serialize = "mysql")] - Mysql, - - #[serde(rename = "postgresql")] - #[strum(serialize = "postgresql")] - Postgresql, -} - #[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Eq, Serialize, Display)] #[serde(rename_all = "camelCase")] pub enum DeepStorageSpec { diff --git a/rust/operator-binary/src/crd/tls.rs b/rust/operator-binary/src/crd/tls.rs index b4fc25b3..c8011b22 100644 --- a/rust/operator-binary/src/crd/tls.rs +++ b/rust/operator-binary/src/crd/tls.rs @@ -40,11 +40,8 @@ deepStorage: hdfs: configMapName: druid-hdfs directory: /druid -metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 +metadataDatabase: + derby: {} zookeeperConfigMapName: zk-config-map "#; diff --git a/rust/operator-binary/src/druid_controller.rs b/rust/operator-binary/src/druid_controller.rs index 819665c2..a53bc816 100644 --- a/rust/operator-binary/src/druid_controller.rs +++ b/rust/operator-binary/src/druid_controller.rs @@ -29,10 +29,10 @@ use stackable_operator::{ opa::OpaApiVersion, product_image_selection::{self, ResolvedProductImage}, rbac::build_rbac_resources, - tls_verification::TlsClientDetailsError, }, constants::RESTART_CONTROLLER_ENABLED_LABEL, crd::s3, + database_connections::drivers::jdbc::JdbcDatabaseConnection as _, k8s_openapi::{ DeepMerge, api::{ @@ -70,19 +70,18 @@ use crate::{ authentication::DruidAuthenticationConfig, config::jvm::construct_jvm_args, crd::{ - APP_NAME, AUTH_AUTHORIZER_OPA_URI, CREDENTIALS_SECRET_PROPERTY, CommonRoleGroupConfig, - Container, DB_PASSWORD_ENV, DB_USERNAME_ENV, DRUID_CONFIG_DIRECTORY, DS_BUCKET, - DeepStorageSpec, DruidClusterStatus, DruidRole, EXTENSIONS_LOADLIST, HDFS_CONFIG_DIRECTORY, - JVM_CONFIG, JVM_SECURITY_PROPERTIES_FILE, LOG_CONFIG_DIRECTORY, MAX_DRUID_LOG_FILES_SIZE, - METRICS_PORT, METRICS_PORT_NAME, OPERATOR_NAME, RUNTIME_PROPS, RW_CONFIG_DIRECTORY, - S3_ACCESS_KEY, S3_ENDPOINT_URL, S3_PATH_STYLE_ACCESS, S3_SECRET_KEY, STACKABLE_LOG_DIR, - ZOOKEEPER_CONNECTION_STRING, authentication::AuthenticationClassesResolved, - authorization::DruidAuthorization, build_recommended_labels, build_string_list, - security::DruidTlsSecurity, v1alpha1, + APP_NAME, AUTH_AUTHORIZER_OPA_URI, CommonRoleGroupConfig, Container, + DRUID_CONFIG_DIRECTORY, DS_BUCKET, DeepStorageSpec, DruidClusterStatus, DruidRole, + EXTENSIONS_LOADLIST, HDFS_CONFIG_DIRECTORY, JVM_CONFIG, JVM_SECURITY_PROPERTIES_FILE, + LOG_CONFIG_DIRECTORY, MAX_DRUID_LOG_FILES_SIZE, METRICS_PORT, METRICS_PORT_NAME, + OPERATOR_NAME, RUNTIME_PROPS, RW_CONFIG_DIRECTORY, S3_ACCESS_KEY, S3_ENDPOINT_URL, + S3_PATH_STYLE_ACCESS, S3_SECRET_KEY, STACKABLE_LOG_DIR, ZOOKEEPER_CONNECTION_STRING, + authentication::AuthenticationClassesResolved, authorization::DruidAuthorization, + build_recommended_labels, build_string_list, security::DruidTlsSecurity, v1alpha1, }, discovery::{self, build_discovery_configmaps}, extensions::get_extension_list, - internal_secret::{create_shared_internal_secret, env_var_from_secret}, + internal_secret::create_shared_internal_secret, listener::{ LISTENER_VOLUME_DIR, LISTENER_VOLUME_NAME, build_group_listener, build_group_listener_pvc, group_listener_name, secret_volume_listener_scope, @@ -114,11 +113,6 @@ pub struct Ctx { #[strum_discriminants(derive(IntoStaticStr))] #[allow(clippy::enum_variant_names)] pub enum Error { - #[snafu(display("failed to apply global Service"))] - ApplyRoleService { - source: stackable_operator::cluster_resources::Error, - }, - #[snafu(display("failed to apply Service for {}", rolegroup))] ApplyRoleGroupService { source: stackable_operator::cluster_resources::Error, @@ -184,9 +178,6 @@ pub enum Error { source: stackable_operator::crd::s3::v1alpha1::ConnectionError, }, - #[snafu(display("failed to configure S3 TLS client details"))] - ConfigureS3TlsClientDetails { source: TlsClientDetailsError }, - #[snafu(display("failed to get deep storage bucket"))] GetDeepStorageBucket { source: stackable_operator::crd::s3::v1alpha1::BucketError, @@ -320,16 +311,6 @@ pub enum Error { source: crate::operations::graceful_shutdown::Error, }, - #[snafu(display("failed to build TLS certificate SecretClass Volume"))] - TlsCertSecretClassVolumeBuild { - source: stackable_operator::builder::pod::volume::SecretOperatorVolumeSourceBuilderError, - }, - - #[snafu(display("failed to build S3 credentials SecretClass Volume"))] - S3CredentialsSecretClassVolumeBuild { - source: stackable_operator::commons::secret_class::SecretClassVolumeError, - }, - #[snafu(display("failed to add OIDC Volumes and VolumeMounts to the Pod and containers"))] AuthVolumesBuild { source: crate::authentication::Error, @@ -384,6 +365,11 @@ pub enum Error { ResolveProductImage { source: product_image_selection::Error, }, + + #[snafu(display("invalid metadata database connection"))] + InvalidMetadataDatabaseConnection { + source: stackable_operator::database_connections::Error, + }, } type Result = std::result::Result; @@ -726,6 +712,12 @@ fn build_rolegroup_config_map( })?; let role = druid.get_role(&druid_role); let mut cm_conf_data = BTreeMap::new(); // filename -> filecontent + let metadata_database_connection_details = druid + .spec + .cluster_config + .metadata_database + .jdbc_connection_details("metadata") + .context(InvalidMetadataDatabaseConnectionSnafu)?; for (property_name_kind, config) in rolegroup_config { let mut conf: BTreeMap> = Default::default(); @@ -764,6 +756,49 @@ fn build_rolegroup_config_map( ); }; + conf.insert( + crate::crd::database::METADATA_STORAGE_TYPE.to_string(), + Some( + druid + .spec + .cluster_config + .metadata_database + .as_metadata_storage_type() + .to_string(), + ), + ); + + conf.insert( + crate::crd::database::METADATA_STORAGE_CONNECTOR_CONNECT_URI.to_string(), + Some( + metadata_database_connection_details + .connection_url + .to_string(), + ), + ); + + if let Some(EnvVar { + name: username_env_name, + .. + }) = &metadata_database_connection_details.username_env + { + conf.insert( + crate::crd::database::METADATA_STORAGE_USER.to_string(), + Some(format!("${{env:{username_env_name}}}",)), + ); + } + + if let Some(EnvVar { + name: password_env_name, + .. + }) = &metadata_database_connection_details.password_env + { + conf.insert( + crate::crd::database::METADATA_STORAGE_PASSWORD.to_string(), + Some(format!("${{env:{password_env_name}}}",)), + ); + } + if let Some(s3) = s3_conn { if !s3.region.is_default_config() { // Raising this as warning instead of returning an error, better safe than sorry. @@ -940,12 +975,13 @@ fn build_rolegroup_statefulset( ) .context(GracefulShutdownSnafu)?; - let credentials_secret = druid + let metadata_database_connection_details = druid .spec .cluster_config - .metadata_storage_database - .credentials_secret - .as_ref(); + .metadata_database + .jdbc_connection_details("metadata") + .context(InvalidMetadataDatabaseConnectionSnafu)?; + let mut main_container_commands = role.main_container_prepare_commands(s3_conn); let mut prepare_container_commands = vec![]; if let Some(ContainerLogConfig { @@ -1030,12 +1066,13 @@ fn build_rolegroup_statefulset( .build(), ); + metadata_database_connection_details.add_to_container(&mut cb_druid); + // rest of env let mut rest_env = rolegroup_config .get(&PropertyNameKind::Env) .iter() .flat_map(|env_vars| env_vars.iter()) - .filter(|(k, _)| k != &&CREDENTIALS_SECRET_PROPERTY.to_string()) .map(|(k, v)| EnvVar { name: k.clone(), value: Some(v.clone()), @@ -1043,21 +1080,6 @@ fn build_rolegroup_statefulset( }) .collect::>(); - // load database credentials to environment variables: these will be used to replace - // the placeholders in runtime.properties so that the operator does not "touch" the secret. - if let Some(credentials_secret_name) = credentials_secret { - rest_env.push(env_var_from_secret( - credentials_secret_name, - Some("username"), - DB_USERNAME_ENV, - )); - rest_env.push(env_var_from_secret( - credentials_secret_name, - Some("password"), - DB_PASSWORD_ENV, - )); - } - if let Some(auth_config) = druid_auth_config { rest_env.extend(auth_config.get_env_var_mounts(druid, role)) } diff --git a/rust/operator-binary/src/extensions.rs b/rust/operator-binary/src/extensions.rs index 209a3948..8b39752f 100644 --- a/rust/operator-binary/src/extensions.rs +++ b/rust/operator-binary/src/extensions.rs @@ -4,7 +4,7 @@ use tracing::debug; use crate::{ authentication::DruidAuthenticationConfig, - crd::{DbType, security::DruidTlsSecurity, v1alpha1}, + crd::{database::MetadataDatabaseConnection, security::DruidTlsSecurity, v1alpha1}, }; const EXT_S3: &str = "druid-s3-extensions"; @@ -33,12 +33,12 @@ pub fn get_extension_list( EXT_HDFS.to_string(), ]); - match druid.spec.cluster_config.metadata_storage_database.db_type { - DbType::Derby => {} // no additional extensions required - DbType::Postgresql => { + match druid.spec.cluster_config.metadata_database { + MetadataDatabaseConnection::Derby(..) => {} // no additional extensions required + MetadataDatabaseConnection::Postgresql(..) => { extensions.insert(EXT_PSQL_MD_ST.to_string()); } - DbType::Mysql => { + MetadataDatabaseConnection::Mysql(..) => { extensions.insert(EXT_MYSQL_MD_ST.to_string()); } }; diff --git a/rust/operator-binary/test/resources/crd/resource_merge/druid_cluster.yaml b/rust/operator-binary/test/resources/crd/resource_merge/druid_cluster.yaml index 8b75a020..b0811a90 100644 --- a/rust/operator-binary/test/resources/crd/resource_merge/druid_cluster.yaml +++ b/rust/operator-binary/test/resources/crd/resource_merge/druid_cluster.yaml @@ -13,12 +13,11 @@ spec: hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: psql-druid-znode brokers: roleGroups: diff --git a/rust/operator-binary/test/resources/crd/resource_merge/segment_cache.yaml b/rust/operator-binary/test/resources/crd/resource_merge/segment_cache.yaml index adc53f2d..bab1a998 100644 --- a/rust/operator-binary/test/resources/crd/resource_merge/segment_cache.yaml +++ b/rust/operator-binary/test/resources/crd/resource_merge/segment_cache.yaml @@ -13,12 +13,11 @@ spec: hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: psql-druid-znode brokers: roleGroups: diff --git a/rust/operator-binary/test/resources/crd/role_service/druid_cluster.yaml b/rust/operator-binary/test/resources/crd/role_service/druid_cluster.yaml index ffb9a6a9..507870c1 100644 --- a/rust/operator-binary/test/resources/crd/role_service/druid_cluster.yaml +++ b/rust/operator-binary/test/resources/crd/role_service/druid_cluster.yaml @@ -13,12 +13,11 @@ spec: hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: psql-druid-znode brokers: roleGroups: diff --git a/rust/operator-binary/test/resources/druid_controller/properties.yaml b/rust/operator-binary/test/resources/druid_controller/properties.yaml index 2fb07f49..e1e167d9 100644 --- a/rust/operator-binary/test/resources/druid_controller/properties.yaml +++ b/rust/operator-binary/test/resources/druid_controller/properties.yaml @@ -9,13 +9,15 @@ spec: - "/tmp/xyz" - unit: &unitPort name: "port" - regex: "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$" + regex: "^([0-9]{1,4}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]\ + |6553[0-5])$" - unit: &unitPrometheusNamespace name: "prometheusNamespace" regex: "^[a-zA-Z_:][a-zA-Z0-9_:]*$" - unit: &unitDuration name: "duration" - regex: "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)?)?$" + regex: "^P(?!$)(\\d+Y)?(\\d+M)?(\\d+W)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+S)\ + ?)?$" examples: - "PT300S" @@ -229,139 +231,6 @@ properties: required: true asOfVersion: "0.0.0" - - property: &metadataStorageType - propertyNames: - - name: "druid.metadata.storage.type" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - allowedValues: - - "mysql" - - "postgresql" - - "derby" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageConnectURI - propertyNames: - - name: "druid.metadata.storage.connector.connectURI" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageHost - propertyNames: - - name: "druid.metadata.storage.connector.host" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStoragePort - propertyNames: - - name: "druid.metadata.storage.connector.port" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "integer" - min: "1024" - max: "65535" - unit: *unitPort - roles: - - name: "broker" - required: true - - name: "coordinator" - required: true - - name: "historical" - required: true - - name: "middlemanager" - required: true - - name: "router" - required: true - asOfVersion: "0.0.0" - - - property: &metadataStorageUser - propertyNames: - - name: "druid.metadata.storage.connector.user" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: false - - name: "coordinator" - required: false - - name: "historical" - required: false - - name: "middlemanager" - required: false - - name: "router" - required: false - asOfVersion: "0.0.0" - - - property: &metadataStoragePassword - propertyNames: - - name: "druid.metadata.storage.connector.password" - kind: - type: "file" - file: "runtime.properties" - datatype: - type: "string" - roles: - - name: "broker" - required: false - - name: "coordinator" - required: false - - name: "historical" - required: false - - name: "middlemanager" - required: false - - name: "router" - required: false - asOfVersion: "0.0.0" - - property: &indexerLogsDirectory propertyNames: - name: "druid.indexer.logs.directory" @@ -472,7 +341,10 @@ properties: type: "string" defaultValues: - fromVersion: "0.0.0" - value: "-server -Xms256m -Xmx256m -XX:MaxDirectMemorySize=300m -Duser.timezone=UTC -Dfile.encoding=UTF-8 -XX:+ExitOnOutOfMemoryError -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager" + value: "-server -Xms256m -Xmx256m -XX:MaxDirectMemorySize=300m + -Duser.timezone=UTC -Dfile.encoding=UTF-8 + -XX:+ExitOnOutOfMemoryError + -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager" roles: - name: "broker" required: false diff --git a/rust/operator-binary/test/resources/druid_controller/segment_cache.yaml b/rust/operator-binary/test/resources/druid_controller/segment_cache.yaml index dde8c761..ddb2811b 100644 --- a/rust/operator-binary/test/resources/druid_controller/segment_cache.yaml +++ b/rust/operator-binary/test/resources/druid_controller/segment_cache.yaml @@ -21,12 +21,11 @@ spec: accessStyle: Path credentials: secretClass: druid-s3-credentials - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: psql-druid-znode brokers: roleGroups: diff --git a/rust/operator-binary/test/resources/druid_controller/simple.yaml b/rust/operator-binary/test/resources/druid_controller/simple.yaml index 672bb2a2..bd4983ac 100644 --- a/rust/operator-binary/test/resources/druid_controller/simple.yaml +++ b/rust/operator-binary/test/resources/druid_controller/simple.yaml @@ -13,12 +13,11 @@ spec: hdfs: configMapName: simple-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: mySecret + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: mySecret zookeeperConfigMapName: psql-druid-znode additionalExtensions: - druid-avro-extensions diff --git a/tests/interu.yaml b/tests/interu.yaml index f1835759..56bafbdd 100644 --- a/tests/interu.yaml +++ b/tests/interu.yaml @@ -1,3 +1,4 @@ +--- runners: amd64: platform: aks-1.32 diff --git a/tests/templates/kuttl/authorizer/04-install-druid.yaml.j2 b/tests/templates/kuttl/authorizer/04-install-druid.yaml.j2 index 3ca3911a..764bd2c5 100644 --- a/tests/templates/kuttl/authorizer/04-install-druid.yaml.j2 +++ b/tests/templates/kuttl/authorizer/04-install-druid.yaml.j2 @@ -27,11 +27,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/cluster-operation/30-install-druid.yaml.j2 b/tests/templates/kuttl/cluster-operation/30-install-druid.yaml.j2 index 96fe77cf..78d0e554 100644 --- a/tests/templates/kuttl/cluster-operation/30-install-druid.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/30-install-druid.yaml.j2 @@ -21,11 +21,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/cluster-operation/40-stop-druid.yaml.j2 b/tests/templates/kuttl/cluster-operation/40-stop-druid.yaml.j2 index 92a03b8c..42beb115 100644 --- a/tests/templates/kuttl/cluster-operation/40-stop-druid.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/40-stop-druid.yaml.j2 @@ -20,11 +20,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/cluster-operation/50-pause-druid.yaml.j2 b/tests/templates/kuttl/cluster-operation/50-pause-druid.yaml.j2 index 420e199c..84b1ead8 100644 --- a/tests/templates/kuttl/cluster-operation/50-pause-druid.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/50-pause-druid.yaml.j2 @@ -20,11 +20,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/cluster-operation/60-restart-druid.yaml.j2 b/tests/templates/kuttl/cluster-operation/60-restart-druid.yaml.j2 index a40b727e..5053c55f 100644 --- a/tests/templates/kuttl/cluster-operation/60-restart-druid.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/60-restart-druid.yaml.j2 @@ -20,11 +20,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/external-access/50_druid.yaml.j2 b/tests/templates/kuttl/external-access/50_druid.yaml.j2 index 904b6001..4f60819a 100644 --- a/tests/templates/kuttl/external-access/50_druid.yaml.j2 +++ b/tests/templates/kuttl/external-access/50_druid.yaml.j2 @@ -13,12 +13,11 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: druid-credentials + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: druid-postgres-credentials deepStorage: hdfs: configMapName: druid-hdfs @@ -77,7 +76,7 @@ spec: apiVersion: v1 kind: Secret metadata: - name: druid-credentials + name: druid-postgres-credentials type: Opaque stringData: username: druid diff --git a/tests/templates/kuttl/hdfs-deep-storage/03-install-druid.yaml.j2 b/tests/templates/kuttl/hdfs-deep-storage/03-install-druid.yaml.j2 index 17842f7b..dcca5636 100644 --- a/tests/templates/kuttl/hdfs-deep-storage/03-install-druid.yaml.j2 +++ b/tests/templates/kuttl/hdfs-deep-storage/03-install-druid.yaml.j2 @@ -23,11 +23,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/ingestion-no-s3-ext/03-install-druid.yaml.j2 b/tests/templates/kuttl/ingestion-no-s3-ext/03-install-druid.yaml.j2 index 32913f02..c71310e7 100644 --- a/tests/templates/kuttl/ingestion-no-s3-ext/03-install-druid.yaml.j2 +++ b/tests/templates/kuttl/ingestion-no-s3-ext/03-install-druid.yaml.j2 @@ -23,11 +23,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/ingestion-s3-ext/03-install-druid.yaml.j2 b/tests/templates/kuttl/ingestion-s3-ext/03-install-druid.yaml.j2 index 048c34f1..e12bed4e 100644 --- a/tests/templates/kuttl/ingestion-s3-ext/03-install-druid.yaml.j2 +++ b/tests/templates/kuttl/ingestion-s3-ext/03-install-druid.yaml.j2 @@ -29,11 +29,8 @@ spec: host: s3-de-central.profitbricks.com credentials: secretClass: s3-credentials-class - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/ldap/13-install-druid.yaml.j2 b/tests/templates/kuttl/ldap/13-install-druid.yaml.j2 index f172afd4..3d0532ec 100644 --- a/tests/templates/kuttl/ldap/13-install-druid.yaml.j2 +++ b/tests/templates/kuttl/ldap/13-install-druid.yaml.j2 @@ -27,11 +27,8 @@ commands: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} zookeeperConfigMapName: druid-znode {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery diff --git a/tests/templates/kuttl/logging/05-install-druid.yaml.j2 b/tests/templates/kuttl/logging/05-install-druid.yaml.j2 index 859c1e98..38a2fc1f 100644 --- a/tests/templates/kuttl/logging/05-install-druid.yaml.j2 +++ b/tests/templates/kuttl/logging/05-install-druid.yaml.j2 @@ -40,11 +40,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} vectorAggregatorConfigMapName: druid-vector-aggregator-discovery zookeeperConfigMapName: druid-znode brokers: diff --git a/tests/templates/kuttl/oidc/40_druid.yaml.j2 b/tests/templates/kuttl/oidc/40_druid.yaml.j2 index f7ebabe5..2b85a0ee 100644 --- a/tests/templates/kuttl/oidc/40_druid.yaml.j2 +++ b/tests/templates/kuttl/oidc/40_druid.yaml.j2 @@ -58,11 +58,8 @@ spec: secretClass: minio-tls-certificates {% endif %} baseKey: deep-storage - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/orphaned-resources/03-install-druid.yaml.j2 b/tests/templates/kuttl/orphaned-resources/03-install-druid.yaml.j2 index 32913f02..c71310e7 100644 --- a/tests/templates/kuttl/orphaned-resources/03-install-druid.yaml.j2 +++ b/tests/templates/kuttl/orphaned-resources/03-install-druid.yaml.j2 @@ -23,11 +23,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/orphaned-resources/04-update-druid.yaml.j2 b/tests/templates/kuttl/orphaned-resources/04-update-druid.yaml.j2 index f7753cd8..39a7aea0 100644 --- a/tests/templates/kuttl/orphaned-resources/04-update-druid.yaml.j2 +++ b/tests/templates/kuttl/orphaned-resources/04-update-druid.yaml.j2 @@ -23,11 +23,8 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/overrides/20-install-druid.yaml.j2 b/tests/templates/kuttl/overrides/20-install-druid.yaml.j2 index 8f6e45c3..28a76f9d 100644 --- a/tests/templates/kuttl/overrides/20-install-druid.yaml.j2 +++ b/tests/templates/kuttl/overrides/20-install-druid.yaml.j2 @@ -17,11 +17,8 @@ spec: hdfs: configMapName: hdfs directory: /data - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} tls: null zookeeperConfigMapName: druid-znode brokers: diff --git a/tests/templates/kuttl/resources/30-install-druid.yaml.j2 b/tests/templates/kuttl/resources/30-install-druid.yaml.j2 index 9a6d7778..0537a2b5 100644 --- a/tests/templates/kuttl/resources/30-install-druid.yaml.j2 +++ b/tests/templates/kuttl/resources/30-install-druid.yaml.j2 @@ -27,11 +27,8 @@ spec: host: minio-druid port: 9000 accessStyle: Path - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/s3-deep-storage/10-install-druid.yaml.j2 b/tests/templates/kuttl/s3-deep-storage/10-install-druid.yaml.j2 index e2399ddc..00cc99b4 100644 --- a/tests/templates/kuttl/s3-deep-storage/10-install-druid.yaml.j2 +++ b/tests/templates/kuttl/s3-deep-storage/10-install-druid.yaml.j2 @@ -59,11 +59,8 @@ spec: secretClass: minio-tls-certificates {% endif %} baseKey: deep-storage - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/smoke/50-install-druid.yaml.j2 b/tests/templates/kuttl/smoke/50-install-druid.yaml.j2 index 73f2c4bd..cca0433c 100644 --- a/tests/templates/kuttl/smoke/50-install-druid.yaml.j2 +++ b/tests/templates/kuttl/smoke/50-install-druid.yaml.j2 @@ -23,12 +23,11 @@ spec: hdfs: configMapName: druid-hdfs directory: /druid - metadataStorageDatabase: - dbType: postgresql - connString: jdbc:postgresql://druid-postgresql/druid - host: druid-postgresql - port: 5432 - credentialsSecret: druid-credentials + metadataDatabase: + postgresql: + host: druid-postgresql + database: druid + credentialsSecretName: druid-postgres-credentials {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} @@ -77,7 +76,7 @@ spec: apiVersion: v1 kind: Secret metadata: - name: druid-credentials + name: druid-postgres-credentials type: Opaque stringData: username: druid diff --git a/tests/templates/kuttl/tls/04-install-druid.yaml.j2 b/tests/templates/kuttl/tls/04-install-druid.yaml.j2 index 5f0e68a7..d754c1d7 100644 --- a/tests/templates/kuttl/tls/04-install-druid.yaml.j2 +++ b/tests/templates/kuttl/tls/04-install-druid.yaml.j2 @@ -83,11 +83,8 @@ spec: caCert: secretClass: minio-tls-certificates baseKey: deep-storage - metadataStorageDatabase: - dbType: derby - connString: jdbc:derby://localhost:1527/var/druid/metadata.db;create=true - host: localhost - port: 1527 + metadataDatabase: + derby: {} {% if test_scenario['values']['tls-mode'] == 'internal-and-server-tls' or test_scenario['values']['tls-mode'] == 'internal-and-server-tls-and-tls-client-auth' %} tls: serverAndInternalSecretClass: druid-tls