From b2f5e8b6301ef842c57a1d53856ee090660f88d8 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Thu, 12 Feb 2026 16:49:40 +0100 Subject: [PATCH 01/14] WIP --- Cargo.lock | 14 +- Cargo.nix | 42 +++--- Cargo.toml | 7 +- crate-hashes.json | 14 +- deploy/config-spec/properties.yaml | 56 -------- .../hive-operator/configs/properties.yaml | 56 -------- deploy/helm/hive-operator/crds/crds.yaml | 116 +++++++++++----- .../getting_started/hive-postgres-s3.yaml | 9 +- .../getting_started/hive-postgres-s3.yaml.j2 | 9 +- .../hive/pages/reference/discovery.adoc | 9 +- .../pages/usage-guide/database-driver.adoc | 11 +- rust/operator-binary/src/command.rs | 14 +- rust/operator-binary/src/controller.rs | 84 +++++++++--- rust/operator-binary/src/crd/mod.rs | 125 ++++++------------ .../kuttl/smoke/60-install-hive.yaml.j2 | 9 +- 15 files changed, 260 insertions(+), 315 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7e90b125..9ad7098e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1372,7 +1372,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#69fbb2a0bc5329a8a3bf1904944474d3f3e13f64" dependencies = [ "darling 0.23.0", "regex", @@ -2511,7 +2511,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.105.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#69fbb2a0bc5329a8a3bf1904944474d3f3e13f64" dependencies = [ "chrono", "clap", @@ -2549,7 +2549,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#69fbb2a0bc5329a8a3bf1904944474d3f3e13f64" dependencies = [ "darling 0.23.0", "proc-macro2", @@ -2560,7 +2560,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.0.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#69fbb2a0bc5329a8a3bf1904944474d3f3e13f64" dependencies = [ "chrono", "k8s-openapi", @@ -2577,7 +2577,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#69fbb2a0bc5329a8a3bf1904944474d3f3e13f64" dependencies = [ "axum", "clap", @@ -2601,7 +2601,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#69fbb2a0bc5329a8a3bf1904944474d3f3e13f64" dependencies = [ "schemars", "serde", @@ -2614,7 +2614,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#69fbb2a0bc5329a8a3bf1904944474d3f3e13f64" dependencies = [ "convert_case", "darling 0.23.0", diff --git a/Cargo.nix b/Cargo.nix index acc14aeb..422b0aea 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4274,9 +4274,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; - sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "69fbb2a0bc5329a8a3bf1904944474d3f3e13f64"; + sha256 = "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry"; }; libName = "k8s_version"; authors = [ @@ -8201,9 +8201,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; - sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "69fbb2a0bc5329a8a3bf1904944474d3f3e13f64"; + sha256 = "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry"; }; libName = "stackable_operator"; authors = [ @@ -8370,9 +8370,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; - sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "69fbb2a0bc5329a8a3bf1904944474d3f3e13f64"; + sha256 = "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -8405,9 +8405,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; - sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "69fbb2a0bc5329a8a3bf1904944474d3f3e13f64"; + sha256 = "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry"; }; libName = "stackable_shared"; authors = [ @@ -8487,9 +8487,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; - sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "69fbb2a0bc5329a8a3bf1904944474d3f3e13f64"; + sha256 = "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry"; }; libName = "stackable_telemetry"; authors = [ @@ -8597,9 +8597,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; - sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "69fbb2a0bc5329a8a3bf1904944474d3f3e13f64"; + sha256 = "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry"; }; libName = "stackable_versioned"; authors = [ @@ -8641,9 +8641,9 @@ rec { edition = "2024"; workspace_member = null; src = pkgs.fetchgit { - url = "https://github.com/stackabletech/operator-rs.git"; - rev = "7bfcac5f6515c8b4c8cf8def2edfde5ed8621aaa"; - sha256 = "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd"; + url = "https://github.com/stackabletech//operator-rs.git"; + rev = "69fbb2a0bc5329a8a3bf1904944474d3f3e13f64"; + sha256 = "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry"; }; procMacro = true; libName = "stackable_versioned_macros"; diff --git a/Cargo.toml b/Cargo.toml index ad772177..9dc5502a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,9 +33,6 @@ strum = { version = "0.27", features = ["derive"] } tokio = { version = "1.40", features = ["full"] } tracing = "0.1" -# [patch."https://github.com/stackabletech/operator-rs.git"] +[patch."https://github.com/stackabletech/operator-rs.git"] # stackable-operator = { path = "../operator-rs/crates/stackable-operator" } -# stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "main" } - -[patch.crates-io] -kube = { git = "https://github.com/stackabletech/kube-rs", branch = "2.0.1-fix-schema-hoisting" } +stackable-operator = { git = "https://github.com/stackabletech//operator-rs.git", branch = "spike/generic-databases" } diff --git a/crate-hashes.json b/crate-hashes.json index c7bba396..07f40d03 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -1,15 +1,15 @@ { + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#k8s-version@0.1.3": "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator-derive@0.3.1": "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator@0.105.0": "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-shared@0.0.3": "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-telemetry@0.6.1": "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned-macros@0.8.3": "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned@0.8.3": "0m3d02fsc7z2mvr0rvlv0n30wi8jcv2m00fd82s23jnk3jpmkfry", "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-client@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-core@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-derive@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube-runtime@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", "git+https://github.com/stackabletech/kube-rs?branch=2.0.1-fix-schema-hoisting#kube@2.0.1": "1a7bcl0w1jg71jc4iml0vjp8dpzy71mhxl012grxcy2xp5i6xvgf", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#k8s-version@0.1.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-operator-derive@0.3.1": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-operator@0.105.0": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-shared@0.0.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-telemetry@0.6.1": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-versioned-macros@0.8.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", - "git+https://github.com/stackabletech/operator-rs.git?tag=stackable-operator-0.105.0#stackable-versioned@0.8.3": "02z7c2kjhcwg153j74n52wwcr5x0z70hc21hlsrxyclmc8ps1lmd", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file diff --git a/deploy/config-spec/properties.yaml b/deploy/config-spec/properties.yaml index 78b63887..4ba37d15 100644 --- a/deploy/config-spec/properties.yaml +++ b/deploy/config-spec/properties.yaml @@ -58,62 +58,6 @@ properties: comment: "TTL for domain names that cannot be resolved." description: "TTL for domain names that cannot be resolved." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionURL" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - # unit: *unitUri - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - description: "JDBC connect string for a JDBC metastore. - To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL. - For example, jdbc:postgresql://myhost/db?ssl=true for postgres database." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionDriverName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - unit: *unitClassName - roles: - - name: "metastore" - # This property *is* required even though it is set to `false` here. - # The required value changed in Derby in version 4.2.0. - # We now set this value depending on the Hive version (and its corresponding Derby version) and add it to the ConfigMap programatically. - required: false - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionUserName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionPassword" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - property: propertyNames: - name: "hive.metastore.port" diff --git a/deploy/helm/hive-operator/configs/properties.yaml b/deploy/helm/hive-operator/configs/properties.yaml index 78b63887..4ba37d15 100644 --- a/deploy/helm/hive-operator/configs/properties.yaml +++ b/deploy/helm/hive-operator/configs/properties.yaml @@ -58,62 +58,6 @@ properties: comment: "TTL for domain names that cannot be resolved." description: "TTL for domain names that cannot be resolved." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionURL" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - # unit: *unitUri - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - description: "JDBC connect string for a JDBC metastore. - To use SSL to encrypt/authenticate the connection, provide database-specific SSL flag in the connection URL. - For example, jdbc:postgresql://myhost/db?ssl=true for postgres database." - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionDriverName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - unit: *unitClassName - roles: - - name: "metastore" - # This property *is* required even though it is set to `false` here. - # The required value changed in Derby in version 4.2.0. - # We now set this value depending on the Hive version (and its corresponding Derby version) and add it to the ConfigMap programatically. - required: false - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionUserName" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - - property: - propertyNames: - - name: "javax.jdo.option.ConnectionPassword" - kind: - type: "file" - file: "hive-site.xml" - datatype: - type: "string" - roles: - - name: "metastore" - required: true - asOfVersion: "0.0.0" - property: propertyNames: - name: "hive.metastore.port" diff --git a/deploy/helm/hive-operator/crds/crds.yaml b/deploy/helm/hive-operator/crds/crds.yaml index ece12c91..0800fff9 100644 --- a/deploy/helm/hive-operator/crds/crds.yaml +++ b/deploy/helm/hive-operator/crds/crds.yaml @@ -76,36 +76,6 @@ spec: - configMapName type: object type: object - database: - description: Database connection specification for the metadata database. - properties: - connString: - description: |- - A connection string for the database. For example: - `jdbc:postgresql://hivehdfs-postgresql:5432/hivehdfs` - type: string - credentialsSecret: - description: |- - A reference to a Secret containing the database credentials. - The Secret needs to contain the keys `username` and `password`. - type: string - dbType: - description: |- - The type of database to connect to. Supported are: - `postgres`, `mysql`, `oracle`, `mssql` and `derby`. - This value is used to configure the jdbc driver class. - enum: - - derby - - mysql - - postgres - - oracle - - mssql - type: string - required: - - connString - - credentialsSecret - - dbType - type: object hdfs: description: HDFS connection specification. nullable: true @@ -120,6 +90,90 @@ spec: required: - configMap type: object + metadataDatabase: + description: TODO docs + oneOf: + - required: + - postgresql + - required: + - mysql + - required: + - derby + properties: + derby: + description: TODO docs + properties: + location: + description: TODO docs, especially on default + nullable: true + type: string + type: object + mysql: + description: |- + TODO docs + + Please note that - due to license issues - we don't ship the mysql driver, you need to add + it it yourself. + See for details. + properties: + credentialsSecret: + description: TODO docs + type: string + database: + description: TODO docs + type: string + host: + description: TODO docs + type: string + parameters: + additionalProperties: + type: string + default: {} + description: TODO docs + type: object + port: + default: 3306 + description: TODO docs + format: uint16 + maximum: 65535.0 + minimum: 0.0 + type: integer + required: + - credentialsSecret + - database + - host + type: object + postgresql: + description: TODO docs + properties: + credentialsSecret: + description: TODO docs + type: string + database: + description: TODO docs + type: string + host: + description: TODO docs + type: string + parameters: + additionalProperties: + type: string + default: {} + description: TODO docs + type: object + port: + default: 5432 + description: TODO docs + format: uint16 + maximum: 65535.0 + minimum: 0.0 + type: integer + required: + - credentialsSecret + - database + - host + type: object + type: object s3: description: |- S3 connection specification. This can be either `inline` or a `reference` to an @@ -280,7 +334,7 @@ spec: nullable: true type: string required: - - database + - metadataDatabase type: object clusterOperation: default: diff --git a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml index 48ad049c..d71c4fe8 100644 --- a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml +++ b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml @@ -7,10 +7,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio metastore: diff --git a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 index 48ad049c..d71c4fe8 100644 --- a/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 +++ b/docs/modules/hive/examples/getting_started/hive-postgres-s3.yaml.j2 @@ -7,10 +7,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio metastore: diff --git a/docs/modules/hive/pages/reference/discovery.adoc b/docs/modules/hive/pages/reference/discovery.adoc index bed75059..213e07d1 100644 --- a/docs/modules/hive/pages/reference/discovery.adoc +++ b/docs/modules/hive/pages/reference/discovery.adoc @@ -23,10 +23,11 @@ metadata: namespace: {namespace} # <2> spec: clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials metastore: roleGroups: default: # <3> diff --git a/docs/modules/hive/pages/usage-guide/database-driver.adoc b/docs/modules/hive/pages/usage-guide/database-driver.adoc index 18a26cc8..1dbc22ea 100644 --- a/docs/modules/hive/pages/usage-guide/database-driver.adoc +++ b/docs/modules/hive/pages/usage-guide/database-driver.adoc @@ -149,10 +149,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:mysql://mysql:3306/hive # <1> - credentialsSecret: hive-credentials # <2> - dbType: mysql + metadataDatabase: + mysql: + host: mysql + database: hive + credentialsSecret: hive-credentials s3: reference: minio # <3> metastore: @@ -224,7 +225,7 @@ spec: custom: oci.stackable.tech/sdp/hive:4.2.0-stackable0.0.0-dev-mysql # <1> productVersion: 4.2.0 clusterConfig: - database: + metadataDatabase: ... s3: ... diff --git a/rust/operator-binary/src/command.rs b/rust/operator-binary/src/command.rs index ee08f56d..0ce91957 100644 --- a/rust/operator-binary/src/command.rs +++ b/rust/operator-binary/src/command.rs @@ -3,10 +3,9 @@ use stackable_operator::crd::s3; use crate::{ config::opa::HiveOpaConfig, crd::{ - DB_PASSWORD_ENV, DB_PASSWORD_PLACEHOLDER, DB_USERNAME_ENV, DB_USERNAME_PLACEHOLDER, - HIVE_METASTORE_LOG4J2_PROPERTIES, HIVE_SITE_XML, STACKABLE_CONFIG_DIR, - STACKABLE_CONFIG_MOUNT_DIR, STACKABLE_LOG_CONFIG_MOUNT_DIR, STACKABLE_TRUST_STORE, - STACKABLE_TRUST_STORE_PASSWORD, v1alpha1, + HIVE_METASTORE_LOG4J2_PROPERTIES, STACKABLE_CONFIG_DIR, STACKABLE_CONFIG_MOUNT_DIR, + STACKABLE_LOG_CONFIG_MOUNT_DIR, STACKABLE_TRUST_STORE, STACKABLE_TRUST_STORE_PASSWORD, + v1alpha1, }, }; @@ -63,13 +62,6 @@ pub fn build_container_command_args( } } - // db credentials - args.extend([ - format!("echo replacing {DB_USERNAME_PLACEHOLDER} and {DB_PASSWORD_PLACEHOLDER} with secret values."), - format!("sed -i \"s|{DB_USERNAME_PLACEHOLDER}|${DB_USERNAME_ENV}|g\" {STACKABLE_CONFIG_DIR}/{HIVE_SITE_XML}"), - format!("sed -i \"s|{DB_PASSWORD_PLACEHOLDER}|${DB_PASSWORD_ENV}|g\" {STACKABLE_CONFIG_DIR}/{HIVE_SITE_XML}"), - ]); - // metastore start command args.push(start_command); diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 036f2798..578e2603 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -38,14 +38,16 @@ use stackable_operator::{ rbac::build_rbac_resources, }, constants::RESTART_CONTROLLER_ENABLED_LABEL, - crd::{listener::v1alpha1::Listener, s3}, + crd::{ + database::drivers::jdbc::JDBCDatabaseConnectionDetails, listener::v1alpha1::Listener, s3, + }, k8s_openapi::{ DeepMerge, api::{ apps::v1::{StatefulSet, StatefulSetSpec}, core::v1::{ - ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, Probe, TCPSocketAction, - Volume, + ConfigMap, ConfigMapVolumeSource, EmptyDirVolumeSource, EnvVar, Probe, + TCPSocketAction, Volume, }, }, apimachinery::pkg::{ @@ -90,9 +92,9 @@ use crate::{ opa::{HiveOpaConfig, OPA_TLS_VOLUME_NAME}, }, crd::{ - APP_NAME, CORE_SITE_XML, Container, DB_PASSWORD_ENV, DB_USERNAME_ENV, HIVE_PORT, - HIVE_PORT_NAME, HIVE_SITE_XML, HiveClusterStatus, HiveRole, JVM_SECURITY_PROPERTIES_FILE, - METRICS_PORT, METRICS_PORT_NAME, MetaStoreConfig, STACKABLE_CONFIG_DIR, + APP_NAME, CORE_SITE_XML, Container, HIVE_PORT, HIVE_PORT_NAME, HIVE_SITE_XML, + HiveClusterStatus, HiveRole, JVM_SECURITY_PROPERTIES_FILE, METRICS_PORT, METRICS_PORT_NAME, + MetaStoreConfig, MetadataDatabaseConnection, STACKABLE_CONFIG_DIR, STACKABLE_CONFIG_DIR_NAME, STACKABLE_CONFIG_MOUNT_DIR, STACKABLE_CONFIG_MOUNT_DIR_NAME, STACKABLE_LOG_CONFIG_MOUNT_DIR, STACKABLE_LOG_CONFIG_MOUNT_DIR_NAME, STACKABLE_LOG_DIR, STACKABLE_LOG_DIR_NAME, @@ -329,6 +331,11 @@ pub enum Error { TlsCertSecretClassVolumeBuild { source: stackable_operator::builder::pod::volume::SecretOperatorVolumeSourceBuilderError, }, + + #[snafu(display("invalid metadata database connection"))] + InvalidMetadataDatabaseConnection { + source: stackable_operator::crd::database::Error, + }, } type Result = std::result::Result; @@ -374,6 +381,14 @@ pub async fn reconcile_hive( None }; + let metadata_database_connection_details = hive + .spec + .cluster_config + .metadata_database + .as_jdbc_database_connection() + .jdbc_connection_details("METADATA") + .context(InvalidMetadataDatabaseConnectionSnafu)?; + let validated_config = validate_all_roles_and_groups_config( &resolved_product_image.product_version, &transform_all_roles_to_config( @@ -465,6 +480,7 @@ pub async fn reconcile_hive( &resolved_product_image, &rolegroup, rolegroup_config, + &metadata_database_connection_details, s3_connection_spec.as_ref(), &config, &client.kubernetes_cluster_info, @@ -476,6 +492,7 @@ pub async fn reconcile_hive( &resolved_product_image, &rolegroup, rolegroup_config, + &metadata_database_connection_details, s3_connection_spec.as_ref(), &config, &rbac_sa.name_any(), @@ -595,6 +612,7 @@ fn build_metastore_rolegroup_config_map( resolved_product_image: &ResolvedProductImage, rolegroup: &RoleGroupRef, role_group_config: &HashMap>, + database_connection_details: &JDBCDatabaseConnectionDetails, s3_connection_spec: Option<&s3::v1alpha1::ConnectionSpec>, merged_config: &MetaStoreConfig, cluster_info: &KubernetesClusterInfo, @@ -612,14 +630,48 @@ fn build_metastore_rolegroup_config_map( Some("/stackable/warehouse".to_string()), ); + // The Derby driver class needs some special handling + let driver = match &hive.spec.cluster_config.metadata_database { + MetadataDatabaseConnection::Derby(_) => { + // The driver class changed for hive 4.2.0 + if ["3.1.3", "4.0.0", "4.0.1", "4.1.0"] + .contains(&resolved_product_image.product_version.as_str()) + { + "org.apache.derby.jdbc.EmbeddedDriver" + } else { + "org.apache.derby.iapi.jdbc.AutoloadedDriver" + } + } + _ => database_connection_details.driver.as_str(), + }; data.insert( MetaStoreConfig::CONNECTION_DRIVER_NAME.to_string(), - Some( - hive.db_type() - .get_jdbc_driver_class(&resolved_product_image.product_version) - .to_string(), - ), + Some(driver.to_owned()), + ); + data.insert( + MetaStoreConfig::CONNECTION_URL.to_string(), + Some(database_connection_details.connection_uri.to_string()), ); + if let Some(EnvVar { + name: username_env_name, + .. + }) = &database_connection_details.username_env + { + data.insert( + MetaStoreConfig::CONNECTION_USER_NAME.to_string(), + Some(format!("${{env:{username_env_name}}}",)), + ); + } + if let Some(EnvVar { + name: password_env_name, + .. + }) = &database_connection_details.password_env + { + data.insert( + MetaStoreConfig::CONNECTION_PASSWORD.to_string(), + Some(format!("${{env:{password_env_name}}}",)), + ); + } if let Some(s3) = s3_connection_spec { data.insert( @@ -759,6 +811,7 @@ fn build_metastore_rolegroup_statefulset( resolved_product_image: &ResolvedProductImage, rolegroup_ref: &RoleGroupRef, metastore_config: &HashMap>, + database_connection_details: &JDBCDatabaseConnectionDetails, s3_connection: Option<&s3::v1alpha1::ConnectionSpec>, merged_config: &MetaStoreConfig, sa_name: &str, @@ -774,13 +827,7 @@ fn build_metastore_rolegroup_statefulset( name: APP_NAME.to_string(), })?; - let credentials_secret_name = hive.spec.cluster_config.database.credentials_secret.clone(); - container_builder - // load database credentials to environment variables: these will be used to replace - // the placeholders in hive-site.xml so that the operator does not "touch" the secret. - .add_env_var_from_secret(DB_USERNAME_ENV, &credentials_secret_name, "username") - .add_env_var_from_secret(DB_PASSWORD_ENV, &credentials_secret_name, "password") .add_env_var( "HADOOP_HEAPSIZE", construct_hadoop_heapsize_env(merged_config).context(ConstructJvmArgumentsSnafu)?, @@ -794,6 +841,7 @@ fn build_metastore_rolegroup_statefulset( "CONTAINERDEBUG_LOG_DIRECTORY", format!("{STACKABLE_LOG_DIR}/containerdebug"), ); + database_connection_details.add_to_container(&mut container_builder); for (property_name_kind, config) in metastore_config { if property_name_kind == &PropertyNameKind::Env { @@ -862,7 +910,7 @@ fn build_metastore_rolegroup_statefulset( .context(AddVolumeSnafu)?; } - let db_type = hive.db_type(); + let db_type = hive.spec.cluster_config.metadata_database.as_hive_db_type(); let start_command = if resolved_product_image.product_version.starts_with("3.") { // The schematool version in 3.1.x does *not* support the `-initOrUpgradeSchema` flag yet, so we can not use that. // As we *only* support HMS 3.1.x (or newer) since SDP release 23.11, we can safely assume we are always coming diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 62ef24f2..8dbe017e 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -18,7 +18,15 @@ use stackable_operator::{ fragment::{self, Fragment, ValidationError}, merge::Merge, }, - crd::s3, + crd::{ + database::{ + databases::{ + derby::DerbyConnection, mysql::MysqlConnection, postgresql::PostgresqlConnection, + }, + drivers::jdbc::JDBCDatabaseConnection, + }, + s3, + }, deep_merger::ObjectOverrides, k8s_openapi::apimachinery::pkg::api::resource::Quantity, kube::{CustomResource, ResourceExt, runtime::reflector::ObjectRef}, @@ -67,12 +75,6 @@ pub const METRICS_PORT: u16 = 9084; pub const STACKABLE_TRUST_STORE: &str = "/stackable/truststore.p12"; pub const STACKABLE_TRUST_STORE_PASSWORD: &str = "changeit"; -// DB credentials -pub const DB_USERNAME_PLACEHOLDER: &str = "xxx_db_username_xxx"; -pub const DB_PASSWORD_PLACEHOLDER: &str = "xxx_db_password_xxx"; -pub const DB_USERNAME_ENV: &str = "DB_USERNAME_ENV"; -pub const DB_PASSWORD_ENV: &str = "DB_PASSWORD_ENV"; - const DEFAULT_METASTORE_GRACEFUL_SHUTDOWN_TIMEOUT: Duration = Duration::from_minutes_unchecked(5); #[derive(Snafu, Debug)] @@ -154,7 +156,7 @@ pub mod versioned { pub listener_class: String, } - #[derive(Clone, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] + #[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub struct HiveClusterConfig { /// Settings related to user [authentication](DOCS_BASE_URL_PLACEHOLDER/hive/usage-guide/security). @@ -164,8 +166,8 @@ pub mod versioned { /// Learn more in the [Hive authorization usage guide](DOCS_BASE_URL_PLACEHOLDER/hive/usage-guide/security#authorization). pub authorization: Option, - // no doc - docs in DatabaseConnectionSpec struct. - pub database: DatabaseConnectionSpec, + /// TODO docs + pub metadata_database: MetadataDatabaseConnection, /// HDFS connection specification. #[serde(default, skip_serializing_if = "Option::is_none")] @@ -295,10 +297,6 @@ impl v1alpha1::HiveCluster { .map(|k| k.secret_class.clone()) } - pub fn db_type(&self) -> &DbType { - &self.spec.cluster_config.database.db_type - } - pub fn get_opa_config(&self) -> Option<&OpaConfig> { self.spec .cluster_config @@ -500,66 +498,42 @@ impl MetaStoreConfig { } } -#[derive( - Clone, Debug, Deserialize, Eq, Hash, JsonSchema, PartialEq, Serialize, Display, EnumString, -)] -pub enum DbType { - #[serde(rename = "derby")] - #[strum(serialize = "derby")] - Derby, - - #[serde(rename = "mysql")] - #[strum(serialize = "mysql")] - Mysql, - - #[serde(rename = "postgres")] - #[strum(serialize = "postgres")] - Postgres, - - #[serde(rename = "oracle")] - #[strum(serialize = "oracle")] - Oracle, - - #[serde(rename = "mssql")] - #[strum(serialize = "mssql")] - Mssql, +#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum MetadataDatabaseConnection { + /// TODO docs + Postgresql(PostgresqlConnection), + + /// TODO docs + /// + /// Please note that - due to license issues - we don't ship the mysql driver, you need to add + /// it it yourself. + /// See for details. + Mysql(MysqlConnection), + + /// TODO docs + Derby(DerbyConnection), + // We don't support generic (yet?), as we need to tell the metastore the `--dbtype` on startup, + // which is not known for generic connection. + // Generic(GenericJDBCDatabaseConnection), } -impl DbType { - pub fn get_jdbc_driver_class(&self, product_version: &str) -> &str { +impl MetadataDatabaseConnection { + pub fn as_jdbc_database_connection(&self) -> &dyn JDBCDatabaseConnection { match self { - DbType::Derby => { - // The driver class changed for hive 4.2.0 - if ["3.1.3", "4.0.0", "4.0.1", "4.1.0"].contains(&product_version) { - "org.apache.derby.jdbc.EmbeddedDriver" - } else { - "org.apache.derby.iapi.jdbc.AutoloadedDriver" - } - } - DbType::Mysql => "com.mysql.jdbc.Driver", - DbType::Postgres => "org.postgresql.Driver", - DbType::Mssql => "com.microsoft.sqlserver.jdbc.SQLServerDriver", - DbType::Oracle => "oracle.jdbc.driver.OracleDriver", + Self::Postgresql(p) => p, + Self::Mysql(m) => m, + Self::Derby(d) => d, } } -} -/// Database connection specification for the metadata database. -#[derive(Clone, Debug, Deserialize, Eq, Hash, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct DatabaseConnectionSpec { - /// A connection string for the database. For example: - /// `jdbc:postgresql://hivehdfs-postgresql:5432/hivehdfs` - pub conn_string: String, - - /// The type of database to connect to. Supported are: - /// `postgres`, `mysql`, `oracle`, `mssql` and `derby`. - /// This value is used to configure the jdbc driver class. - pub db_type: DbType, - - /// A reference to a Secret containing the database credentials. - /// The Secret needs to contain the keys `username` and `password`. - pub credentials_secret: String, + pub fn as_hive_db_type(&self) -> &str { + match self { + MetadataDatabaseConnection::Postgresql(_) => "postgres", + MetadataDatabaseConnection::Mysql(_) => "mysql", + MetadataDatabaseConnection::Derby(_) => "derby", + } + } } impl Configuration for MetaStoreConfigFragment { @@ -584,7 +558,7 @@ impl Configuration for MetaStoreConfigFragment { fn compute_files( &self, - hive: &Self::Configurable, + _hive: &Self::Configurable, _role_name: &str, file: &str, ) -> Result>, product_config_utils::Error> { @@ -597,19 +571,6 @@ impl Configuration for MetaStoreConfigFragment { Some(warehouse_dir.to_string()), ); } - result.insert( - MetaStoreConfig::CONNECTION_URL.to_string(), - Some(hive.spec.cluster_config.database.conn_string.clone()), - ); - // use a placeholder that will be replaced in the start command (also for the password) - result.insert( - MetaStoreConfig::CONNECTION_USER_NAME.to_string(), - Some(DB_USERNAME_PLACEHOLDER.into()), - ); - result.insert( - MetaStoreConfig::CONNECTION_PASSWORD.to_string(), - Some(DB_PASSWORD_PLACEHOLDER.into()), - ); result.insert( MetaStoreConfig::METASTORE_METRICS_ENABLED.to_string(), Some("true".to_string()), diff --git a/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 b/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 index 1f35f82a..25d900a9 100644 --- a/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 +++ b/tests/templates/kuttl/smoke/60-install-hive.yaml.j2 @@ -17,10 +17,11 @@ spec: opa: configMapName: opa package: hms - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio {% if lookup('env', 'VECTOR_AGGREGATOR') %} From 9653f8c9d3a29980090cd24e1ce6aaf42298ca14 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 13 Feb 2026 11:33:54 +0100 Subject: [PATCH 02/14] Update tests and docs --- .../hive/pages/usage-guide/derby-example.adoc | 39 +++++-------------- examples/hive-opa-cluster.yaml | 9 +++-- examples/simple-hive-cluster-postgres-s3.yaml | 9 +++-- examples/simple-hive-cluster.yaml | 6 +-- rust/operator-binary/src/config/jvm.rs | 12 ++---- rust/operator-binary/src/crd/affinity.rs | 6 +-- .../cluster-operation/10-install-hive.yaml.j2 | 15 +------ .../cluster-operation/20-stop-hive.yaml.j2 | 23 ----------- .../cluster-operation/30-pause-hive.yaml.j2 | 23 ----------- .../cluster-operation/40-restart-hive.yaml.j2 | 23 ----------- .../external-access/install-hive.yaml.j2 | 6 +-- .../kerberos-hdfs/60-install-hive.yaml.j2 | 9 +++-- .../kuttl/kerberos-s3/60-install-hive.yaml.j2 | 9 +++-- .../kuttl/logging/04-install-hive.yaml.j2 | 9 +++-- .../01-install-hive.yaml.j2 | 15 +------ .../03-remove-role-group.yaml.j2 | 13 ------- .../04-change-rolegroup.yaml | 5 --- .../kuttl/resources/10-install-hive.yaml.j2 | 15 +------ .../kuttl/upgrade/30-install-hive.yaml.j2 | 9 +++-- 19 files changed, 55 insertions(+), 200 deletions(-) diff --git a/docs/modules/hive/pages/usage-guide/derby-example.adoc b/docs/modules/hive/pages/usage-guide/derby-example.adoc index 83285c8b..a3ac2306 100644 --- a/docs/modules/hive/pages/usage-guide/derby-example.adoc +++ b/docs/modules/hive/pages/usage-guide/derby-example.adoc @@ -18,23 +18,12 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/metastore_db;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} metastore: roleGroups: default: replicas: 1 ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine ---- WARNING: You should not use the `Derby` database in production. Derby stores data locally which does not work in high availability setups (multiple replicas) and all data is lost after Pod restarts. @@ -72,10 +61,8 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/stackable/metastore_db;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} s3: inline: host: minio @@ -107,15 +94,6 @@ metadata: stringData: accessKey: minio-access-key secretKey: minio-secret-key ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine ---- @@ -153,10 +131,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: hive-postgresql.default.svc.cluster.local + database: hive + credentialsSecret: hive-credentials metastore: roleGroups: default: diff --git a/examples/hive-opa-cluster.yaml b/examples/hive-opa-cluster.yaml index 5ec312f5..2d17fc2b 100644 --- a/examples/hive-opa-cluster.yaml +++ b/examples/hive-opa-cluster.yaml @@ -30,10 +30,11 @@ spec: opa: configMapName: opa package: hms - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-postgresql-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-postgresql-credentials metastore: roleGroups: default: diff --git a/examples/simple-hive-cluster-postgres-s3.yaml b/examples/simple-hive-cluster-postgres-s3.yaml index f14843af..d126034e 100644 --- a/examples/simple-hive-cluster-postgres-s3.yaml +++ b/examples/simple-hive-cluster-postgres-s3.yaml @@ -30,10 +30,11 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:postgresql://hive-postgresql.default.svc.cluster.local:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: hive-postgresql.default.svc.cluster.local + database: hive + credentialsSecret: hive-credentials s3: inline: host: test-minio diff --git a/examples/simple-hive-cluster.yaml b/examples/simple-hive-cluster.yaml index e239dd61..ae269512 100644 --- a/examples/simple-hive-cluster.yaml +++ b/examples/simple-hive-cluster.yaml @@ -11,10 +11,8 @@ spec: image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} metastore: roleGroups: default: diff --git a/rust/operator-binary/src/config/jvm.rs b/rust/operator-binary/src/config/jvm.rs index 0acfaca6..b1784b83 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -109,10 +109,8 @@ mod tests { image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - dbType: derby - credentialsSecret: mySecret + metadataDatabase: + derby: {} metastore: roleGroups: default: @@ -144,10 +142,8 @@ mod tests { image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - dbType: derby - credentialsSecret: mySecret + metadataDatabase: + derby: {} metastore: config: resources: diff --git a/rust/operator-binary/src/crd/affinity.rs b/rust/operator-binary/src/crd/affinity.rs index 40ed8052..91c768e6 100644 --- a/rust/operator-binary/src/crd/affinity.rs +++ b/rust/operator-binary/src/crd/affinity.rs @@ -47,10 +47,8 @@ mod tests { image: productVersion: 4.2.0 clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - dbType: derby - credentialsSecret: mySecret + metadataDatabase: + derby: {} metastore: roleGroups: default: diff --git a/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 index e7f4f782..25ecb9aa 100644 --- a/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/10-install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} @@ -27,12 +25,3 @@ spec: roleGroups: default: replicas: 1 ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine diff --git a/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 index 9bb428d7..37b0476f 100644 --- a/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/20-stop-hive.yaml.j2 @@ -4,29 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby -{% if lookup('env', 'VECTOR_AGGREGATOR') %} - vectorAggregatorConfigMapName: vector-aggregator-discovery -{% endif %} clusterOperation: stopped: true reconciliationPaused: false - metastore: - config: - logging: - enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} - roleGroups: - default: - replicas: 1 diff --git a/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 index 17001faf..ca23843d 100644 --- a/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/30-pause-hive.yaml.j2 @@ -4,29 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby -{% if lookup('env', 'VECTOR_AGGREGATOR') %} - vectorAggregatorConfigMapName: vector-aggregator-discovery -{% endif %} clusterOperation: stopped: false reconciliationPaused: true - metastore: - config: - logging: - enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} - roleGroups: - default: - replicas: 1 diff --git a/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 b/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 index 91905872..ac4b348c 100644 --- a/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 +++ b/tests/templates/kuttl/cluster-operation/40-restart-hive.yaml.j2 @@ -4,29 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby -{% if lookup('env', 'VECTOR_AGGREGATOR') %} - vectorAggregatorConfigMapName: vector-aggregator-discovery -{% endif %} clusterOperation: stopped: false reconciliationPaused: false - metastore: - config: - logging: - enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} - roleGroups: - default: - replicas: 1 diff --git a/tests/templates/kuttl/external-access/install-hive.yaml.j2 b/tests/templates/kuttl/external-access/install-hive.yaml.j2 index 84b8d47c..2f100403 100644 --- a/tests/templates/kuttl/external-access/install-hive.yaml.j2 +++ b/tests/templates/kuttl/external-access/install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} diff --git a/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 b/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 index 840be987..ee3faed4 100644 --- a/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 +++ b/tests/templates/kuttl/kerberos-hdfs/60-install-hive.yaml.j2 @@ -19,10 +19,11 @@ commands: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials hdfs: configMap: hdfs authentication: diff --git a/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 b/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 index d60c0ef9..a87f676b 100644 --- a/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 +++ b/tests/templates/kuttl/kerberos-s3/60-install-hive.yaml.j2 @@ -19,10 +19,11 @@ commands: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials s3: reference: minio authentication: diff --git a/tests/templates/kuttl/logging/04-install-hive.yaml.j2 b/tests/templates/kuttl/logging/04-install-hive.yaml.j2 index 571f73f6..b42b8cc9 100644 --- a/tests/templates/kuttl/logging/04-install-hive.yaml.j2 +++ b/tests/templates/kuttl/logging/04-install-hive.yaml.j2 @@ -47,10 +47,11 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://hive-postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: hive-postgresql + database: hive + credentialsSecret: hive-credentials vectorAggregatorConfigMapName: hive-vector-aggregator-discovery metastore: roleGroups: diff --git a/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 b/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 index cd8b1df0..7464dc42 100644 --- a/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 +++ b/tests/templates/kuttl/orphaned-resources/01-install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} @@ -29,12 +27,3 @@ spec: replicas: 1 remove: replicas: 1 ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine diff --git a/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 b/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 index 19ae7250..ddc0eda0 100644 --- a/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 +++ b/tests/templates/kuttl/orphaned-resources/03-remove-role-group.yaml.j2 @@ -4,19 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - image: -{% if test_scenario['values']['hive-latest'].find(",") > 0 %} - custom: "{{ test_scenario['values']['hive-latest'].split(',')[1] }}" - productVersion: "{{ test_scenario['values']['hive-latest'].split(',')[0] }}" -{% else %} - productVersion: "{{ test_scenario['values']['hive-latest'] }}" -{% endif %} - pullPolicy: IfNotPresent - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby metastore: roleGroups: remove: null diff --git a/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml b/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml index 669d5592..712baac9 100644 --- a/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml +++ b/tests/templates/kuttl/orphaned-resources/04-change-rolegroup.yaml @@ -4,11 +4,6 @@ kind: HiveCluster metadata: name: test-hive spec: - clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby metastore: roleGroups: default: null diff --git a/tests/templates/kuttl/resources/10-install-hive.yaml.j2 b/tests/templates/kuttl/resources/10-install-hive.yaml.j2 index a985772d..7c847240 100644 --- a/tests/templates/kuttl/resources/10-install-hive.yaml.j2 +++ b/tests/templates/kuttl/resources/10-install-hive.yaml.j2 @@ -13,10 +13,8 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:derby:;databaseName=/tmp/hive;create=true - credentialsSecret: hive-credentials - dbType: derby + metadataDatabase: + derby: {} {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} @@ -52,12 +50,3 @@ spec: cpu: 500m limits: cpu: 3100m ---- -apiVersion: v1 -kind: Secret -metadata: - name: hive-credentials -type: Opaque -stringData: - username: APP - password: mine diff --git a/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 b/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 index 39d7fe02..5a2b0edb 100644 --- a/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 +++ b/tests/templates/kuttl/upgrade/30-install-hive.yaml.j2 @@ -13,10 +13,11 @@ spec: {% endif %} pullPolicy: IfNotPresent clusterConfig: - database: - connString: jdbc:postgresql://postgresql:5432/hive - credentialsSecret: hive-credentials - dbType: postgres + metadataDatabase: + postgresql: + host: postgresql + database: hive + credentialsSecret: hive-credentials {% if lookup('env', 'VECTOR_AGGREGATOR') %} vectorAggregatorConfigMapName: vector-aggregator-discovery {% endif %} From 15d47c746d125297bb25312984bcfb8dda8618a1 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 13 Feb 2026 11:55:11 +0100 Subject: [PATCH 03/14] fix tests --- rust/operator-binary/src/config/jvm.rs | 5 ++++- rust/operator-binary/src/crd/affinity.rs | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rust/operator-binary/src/config/jvm.rs b/rust/operator-binary/src/config/jvm.rs index b1784b83..9f7bc9f2 100644 --- a/rust/operator-binary/src/config/jvm.rs +++ b/rust/operator-binary/src/config/jvm.rs @@ -192,7 +192,10 @@ mod tests { Role, String, ) { - let hive: HiveCluster = serde_yaml::from_str(hive_cluster).expect("illegal test input"); + let deserializer = serde_yaml::Deserializer::from_str(hive_cluster); + let hive: HiveCluster = + serde_yaml::with::singleton_map_recursive::deserialize(deserializer) + .expect("invalid test input"); let hive_role = HiveRole::MetaStore; let rolegroup_ref = hive.metastore_rolegroup_ref("default"); diff --git a/rust/operator-binary/src/crd/affinity.rs b/rust/operator-binary/src/crd/affinity.rs index 91c768e6..e187d9a4 100644 --- a/rust/operator-binary/src/crd/affinity.rs +++ b/rust/operator-binary/src/crd/affinity.rs @@ -54,7 +54,10 @@ mod tests { default: replicas: 1 "#; - let hive: v1alpha1::HiveCluster = serde_yaml::from_str(input).expect("illegal test input"); + let deserializer = serde_yaml::Deserializer::from_str(input); + let hive: v1alpha1::HiveCluster = + serde_yaml::with::singleton_map_recursive::deserialize(deserializer) + .expect("invalid test input"); let merged_config = hive .merged_config(&role, &role.rolegroup_ref(&hive, "default")) .unwrap(); From ab728085c745b452f2caadcceb2d115208641dcb Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Mon, 2 Mar 2026 11:23:49 +0100 Subject: [PATCH 04/14] Add some docs --- docs/modules/hive/pages/usage-guide/derby-example.adoc | 2 -- rust/operator-binary/src/crd/mod.rs | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/modules/hive/pages/usage-guide/derby-example.adoc b/docs/modules/hive/pages/usage-guide/derby-example.adoc index a3ac2306..e2e52263 100644 --- a/docs/modules/hive/pages/usage-guide/derby-example.adoc +++ b/docs/modules/hive/pages/usage-guide/derby-example.adoc @@ -9,7 +9,6 @@ It should generally be safe to simply use the latest image version that is avail .Create a single node Apache Hive Metastore cluster using Derby: [source,yaml] ---- ---- apiVersion: hive.stackable.tech/v1alpha1 kind: HiveCluster metadata: @@ -52,7 +51,6 @@ Then, connect to localhost:9001 and login with the user `minio-access-key` and p Deploy the hive cluster: [source,yaml] ---- ---- apiVersion: hive.stackable.tech/v1alpha1 kind: HiveCluster metadata: diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 08069390..16a53f9c 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -526,6 +526,7 @@ impl MetadataDatabaseConnection { } } + /// Name of the database as it should be passed using the `--db-type` CLI argument to Hive pub fn as_hive_db_type(&self) -> &str { match self { MetadataDatabaseConnection::Postgresql(_) => "postgres", From 55fe5f72de5262d18ac383e21efabcbbd96d54be Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Mon, 2 Mar 2026 11:32:04 +0100 Subject: [PATCH 05/14] Refactor --- rust/operator-binary/src/controller.rs | 5 +-- rust/operator-binary/src/crd/mod.rs | 47 ++------------------------ 2 files changed, 5 insertions(+), 47 deletions(-) diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 5dfae6ec..1598595f 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -93,10 +93,11 @@ use crate::{ crd::{ APP_NAME, CORE_SITE_XML, Container, HIVE_PORT, HIVE_PORT_NAME, HIVE_SITE_XML, HiveClusterStatus, HiveRole, JVM_SECURITY_PROPERTIES_FILE, METRICS_PORT, METRICS_PORT_NAME, - MetaStoreConfig, MetadataDatabaseConnection, STACKABLE_CONFIG_DIR, - STACKABLE_CONFIG_DIR_NAME, STACKABLE_CONFIG_MOUNT_DIR, STACKABLE_CONFIG_MOUNT_DIR_NAME, + MetaStoreConfig, STACKABLE_CONFIG_DIR, STACKABLE_CONFIG_DIR_NAME, + STACKABLE_CONFIG_MOUNT_DIR, STACKABLE_CONFIG_MOUNT_DIR_NAME, STACKABLE_LOG_CONFIG_MOUNT_DIR, STACKABLE_LOG_CONFIG_MOUNT_DIR_NAME, STACKABLE_LOG_DIR, STACKABLE_LOG_DIR_NAME, + databases::MetadataDatabaseConnection, v1alpha1::{self, HiveMetastoreRoleConfig}, }, discovery::{self}, diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 16a53f9c..c551b397 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -1,5 +1,6 @@ use std::{collections::BTreeMap, str::FromStr}; +use databases::MetadataDatabaseConnection; use security::AuthenticationConfig; use serde::{Deserialize, Serialize}; use snafu::{OptionExt, ResultExt, Snafu}; @@ -19,12 +20,6 @@ use stackable_operator::{ merge::Merge, }, crd::s3, - databases::{ - databases::{ - derby::DerbyConnection, mysql::MysqlConnection, postgresql::PostgresqlConnection, - }, - drivers::jdbc::JDBCDatabaseConnection, - }, deep_merger::ObjectOverrides, k8s_openapi::apimachinery::pkg::api::resource::Quantity, kube::{CustomResource, ResourceExt, runtime::reflector::ObjectRef}, @@ -43,6 +38,7 @@ use v1alpha1::HiveMetastoreRoleConfig; use crate::{crd::affinity::get_affinity, listener::metastore_default_listener_class}; pub mod affinity; +pub mod databases; pub mod security; pub const FIELD_MANAGER: &str = "hive-operator"; @@ -497,45 +493,6 @@ impl MetaStoreConfig { } } -#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] -#[serde(rename_all = "camelCase")] -pub enum MetadataDatabaseConnection { - /// TODO docs - Postgresql(PostgresqlConnection), - - /// TODO docs - /// - /// Please note that - due to license issues - we don't ship the mysql driver, you need to add - /// it it yourself. - /// See for details. - Mysql(MysqlConnection), - - /// TODO docs - Derby(DerbyConnection), - // We don't support generic (yet?), as we need to tell the metastore the `--dbtype` on startup, - // which is not known for generic connection. - // Generic(GenericJDBCDatabaseConnection), -} - -impl MetadataDatabaseConnection { - pub fn as_jdbc_database_connection(&self) -> &dyn JDBCDatabaseConnection { - match self { - Self::Postgresql(p) => p, - Self::Mysql(m) => m, - Self::Derby(d) => d, - } - } - - /// Name of the database as it should be passed using the `--db-type` CLI argument to Hive - pub fn as_hive_db_type(&self) -> &str { - match self { - MetadataDatabaseConnection::Postgresql(_) => "postgres", - MetadataDatabaseConnection::Mysql(_) => "mysql", - MetadataDatabaseConnection::Derby(_) => "derby", - } - } -} - impl Configuration for MetaStoreConfigFragment { type Configurable = v1alpha1::HiveCluster; From eb4148bc76bb24537e1600c22b12d47be5f98ab4 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Mon, 2 Mar 2026 13:05:51 +0100 Subject: [PATCH 06/14] Add missing file --- Cargo.lock | 18 ++++----- Cargo.nix | 18 ++++----- rust/operator-binary/src/crd/databases.rs | 49 +++++++++++++++++++++++ 3 files changed, 67 insertions(+), 18 deletions(-) create mode 100644 rust/operator-binary/src/crd/databases.rs diff --git a/Cargo.lock b/Cargo.lock index 4c95630a..e56d442a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "darling", "regex", @@ -2848,7 +2848,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "const-oid", "ecdsa", @@ -2897,7 +2897,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.106.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "clap", "const_format", @@ -2936,7 +2936,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "darling", "proc-macro2", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "jiff", "k8s-openapi", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "axum", "clap", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "schemars", "serde", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "convert_case", "convert_case_extras", @@ -3019,7 +3019,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#f457c20ffc89634e7fb373130647ff6ea31f0f9e" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.nix b/Cargo.nix index c319a5ed..17fb1146 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4812,7 +4812,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "k8s_version"; @@ -9421,7 +9421,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_certs"; @@ -9629,7 +9629,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_operator"; @@ -9802,7 +9802,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; procMacro = true; @@ -9837,7 +9837,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_shared"; @@ -9918,7 +9918,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_telemetry"; @@ -10028,7 +10028,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_versioned"; @@ -10072,7 +10072,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; procMacro = true; @@ -10140,7 +10140,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "f457c20ffc89634e7fb373130647ff6ea31f0f9e"; + rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_webhook"; diff --git a/rust/operator-binary/src/crd/databases.rs b/rust/operator-binary/src/crd/databases.rs new file mode 100644 index 00000000..ed73055a --- /dev/null +++ b/rust/operator-binary/src/crd/databases.rs @@ -0,0 +1,49 @@ +use serde::{Deserialize, Serialize}; +use stackable_operator::{ + databases::{ + databases::{ + derby::DerbyConnection, mysql::MysqlConnection, postgresql::PostgresqlConnection, + }, + drivers::jdbc::JDBCDatabaseConnection, + }, + schemars::{self, JsonSchema}, +}; + +#[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] +#[serde(rename_all = "camelCase")] +pub enum MetadataDatabaseConnection { + /// TODO docs + Postgresql(PostgresqlConnection), + + /// TODO docs + /// + /// Please note that - due to license issues - we don't ship the mysql driver, you need to add + /// it it yourself. + /// See for details. + Mysql(MysqlConnection), + + /// TODO docs + Derby(DerbyConnection), + // We don't support generic (yet?), as we need to tell the metastore the `--dbtype` on startup, + // which is not known for generic connection. + // Generic(GenericJDBCDatabaseConnection), +} + +impl MetadataDatabaseConnection { + pub fn as_jdbc_database_connection(&self) -> &dyn JDBCDatabaseConnection { + match self { + Self::Postgresql(p) => p, + Self::Mysql(m) => m, + Self::Derby(d) => d, + } + } + + /// Name of the database as it should be passed using the `--db-type` CLI argument to Hive + pub fn as_hive_db_type(&self) -> &str { + match self { + MetadataDatabaseConnection::Postgresql(_) => "postgres", + MetadataDatabaseConnection::Mysql(_) => "mysql", + MetadataDatabaseConnection::Derby(_) => "derby", + } + } +} From c1b4c7675469b6b77694b1137aa5ee2cd2f9ee67 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Mon, 2 Mar 2026 13:32:48 +0100 Subject: [PATCH 07/14] cargo update --- Cargo.lock | 18 +++++++++--------- Cargo.nix | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e56d442a..6d8c40d2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "darling", "regex", @@ -2848,7 +2848,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "const-oid", "ecdsa", @@ -2897,7 +2897,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.106.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "clap", "const_format", @@ -2936,7 +2936,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "darling", "proc-macro2", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "jiff", "k8s-openapi", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "axum", "clap", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "schemars", "serde", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "convert_case", "convert_case_extras", @@ -3019,7 +3019,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#7c193c4d2adb3af64e3c09fe2f55499ccbfe556a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.nix b/Cargo.nix index 17fb1146..1a1eb2a8 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4812,7 +4812,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "k8s_version"; @@ -9421,7 +9421,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_certs"; @@ -9629,7 +9629,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_operator"; @@ -9802,7 +9802,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; procMacro = true; @@ -9837,7 +9837,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_shared"; @@ -9918,7 +9918,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_telemetry"; @@ -10028,7 +10028,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_versioned"; @@ -10072,7 +10072,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; procMacro = true; @@ -10140,7 +10140,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "7c193c4d2adb3af64e3c09fe2f55499ccbfe556a"; + rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_webhook"; From 6250f15a465a72ec996e4f699994b4ae7ea69cdd Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Mon, 2 Mar 2026 15:44:56 +0100 Subject: [PATCH 08/14] cargo update --- Cargo.lock | 18 +++++++++--------- Cargo.nix | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6d8c40d2..cace58d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "darling", "regex", @@ -2848,7 +2848,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "const-oid", "ecdsa", @@ -2897,7 +2897,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.106.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "clap", "const_format", @@ -2936,7 +2936,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "darling", "proc-macro2", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "jiff", "k8s-openapi", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "axum", "clap", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "schemars", "serde", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "convert_case", "convert_case_extras", @@ -3019,7 +3019,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#33ae5194de8f48ebef1b3c64642c18eed7017164" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.nix b/Cargo.nix index 1a1eb2a8..6adde14c 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4812,7 +4812,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "k8s_version"; @@ -9421,7 +9421,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_certs"; @@ -9629,7 +9629,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_operator"; @@ -9802,7 +9802,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; procMacro = true; @@ -9837,7 +9837,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_shared"; @@ -9918,7 +9918,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_telemetry"; @@ -10028,7 +10028,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_versioned"; @@ -10072,7 +10072,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; procMacro = true; @@ -10140,7 +10140,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "33ae5194de8f48ebef1b3c64642c18eed7017164"; + rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; }; libName = "stackable_webhook"; From f7b7442bae8ae9a1f5f196ea557d6adf884e2e21 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 3 Mar 2026 12:18:09 +0100 Subject: [PATCH 09/14] Bump op-rs --- Cargo.lock | 30 ++++++++++++------------ Cargo.nix | 58 ++++++++++++++++++++++++----------------------- crate-hashes.json | 18 +++++++-------- 3 files changed, 54 insertions(+), 52 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cace58d8..125495d5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1353,9 +1353,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.11.0" +version = "2.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "darling", "regex", @@ -2848,7 +2848,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "const-oid", "ecdsa", @@ -2897,7 +2897,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.106.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "clap", "const_format", @@ -2936,7 +2936,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "darling", "proc-macro2", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "jiff", "k8s-openapi", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "axum", "clap", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "schemars", "serde", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "convert_case", "convert_case_extras", @@ -3019,7 +3019,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#cfa085d39f77e8e706447cffc92f0fbb02bc0212" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" dependencies = [ "arc-swap", "async-trait", @@ -3235,9 +3235,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.49.0" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ "bytes", "libc", @@ -3252,9 +3252,9 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.6.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.nix b/Cargo.nix index 6adde14c..8cff1abf 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4338,18 +4338,20 @@ rec { }; "ipnet" = rec { crateName = "ipnet"; - version = "2.11.0"; + version = "2.12.0"; edition = "2018"; - sha256 = "0c5i9sfi2asai28m8xp48k5gvwkqrg5ffpi767py6mzsrswv17s6"; + sha256 = "1qpq2y0asyv0jppw7zww9y96fpnpinwap8a0phhqqgyy3znnz3yr"; authors = [ "Kris Price " ]; features = { "default" = [ "std" ]; - "heapless" = [ "dep:heapless" ]; - "json" = [ "serde" "schemars" ]; - "schemars" = [ "dep:schemars" ]; - "ser_as_str" = [ "heapless" ]; + "heapless" = [ "dep:heapless" "serde" ]; + "json" = [ "schemars08" "serde" ]; + "schemars" = [ "schemars08" ]; + "schemars08" = [ "dep:schemars08" ]; + "schemars1" = [ "dep:schemars1" ]; + "ser_as_str" = [ "dep:heapless" ]; "serde" = [ "dep:serde" ]; }; resolvedDefaultFeatures = [ "default" "std" ]; @@ -4812,8 +4814,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "k8s_version"; authors = [ @@ -9421,8 +9423,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_certs"; authors = [ @@ -9629,8 +9631,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_operator"; authors = [ @@ -9802,8 +9804,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; procMacro = true; libName = "stackable_operator_derive"; @@ -9837,8 +9839,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_shared"; authors = [ @@ -9918,8 +9920,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_telemetry"; authors = [ @@ -10028,8 +10030,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_versioned"; authors = [ @@ -10072,8 +10074,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; procMacro = true; libName = "stackable_versioned_macros"; @@ -10140,8 +10142,8 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "cfa085d39f77e8e706447cffc92f0fbb02bc0212"; - sha256 = "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8"; + rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_webhook"; authors = [ @@ -10771,9 +10773,9 @@ rec { }; "tokio" = rec { crateName = "tokio"; - version = "1.49.0"; + version = "1.50.0"; edition = "2021"; - sha256 = "11ix3pl03s0bp71q3wddrbf8xr0cpn47d7fzr6m42r3kswy918kj"; + sha256 = "0bc2c5kd57p2xd4l6hagb0bkrp798k5vw0f3xzzwy0sf6ws5xb97"; authors = [ "Tokio Contributors " ]; @@ -10886,9 +10888,9 @@ rec { }; "tokio-macros" = rec { crateName = "tokio-macros"; - version = "2.6.0"; + version = "2.6.1"; edition = "2021"; - sha256 = "19czvgliginbzyhhfbmj77wazqn2y8g27y2nirfajdlm41bphh5g"; + sha256 = "172nwz3s7mmh266hb8l5xdnc7v9kqahisppqhinfd75nz3ps4maw"; procMacro = true; libName = "tokio_macros"; authors = [ diff --git a/crate-hashes.json b/crate-hashes.json index 487e7aa8..096ee5cc 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -4,14 +4,14 @@ "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-derive@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube-runtime@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", "git+https://github.com/kube-rs/kube-rs?rev=fe69cc486ff8e62a7da61d64ec3ebbd9e64c43b5#kube@3.0.1": "1irm4g79crlxjm3iqrgvx0f6wxdcj394ky84q89pk9i36y2mlw3n", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#k8s-version@0.1.3": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-certs@0.4.0": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator-derive@0.3.1": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator@0.106.2": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-shared@0.1.0": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-telemetry@0.6.1": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned-macros@0.8.3": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned@0.8.3": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-webhook@0.9.0": "10rcy12gzgdx2yxmx8qq040mrd7vf7fj3hkxiyizsgbxj8nhzaw8", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#k8s-version@0.1.3": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-certs@0.4.0": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator-derive@0.3.1": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator@0.106.2": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-shared@0.1.0": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-telemetry@0.6.1": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned-macros@0.8.3": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned@0.8.3": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-webhook@0.9.0": "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9", "git+https://github.com/stackabletech/product-config.git?tag=0.8.0#product-config@0.8.0": "1dz70kapm2wdqcr7ndyjji0lhsl98bsq95gnb2lw487wf6yr7987" } \ No newline at end of file From 5f4daa52079b9c71322350df2d5afdd83f60488d Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 4 Mar 2026 11:31:37 +0100 Subject: [PATCH 10/14] Bump op-rs --- Cargo.lock | 34 +++++++++++++++++----------------- Cargo.nix | 34 +++++++++++++++++----------------- extra/crds.yaml | 38 +++++++++++++++++++++++++++----------- 3 files changed, 61 insertions(+), 45 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 125495d5..c054f1ea 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1401,9 +1401,9 @@ dependencies = [ [[package]] name = "jiff" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819b44bc7c87d9117eb522f14d46e918add69ff12713c475946b0a29363ed1c2" +checksum = "1a3546dc96b6d42c5f24902af9e2538e82e39ad350b0c766eb3fbf2d8f3d8359" dependencies = [ "jiff-static", "jiff-tzdb-platform", @@ -1416,9 +1416,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "470252db18ecc35fd766c0891b1e3ec6cbbcd62507e85276c01bf75d8e94d4a1" +checksum = "2a8c8b344124222efd714b73bb41f8b5120b27a7cc1c75593a6ff768d9d05aa4" dependencies = [ "proc-macro2", "quote", @@ -1427,9 +1427,9 @@ dependencies = [ [[package]] name = "jiff-tzdb" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68971ebff725b9e2ca27a601c5eb38a4c5d64422c4cbab0c535f248087eda5c2" +checksum = "c900ef84826f1338a557697dc8fc601df9ca9af4ac137c7fb61d4c6f2dfd3076" [[package]] name = "jiff-tzdb-platform" @@ -1511,7 +1511,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "darling", "regex", @@ -2192,9 +2192,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.44" +version = "1.0.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4" +checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" dependencies = [ "proc-macro2", ] @@ -2848,7 +2848,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "const-oid", "ecdsa", @@ -2897,7 +2897,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.106.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "clap", "const_format", @@ -2936,7 +2936,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "darling", "proc-macro2", @@ -2947,7 +2947,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "jiff", "k8s-openapi", @@ -2964,7 +2964,7 @@ dependencies = [ [[package]] name = "stackable-telemetry" version = "0.6.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "axum", "clap", @@ -2988,7 +2988,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "schemars", "serde", @@ -3001,7 +3001,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "convert_case", "convert_case_extras", @@ -3019,7 +3019,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#49f8ba016ac35d69508bd01cb4c88e9737be124a" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#3e391ff13fa57fd0d07913e730ad9a6eefff8448" dependencies = [ "arc-swap", "async-trait", diff --git a/Cargo.nix b/Cargo.nix index 8cff1abf..0461b6bc 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -4458,9 +4458,9 @@ rec { }; "jiff" = rec { crateName = "jiff"; - version = "0.2.22"; + version = "0.2.23"; edition = "2021"; - sha256 = "1hni7qv2j2kbjisw84r7y6gxdb8qx534vw92nmz13nc7gjy496w1"; + sha256 = "0nc37n7jvgrzxdkcgc2hsfdf70lfagigjalh4igjrm5njvf4cd8s"; authors = [ "Andrew Gallant " ]; @@ -4540,9 +4540,9 @@ rec { }; "jiff-static" = rec { crateName = "jiff-static"; - version = "0.2.22"; + version = "0.2.23"; edition = "2021"; - sha256 = "18fljj75vxqvq1v55s074pbbrjy67qg1p2f0cvbmzhzc33dm40j7"; + sha256 = "192ss3cnixvg79cpa76clwkhn4mmz10vnwsbf7yjw8i484s8p31a"; procMacro = true; libName = "jiff_static"; authors = [ @@ -4569,9 +4569,9 @@ rec { }; "jiff-tzdb" = rec { crateName = "jiff-tzdb"; - version = "0.1.5"; + version = "0.1.6"; edition = "2021"; - sha256 = "1hm5xn3q092zac6apjy4492ddid473mwa0d64z5f5f95yyzix5v8"; + sha256 = "0xihzlnnyk0xnrzpq4xcyjdcmy8xc3ychzb9ayjkh4vgha2fy069"; libName = "jiff_tzdb"; libPath = "lib.rs"; authors = [ @@ -4814,7 +4814,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "k8s_version"; @@ -7229,9 +7229,9 @@ rec { }; "quote" = rec { crateName = "quote"; - version = "1.0.44"; + version = "1.0.45"; edition = "2021"; - sha256 = "1r7c7hxl66vz3q9qizgjhy77pdrrypqgk4ghc7260xvvfb7ypci1"; + sha256 = "095rb5rg7pbnwdp6v8w5jw93wndwyijgci1b5lw8j1h5cscn3wj1"; authors = [ "David Tolnay " ]; @@ -9423,7 +9423,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_certs"; @@ -9631,7 +9631,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_operator"; @@ -9804,7 +9804,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; procMacro = true; @@ -9839,7 +9839,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_shared"; @@ -9920,7 +9920,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_telemetry"; @@ -10030,7 +10030,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_versioned"; @@ -10074,7 +10074,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; procMacro = true; @@ -10142,7 +10142,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "49f8ba016ac35d69508bd01cb4c88e9737be124a"; + rev = "3e391ff13fa57fd0d07913e730ad9a6eefff8448"; sha256 = "09vjgrikwnjkjkqd558vjf15jw9s1gjpwv2v7vwa1l8j2xsjlrg9"; }; libName = "stackable_webhook"; diff --git a/extra/crds.yaml b/extra/crds.yaml index 99aa4233..c56285d0 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -102,7 +102,13 @@ spec: description: TODO docs properties: location: - description: TODO docs, especially on default + 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 @@ -115,23 +121,28 @@ spec: See for details. properties: credentialsSecret: - description: TODO docs + description: |- + Name of a Secret containing the `username` and `password` keys used to authenticate + against the MySQL server. type: string database: - description: TODO docs + description: Name of the database (schema) to connect to. type: string host: - description: TODO docs + description: Hostname or IP address of the MySQL server. type: string parameters: additionalProperties: type: string default: {} - description: TODO docs + description: |- + Additional map of JDBC connection parameters to append to the connection URL. The given + `HashMap` will be converted to query parameters in the form of + `?param1=value1¶m2=value2`. type: object port: default: 3306 - description: TODO docs + description: Port the MySQL server is listening on. Defaults to `3306`. format: uint16 maximum: 65535.0 minimum: 0.0 @@ -145,23 +156,28 @@ spec: description: TODO docs properties: credentialsSecret: - description: TODO docs + description: |- + Name of a Secret containing the `username` and `password` keys used to authenticate + against the PostgreSQL server. type: string database: - description: TODO docs + description: Name of the database (schema) to connect to. type: string host: - description: TODO docs + description: Hostname or IP address of the PostgreSQL server. type: string parameters: additionalProperties: type: string default: {} - description: TODO docs + 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: TODO docs + description: Port the PostgreSQL server is listening on. Defaults to `5432`. format: uint16 maximum: 65535.0 minimum: 0.0 From 27f2b70a2ad4649624cac542e7fe6a12db70d4c5 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 4 Mar 2026 11:34:15 +0100 Subject: [PATCH 11/14] Some docs --- extra/crds.yaml | 10 ++++++---- rust/operator-binary/src/crd/databases.rs | 6 +++--- rust/operator-binary/src/crd/mod.rs | 3 ++- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/extra/crds.yaml b/extra/crds.yaml index c56285d0..676dc3e0 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -89,7 +89,9 @@ spec: - configMap type: object metadataDatabase: - description: TODO docs + description: |- + Configure the database where the Hive metastore stores all it's internal metadata, such + as schema and tables. oneOf: - required: - postgresql @@ -99,7 +101,7 @@ spec: - derby properties: derby: - description: TODO docs + description: Use an Apache Derby database properties: location: description: |- @@ -114,7 +116,7 @@ spec: type: object mysql: description: |- - TODO docs + Use a MySQL database. Please note that - due to license issues - we don't ship the mysql driver, you need to add it it yourself. @@ -153,7 +155,7 @@ spec: - host type: object postgresql: - description: TODO docs + description: Use a PostgreSQL database properties: credentialsSecret: description: |- diff --git a/rust/operator-binary/src/crd/databases.rs b/rust/operator-binary/src/crd/databases.rs index ed73055a..09aef44b 100644 --- a/rust/operator-binary/src/crd/databases.rs +++ b/rust/operator-binary/src/crd/databases.rs @@ -12,17 +12,17 @@ use stackable_operator::{ #[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub enum MetadataDatabaseConnection { - /// TODO docs + /// Use a PostgreSQL database Postgresql(PostgresqlConnection), - /// TODO docs + /// Use a MySQL database. /// /// Please note that - due to license issues - we don't ship the mysql driver, you need to add /// it it yourself. /// See for details. Mysql(MysqlConnection), - /// TODO docs + /// Use an Apache Derby database Derby(DerbyConnection), // We don't support generic (yet?), as we need to tell the metastore the `--dbtype` on startup, // which is not known for generic connection. diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index c551b397..82ecd09c 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -161,7 +161,8 @@ pub mod versioned { /// Learn more in the [Hive authorization usage guide](DOCS_BASE_URL_PLACEHOLDER/hive/usage-guide/security#authorization). pub authorization: Option, - /// TODO docs + /// Configure the database where the Hive metastore stores all it's internal metadata, such + /// as schema and tables. pub metadata_database: MetadataDatabaseConnection, /// HDFS connection specification. From 79cb0b794ce834792326bedf4e2069ce4218f4f5 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 4 Mar 2026 15:34:18 +0100 Subject: [PATCH 12/14] Use docs from op-rs --- extra/crds.yaml | 11 ++++++++--- rust/operator-binary/src/crd/databases.rs | 6 +++--- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/extra/crds.yaml b/extra/crds.yaml index 676dc3e0..3cc97010 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -101,7 +101,12 @@ spec: - derby properties: derby: - description: Use an Apache Derby database + description: |- + Connection settings for an embedded [Apache Derby](https://db.apache.org/derby/) database. + + Derby is an embedded, file-based Java database engine that requires no separate server process. + It is typically used for development, testing, or as a lightweight metastore backend (e.g. for + Apache Hive). properties: location: description: |- @@ -116,7 +121,7 @@ spec: type: object mysql: description: |- - Use a MySQL database. + 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. @@ -155,7 +160,7 @@ spec: - host type: object postgresql: - description: Use a PostgreSQL database + description: Connection settings for a [PostgreSQL](https://www.postgresql.org/) database. properties: credentialsSecret: description: |- diff --git a/rust/operator-binary/src/crd/databases.rs b/rust/operator-binary/src/crd/databases.rs index 09aef44b..40265375 100644 --- a/rust/operator-binary/src/crd/databases.rs +++ b/rust/operator-binary/src/crd/databases.rs @@ -12,17 +12,17 @@ use stackable_operator::{ #[derive(Clone, Debug, Deserialize, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] pub enum MetadataDatabaseConnection { - /// Use a PostgreSQL database + // Docs are on the struct Postgresql(PostgresqlConnection), - /// Use a MySQL database. + /// Connection settings for a [MySQL](https://www.mysql.com/) database. /// /// Please note that - due to license issues - we don't ship the mysql driver, you need to add /// it it yourself. /// See for details. Mysql(MysqlConnection), - /// Use an Apache Derby database + // Docs are on the struct Derby(DerbyConnection), // We don't support generic (yet?), as we need to tell the metastore the `--dbtype` on startup, // which is not known for generic connection. From 42f50bee7e5de81adf2ecb3798f81befd021f509 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Tue, 31 Mar 2026 13:28:15 +0200 Subject: [PATCH 13/14] Bump op-rs --- Cargo.lock | 118 +++++++------- Cargo.nix | 183 ++++++++++------------ crate-hashes.json | 2 +- extra/crds.yaml | 6 +- rust/operator-binary/src/controller.rs | 8 +- rust/operator-binary/src/crd/databases.rs | 8 +- 6 files changed, 153 insertions(+), 172 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 40c87649..6af6ef25 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,9 +103,9 @@ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "arc-swap" -version = "1.8.2" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9f3647c145568cec02c42054e07bdf9a5a698e15b466fb2341bfc393cd24aa5" +checksum = "a07d1f37ff60921c83bdfc7407723bdefe89b44b98a9b772f225c8f9d67141a6" dependencies = [ "rustversion", ] @@ -302,9 +302,9 @@ checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" [[package]] name = "cc" -version = "1.2.57" +version = "1.2.58" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a0dd1ca384932ff3641c8718a02769f1698e7563dc6974ffd03346116310423" +checksum = "e1e928d4b69e3077709075a938a05ffbedfa53a84c8f766efbf8220bb1ff60e1" dependencies = [ "find-msvc-tools", "jobserver", @@ -1365,9 +1365,9 @@ checksum = "d98f6fed1fde3f8c21bc40a1abb88dd75e67924f9cffc3ef95607bad8017f8e2" [[package]] name = "iri-string" -version = "0.7.10" +version = "0.7.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c91338f0783edbd6195decb37bae672fd3b165faffb89bf7b9e6942f8b1a731a" +checksum = "25e659a4bb38e810ebc252e53b5814ff908a8c58c2a9ce2fae1bbec24cbf4e20" dependencies = [ "memchr", "serde", @@ -1390,9 +1390,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2" +checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "java-properties" @@ -1458,10 +1458,12 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.91" +version = "0.3.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b49715b7073f385ba4bc528e5747d02e66cb39c6146efb66b781f131f0fb399c" +checksum = "797146bb2677299a1eb6b7b50a890f4c361b29ef967addf5b2fa45dae1bb6d7d" dependencies = [ + "cfg-if", + "futures-util", "once_cell", "wasm-bindgen", ] @@ -1517,7 +1519,7 @@ dependencies = [ [[package]] name = "k8s-version" version = "0.1.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "darling", "regex", @@ -1732,9 +1734,9 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" +checksum = "50b7e5b27aa02a74bac8c3f23f448f8d87ff11f92d3aac1a6ed369ee08cc56c1" dependencies = [ "libc", "wasi", @@ -1768,9 +1770,9 @@ dependencies = [ [[package]] name = "num-conv" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" +checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" [[package]] name = "num-integer" @@ -1861,9 +1863,9 @@ dependencies = [ [[package]] name = "opentelemetry-otlp" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" +checksum = "1f69cd6acbb9af919df949cd1ec9e5e7fdc2ef15d234b6b795aaa525cc02f71f" dependencies = [ "http", "opentelemetry", @@ -2488,9 +2490,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.103.9" +version = "0.103.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7df23109aa6c1567d1c575b9952556388da57401e4ace1d15f79eedad0d8f53" +checksum = "df33b2b81ac578cabaf06b89b0631153a3f416b0a886e8a7a1707fb51abbd1ef" dependencies = [ "ring", "rustls-pki-types", @@ -2761,9 +2763,9 @@ dependencies = [ [[package]] name = "simd-adler32" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2" +checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" [[package]] name = "slab" @@ -2854,7 +2856,7 @@ checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596" [[package]] name = "stackable-certs" version = "0.4.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "const-oid", "ecdsa", @@ -2903,7 +2905,7 @@ dependencies = [ [[package]] name = "stackable-operator" version = "0.108.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "clap", "const_format", @@ -2942,7 +2944,7 @@ dependencies = [ [[package]] name = "stackable-operator-derive" version = "0.3.1" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "darling", "proc-macro2", @@ -2953,7 +2955,7 @@ dependencies = [ [[package]] name = "stackable-shared" version = "0.1.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "jiff", "k8s-openapi", @@ -2969,8 +2971,8 @@ dependencies = [ [[package]] name = "stackable-telemetry" -version = "0.6.2" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +version = "0.6.3" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "axum", "clap", @@ -2994,7 +2996,7 @@ dependencies = [ [[package]] name = "stackable-versioned" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "schemars", "serde", @@ -3007,7 +3009,7 @@ dependencies = [ [[package]] name = "stackable-versioned-macros" version = "0.8.3" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "convert_case", "convert_case_extras", @@ -3025,7 +3027,7 @@ dependencies = [ [[package]] name = "stackable-webhook" version = "0.9.0" -source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#51cfff678845d03b88d17e63d7272bcc293aef47" +source = "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#655e4ffb4aed3f472d9e597b8641c4791da0d4b8" dependencies = [ "arc-swap", "async-trait", @@ -3305,18 +3307,18 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "1.0.1+spec-1.1.0" +version = "1.1.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b320e741db58cac564e26c607d3cc1fdc4a88fd36c879568c07856ed83ff3e9" +checksum = "97251a7c317e03ad83774a8752a7e81fb6067740609f75ea2b585b569a59198f" dependencies = [ "serde_core", ] [[package]] name = "toml_edit" -version = "0.25.5+spec-1.1.0" +version = "0.25.8+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ca1a40644a28bce036923f6a431df0b34236949d111cc07cb6dca830c9ef2e1" +checksum = "16bff38f1d86c47f9ff0647e6838d7bb362522bdf44006c7068c2b1e606f1f3c" dependencies = [ "indexmap", "toml_datetime", @@ -3326,9 +3328,9 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.0.10+spec-1.1.0" +version = "1.1.0+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7df25b4befd31c4816df190124375d5a20c6b6921e2cad937316de3fccd63420" +checksum = "2334f11ee363607eb04df9b8fc8a13ca1715a72ba8662a26ac285c98aabb4011" dependencies = [ "winnow", ] @@ -3552,9 +3554,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" [[package]] name = "unicode-xid" @@ -3643,9 +3645,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6532f9a5c1ece3798cb1c2cfdba640b9b3ba884f5db45973a6f442510a87d38e" +checksum = "7dc0882f7b5bb01ae8c5215a1230832694481c1a4be062fd410e12ea3da5b631" dependencies = [ "cfg-if", "once_cell", @@ -3656,23 +3658,19 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.64" +version = "0.4.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9c5522b3a28661442748e09d40924dfb9ca614b21c00d3fd135720e48b67db8" +checksum = "19280959e2844181895ef62f065c63e0ca07ece4771b53d89bfdb967d97cbf05" dependencies = [ - "cfg-if", - "futures-util", "js-sys", - "once_cell", "wasm-bindgen", - "web-sys", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18a2d50fcf105fb33bb15f00e7a77b772945a2ee45dcf454961fd843e74c18e6" +checksum = "75973d3066e01d035dbedaad2864c398df42f8dd7b1ea057c35b8407c015b537" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3680,9 +3678,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03ce4caeaac547cdf713d280eda22a730824dd11e6b8c3ca9e42247b25c631e3" +checksum = "91af5e4be765819e0bcfee7322c14374dc821e35e72fa663a830bbc7dc199eac" dependencies = [ "bumpalo", "proc-macro2", @@ -3693,18 +3691,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.114" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75a326b8c223ee17883a4251907455a2431acc2791c98c26279376490c378c16" +checksum = "c9bf0406a78f02f336bf1e451799cca198e8acde4ffa278f0fb20487b150a633" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.91" +version = "0.3.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854ba17bb104abfb26ba36da9729addc7ce7f06f5c0f90f3c391f8461cca21f9" +checksum = "749466a37ee189057f54748b200186b59a03417a117267baf3fd89cecc9fb837" dependencies = [ "js-sys", "wasm-bindgen", @@ -3863,9 +3861,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a90e88e4667264a994d34e6d1ab2d26d398dcdca8b7f52bec8668957517fc7d8" +checksum = "09dac053f1cd375980747450bfc7250c264eaae0583872e845c0c7cd578872b5" dependencies = [ "memchr", ] @@ -3927,18 +3925,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.42" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2578b716f8a7a858b7f02d5bd870c14bf4ddbbcf3a4c05414ba6503640505e3" +checksum = "eed437bf9d6692032087e337407a86f04cd8d6a16a37199ed57949d415bd68e9" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.42" +version = "0.8.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6cc098ea4d3bd6246687de65af3f920c430e236bee1e3bf2e441463f08a02f" +checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.nix b/Cargo.nix index e736f7dc..314cc82e 100644 --- a/Cargo.nix +++ b/Cargo.nix @@ -345,9 +345,9 @@ rec { }; "arc-swap" = rec { crateName = "arc-swap"; - version = "1.8.2"; + version = "1.9.0"; edition = "2018"; - sha256 = "19aas8y3kz0v6jr6yijvw6cad9grpl3lw1a25k0cws2m2iy69wzr"; + sha256 = "19j1f7bgkj15y9rbgacq9fs8kzny7dr0fx7wpn1ir4k0zwviyzd0"; libName = "arc_swap"; authors = [ "Michal 'vorner' Vaner " @@ -961,9 +961,9 @@ rec { }; "cc" = rec { crateName = "cc"; - version = "1.2.57"; + version = "1.2.58"; edition = "2018"; - sha256 = "08q464b62d03zm7rgiixavkrh5lzfq18lwf884vgycj9735d23bs"; + sha256 = "1qb0zyqhn8pqzdp7d3scm19zmvgvbyh3iabmj1q7fc4ynva2isg1"; authors = [ "Alex Crichton " ]; @@ -4366,9 +4366,9 @@ rec { }; "iri-string" = rec { crateName = "iri-string"; - version = "0.7.10"; + version = "0.7.12"; edition = "2021"; - sha256 = "06kk3a5jz576p7vrpf7zz9jv3lrgcyp7pczcblcxdnryg3q3h4y9"; + sha256 = "082fpx6c5ghvmqpwxaf2b268m47z2ic3prajqbmi1s1qpfj5kri5"; libName = "iri_string"; authors = [ "YOSHIOKA Takuma " @@ -4429,9 +4429,9 @@ rec { }; "itoa" = rec { crateName = "itoa"; - version = "1.0.17"; + version = "1.0.18"; edition = "2021"; - sha256 = "1lh93xydrdn1g9x547bd05g0d3hra7pd1k4jfd2z1pl1h5hwdv4j"; + sha256 = "10jnd1vpfkb8kj38rlkn2a6k02afvj3qmw054dfpzagrpl6achlg"; authors = [ "David Tolnay " ]; @@ -4630,14 +4630,26 @@ rec { }; "js-sys" = rec { crateName = "js-sys"; - version = "0.3.91"; + version = "0.3.93"; edition = "2021"; - sha256 = "171rzgq33wc1nxkgnvhlqqwwnrifs13mg3jjpjj5nf1z0yvib5xl"; + sha256 = "0zbdpghxligsnbsxsylnxwlindjc1y4hmddpnqg9labp4sxlcwbr"; libName = "js_sys"; authors = [ "The wasm-bindgen Developers" ]; dependencies = [ + { + name = "cfg-if"; + packageId = "cfg-if"; + optional = true; + } + { + name = "futures-util"; + packageId = "futures-util"; + optional = true; + usesDefaultFeatures = false; + features = [ "std" ]; + } { name = "once_cell"; packageId = "once_cell"; @@ -4651,9 +4663,11 @@ rec { ]; features = { "default" = [ "std" "unsafe-eval" ]; + "futures" = [ "dep:cfg-if" "dep:futures-util" ]; + "futures-core-03-stream" = [ "futures" "dep:futures-core" ]; "std" = [ "wasm-bindgen/std" ]; }; - resolvedDefaultFeatures = [ "default" "std" "unsafe-eval" ]; + resolvedDefaultFeatures = [ "default" "futures" "std" "unsafe-eval" ]; }; "json-patch" = rec { crateName = "json-patch"; @@ -4822,7 +4836,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; libName = "k8s_version"; @@ -5727,9 +5741,9 @@ rec { }; "mio" = rec { crateName = "mio"; - version = "1.1.1"; + version = "1.2.0"; edition = "2021"; - sha256 = "1z2phpalqbdgihrcjp8y09l3kgq6309jnhnr6h11l9s7mnqcm6x6"; + sha256 = "1hanrh4fwsfkdqdaqfidz48zz1wdix23zwn3r2x78am0garfbdsh"; authors = [ "Carl Lerche " "Thomas de Zeeuw " @@ -5739,17 +5753,7 @@ rec { { name = "libc"; packageId = "libc"; - target = { target, features }: ("hermit" == target."os" or null); - } - { - name = "libc"; - packageId = "libc"; - target = { target, features }: ("wasi" == target."os" or null); - } - { - name = "libc"; - packageId = "libc"; - target = { target, features }: (target."unix" or false); + target = { target, features }: ((target."unix" or false) || ("hermit" == target."os" or null) || ("wasi" == target."os" or null)); } { name = "wasi"; @@ -5875,9 +5879,9 @@ rec { }; "num-conv" = rec { crateName = "num-conv"; - version = "0.2.0"; + version = "0.2.1"; edition = "2021"; - sha256 = "0l4hj7lp8zbb9am4j3p7vlcv47y9bbazinvnxx9zjhiwkibyr5yg"; + sha256 = "0rqrr29brafaa2za352pbmhkk556n7f8z9rrkgmjp1idvdl3fry6"; libName = "num_conv"; authors = [ "Jacob Pratt " @@ -6163,9 +6167,9 @@ rec { }; "opentelemetry-otlp" = rec { crateName = "opentelemetry-otlp"; - version = "0.31.0"; + version = "0.31.1"; edition = "2021"; - sha256 = "1gv3h75z8c0p9b85mbq7f1rgsi18wip1xlfa6g82lkfa5pdnc8vs"; + sha256 = "07zp0b62b9dajnvvcd6j2ppw5zg7wp4ixka9z6fr3bxrrdmcss8z"; libName = "opentelemetry_otlp"; dependencies = [ { @@ -6277,6 +6281,9 @@ rec { "serde_json" = [ "dep:serde_json" ]; "serialize" = [ "serde" "serde_json" ]; "tls" = [ "tonic/tls-ring" ]; + "tls-aws-lc" = [ "tonic/tls-aws-lc" ]; + "tls-provider-agnostic" = [ "tonic/_tls-any" ]; + "tls-ring" = [ "tonic/tls-ring" ]; "tls-roots" = [ "tls" "tonic/tls-native-roots" ]; "tls-webpki-roots" = [ "tls" "tonic/tls-webpki-roots" ]; "tokio" = [ "dep:tokio" ]; @@ -8326,9 +8333,9 @@ rec { }; "rustls-webpki" = rec { crateName = "rustls-webpki"; - version = "0.103.9"; + version = "0.103.10"; edition = "2021"; - sha256 = "0lwg1nnyv7pp2lfwwjhy81bxm233am99jnsp3iymdhd6k8827pyp"; + sha256 = "1vyipcdbazvhl6kyi1m8n0bg98sk25iv12bby2xcly653awb4cyz"; libName = "webpki"; dependencies = [ { @@ -9155,9 +9162,9 @@ rec { }; "simd-adler32" = rec { crateName = "simd-adler32"; - version = "0.3.8"; + version = "0.3.9"; edition = "2018"; - sha256 = "18lx2gdgislabbvlgw5q3j5ssrr77v8kmkrxaanp3liimp2sc873"; + sha256 = "0532ysdwcvzyp2bwpk8qz0hijplcdwpssr5gy5r7qwqqy5z5qgbh"; libName = "simd_adler32"; authors = [ "Marvin Countryman " @@ -9431,7 +9438,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; libName = "stackable_certs"; @@ -9639,7 +9646,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; libName = "stackable_operator"; @@ -9811,7 +9818,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; procMacro = true; @@ -9846,7 +9853,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; libName = "stackable_shared"; @@ -9922,12 +9929,12 @@ rec { }; "stackable-telemetry" = rec { crateName = "stackable-telemetry"; - version = "0.6.2"; + version = "0.6.3"; edition = "2024"; workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; libName = "stackable_telemetry"; @@ -10037,7 +10044,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; libName = "stackable_versioned"; @@ -10081,7 +10088,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; procMacro = true; @@ -10149,7 +10156,7 @@ rec { workspace_member = null; src = pkgs.fetchgit { url = "https://github.com/stackabletech//operator-rs.git"; - rev = "51cfff678845d03b88d17e63d7272bcc293aef47"; + rev = "655e4ffb4aed3f472d9e597b8641c4791da0d4b8"; sha256 = "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd"; }; libName = "stackable_webhook"; @@ -11069,9 +11076,9 @@ rec { }; "toml_datetime" = rec { crateName = "toml_datetime"; - version = "1.0.1+spec-1.1.0"; - edition = "2021"; - sha256 = "1sgk7zc6x187iib7kj1nzn44mp0zrk9hgii69rbar35m3ms0wclv"; + version = "1.1.0+spec-1.1.0"; + edition = "2024"; + sha256 = "13qrb6d5cnsq5gm7b7v081vhddhzx2km51safy1ss0vy65y1l9cp"; dependencies = [ { name = "serde_core"; @@ -11090,9 +11097,9 @@ rec { }; "toml_edit" = rec { crateName = "toml_edit"; - version = "0.25.5+spec-1.1.0"; - edition = "2021"; - sha256 = "1qgjkq687jkdrc3wq4fi95lj6d0bvwqs9xi3d41wx2x28h3a98cc"; + version = "0.25.8+spec-1.1.0"; + edition = "2024"; + sha256 = "0g0zdxh1wawc0v3hch7lpli2admvsww6hzk4y2gpzi463n7z7gqn"; dependencies = [ { name = "indexmap"; @@ -11125,9 +11132,9 @@ rec { }; "toml_parser" = rec { crateName = "toml_parser"; - version = "1.0.10+spec-1.1.0"; - edition = "2021"; - sha256 = "081lsv63zphnff9ssb0yjavcc82sblvj808rvwb4h76kxx5mpwkx"; + version = "1.1.0+spec-1.1.0"; + edition = "2024"; + sha256 = "04a0pfm9hp18mhk2lrm85fkia5ya2f5grf7r9nq7wq33wcgg2d13"; dependencies = [ { name = "winnow"; @@ -12025,9 +12032,9 @@ rec { }; "unicode-segmentation" = rec { crateName = "unicode-segmentation"; - version = "1.12.0"; + version = "1.13.2"; edition = "2018"; - sha256 = "14qla2jfx74yyb9ds3d2mpwpa4l4lzb9z57c6d2ba511458z5k7n"; + sha256 = "135a26m4a0wj319gcw28j6a5aqvz00jmgwgmcs6szgxjf942facn"; libName = "unicode_segmentation"; authors = [ "kwantam " @@ -12240,9 +12247,9 @@ rec { }; "wasm-bindgen" = rec { crateName = "wasm-bindgen"; - version = "0.2.114"; + version = "0.2.116"; edition = "2021"; - sha256 = "13nkhw552hpllrrmkd2x9y4bmcxr82kdpky2n667kqzcq6jzjck5"; + sha256 = "0cdnllyyl4hf87yn5q2b38f4i516hcq14ni1qpl1mc2vgcpqih3x"; libName = "wasm_bindgen"; authors = [ "The wasm-bindgen Developers" @@ -12291,62 +12298,38 @@ rec { }; "wasm-bindgen-futures" = rec { crateName = "wasm-bindgen-futures"; - version = "0.4.64"; + version = "0.4.66"; edition = "2021"; - sha256 = "1f3xnr40wwims4zhvh119dhwmffz4h4x82cffi118ri878mm5ig9"; + sha256 = "01dzgkcngfgxkgc566vpwkn0gjp0cdf0cbznbs4q2hc4w9chja0r"; libName = "wasm_bindgen_futures"; authors = [ "The wasm-bindgen Developers" ]; dependencies = [ - { - name = "cfg-if"; - packageId = "cfg-if"; - } - { - name = "futures-util"; - packageId = "futures-util"; - optional = true; - usesDefaultFeatures = false; - features = [ "std" ]; - } { name = "js-sys"; packageId = "js-sys"; usesDefaultFeatures = false; - } - { - name = "once_cell"; - packageId = "once_cell"; - usesDefaultFeatures = false; + features = [ "futures" ]; } { name = "wasm-bindgen"; packageId = "wasm-bindgen"; usesDefaultFeatures = false; } - { - name = "web-sys"; - packageId = "web-sys"; - usesDefaultFeatures = false; - target = { target, features }: (builtins.elem "atomics" targetFeatures); - features = [ "MessageEvent" "Worker" ]; - } ]; features = { "default" = [ "std" ]; - "futures-core" = [ "dep:futures-core" ]; - "futures-core-03-stream" = [ "futures-core" ]; - "futures-util" = [ "dep:futures-util" ]; - "std" = [ "wasm-bindgen/std" "js-sys/std" "web-sys/std" "futures-util" ]; + "futures-core-03-stream" = [ "js-sys/futures-core-03-stream" ]; + "std" = [ "wasm-bindgen/std" "js-sys/std" ]; }; - resolvedDefaultFeatures = [ "default" "futures-util" "std" ]; + resolvedDefaultFeatures = [ "default" "std" ]; }; "wasm-bindgen-macro" = rec { crateName = "wasm-bindgen-macro"; - version = "0.2.114"; + version = "0.2.116"; edition = "2021"; - sha256 = "1rhq9kkl7n0zjrag9p25xsi4aabpgfkyf02zn4xv6pqhrw7xb8hq"; + sha256 = "0dxm2p00g12vqdbs07kvvpw45pwqqdj2ibfsprfh67g0cqq3v5vm"; procMacro = true; libName = "wasm_bindgen_macro"; authors = [ @@ -12368,9 +12351,9 @@ rec { }; "wasm-bindgen-macro-support" = rec { crateName = "wasm-bindgen-macro-support"; - version = "0.2.114"; + version = "0.2.116"; edition = "2021"; - sha256 = "1qriqqjpn922kv5c7f7627fj823k5aifv06j2gvwsiy5map4rkh3"; + sha256 = "1b4y37fcgfrhm1iscbz76lg85p3l8g0j4wzfrw5rx0b5wx5mxbwi"; libName = "wasm_bindgen_macro_support"; authors = [ "The wasm-bindgen Developers" @@ -12404,10 +12387,10 @@ rec { }; "wasm-bindgen-shared" = rec { crateName = "wasm-bindgen-shared"; - version = "0.2.114"; + version = "0.2.116"; edition = "2021"; links = "wasm_bindgen"; - sha256 = "05lc6w64jxlk4wk8rjci4z61lhx2ams90la27a41gvi3qaw2d8vm"; + sha256 = "0cx6a2qqf15j1y7jgyjgvsnfi651rjcifi8ypwvg60lglw309gy9"; libName = "wasm_bindgen_shared"; authors = [ "The wasm-bindgen Developers" @@ -12422,9 +12405,9 @@ rec { }; "web-sys" = rec { crateName = "web-sys"; - version = "0.3.91"; + version = "0.3.93"; edition = "2021"; - sha256 = "1y91r8f4dy4iqgrr03swdzqffz6wmllrgninp8kgpaq4n5xs2jw5"; + sha256 = "0dxqkz6cx2gxyfx6fwhig90h76mmhq0j12vlaizhb2g1gsind53l"; libName = "web_sys"; authors = [ "The wasm-bindgen Developers" @@ -12914,7 +12897,7 @@ rec { "default" = [ "std" ]; "std" = [ "wasm-bindgen/std" "js-sys/std" ]; }; - resolvedDefaultFeatures = [ "AbortController" "AbortSignal" "Blob" "BlobPropertyBag" "Event" "EventTarget" "File" "FormData" "Headers" "MessageEvent" "ReadableStream" "Request" "RequestCache" "RequestCredentials" "RequestInit" "RequestMode" "Response" "ServiceWorkerGlobalScope" "Window" "Worker" "WorkerGlobalScope" "default" "std" ]; + resolvedDefaultFeatures = [ "AbortController" "AbortSignal" "Blob" "BlobPropertyBag" "EventTarget" "File" "FormData" "Headers" "ReadableStream" "Request" "RequestCache" "RequestCredentials" "RequestInit" "RequestMode" "Response" "ServiceWorkerGlobalScope" "Window" "WorkerGlobalScope" "default" "std" ]; }; "web-time" = rec { crateName = "web-time"; @@ -13721,9 +13704,9 @@ rec { }; "winnow" = rec { crateName = "winnow"; - version = "1.0.0"; + version = "1.0.1"; edition = "2021"; - sha256 = "1n67gx8mg2b6r2z54zwbrb6qsfbdsar1lvafsfaajr3jcvj8h3m9"; + sha256 = "1dbji1bwviy08pl74f2qw2m4w9hc4p3vyl3lfj05jdydy59w1nh9"; dependencies = [ { name = "memchr"; @@ -13911,9 +13894,9 @@ rec { }; "zerocopy" = rec { crateName = "zerocopy"; - version = "0.8.42"; + version = "0.8.48"; edition = "2021"; - sha256 = "1qq50mj06rds2iac197kpkdlvgql1j3vvm82gy5qayladxqqnmzj"; + sha256 = "1sb8plax8jbrsng1jdval7bdhk7hhrx40dz3hwh074k6knzkgm7f"; authors = [ "Joshua Liebow-Feeser " "Jack Wrenn " @@ -13947,9 +13930,9 @@ rec { }; "zerocopy-derive" = rec { crateName = "zerocopy-derive"; - version = "0.8.42"; + version = "0.8.48"; edition = "2021"; - sha256 = "0bx010zlchg4y8xixvkb4c74634j7ypnbpl7cqjdcfsdxacc0v3y"; + sha256 = "1m5s0g92cxggqc74j83k1priz24k3z93sj5gadppd20p9c4cvqvh"; procMacro = true; libName = "zerocopy_derive"; authors = [ diff --git a/crate-hashes.json b/crate-hashes.json index 95c04d16..3bd79703 100644 --- a/crate-hashes.json +++ b/crate-hashes.json @@ -9,7 +9,7 @@ "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator-derive@0.3.1": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-operator@0.108.0": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-shared@0.1.0": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", - "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-telemetry@0.6.2": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", + "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-telemetry@0.6.3": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned-macros@0.8.3": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-versioned@0.8.3": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", "git+https://github.com/stackabletech//operator-rs.git?branch=spike%2Fgeneric-databases#stackable-webhook@0.9.0": "1i18qvsrihmbg2n82686yxmi86g7smdgz3ln5gsvj9c614phb8rd", diff --git a/extra/crds.yaml b/extra/crds.yaml index 3cc97010..15062268 100644 --- a/extra/crds.yaml +++ b/extra/crds.yaml @@ -143,7 +143,7 @@ spec: type: string default: {} description: |- - Additional map of JDBC connection parameters to append to the connection URL. The given + 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 @@ -667,7 +667,7 @@ spec: type: object type: object enableVectorAgent: - description: Wether or not to deploy a container with the Vector log agent. + description: Whether or not to deploy a container with the Vector log agent. nullable: true type: boolean type: object @@ -1108,7 +1108,7 @@ spec: type: object type: object enableVectorAgent: - description: Wether or not to deploy a container with the Vector log agent. + description: Whether or not to deploy a container with the Vector log agent. nullable: true type: boolean type: object diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 1598595f..a2e5f7d1 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -39,7 +39,7 @@ use stackable_operator::{ }, constants::RESTART_CONTROLLER_ENABLED_LABEL, crd::{listener::v1alpha1::Listener, s3}, - databases::drivers::jdbc::JDBCDatabaseConnectionDetails, + database_connections::drivers::jdbc::JdbcDatabaseConnectionDetails, k8s_openapi::{ DeepMerge, api::{ @@ -334,7 +334,7 @@ pub enum Error { #[snafu(display("invalid metadata database connection"))] InvalidMetadataDatabaseConnection { - source: stackable_operator::databases::Error, + source: stackable_operator::database_connections::Error, }, } type Result = std::result::Result; @@ -612,7 +612,7 @@ fn build_metastore_rolegroup_config_map( resolved_product_image: &ResolvedProductImage, rolegroup: &RoleGroupRef, role_group_config: &HashMap>, - database_connection_details: &JDBCDatabaseConnectionDetails, + database_connection_details: &JdbcDatabaseConnectionDetails, s3_connection_spec: Option<&s3::v1alpha1::ConnectionSpec>, merged_config: &MetaStoreConfig, cluster_info: &KubernetesClusterInfo, @@ -811,7 +811,7 @@ fn build_metastore_rolegroup_statefulset( resolved_product_image: &ResolvedProductImage, rolegroup_ref: &RoleGroupRef, metastore_config: &HashMap>, - database_connection_details: &JDBCDatabaseConnectionDetails, + database_connection_details: &JdbcDatabaseConnectionDetails, s3_connection: Option<&s3::v1alpha1::ConnectionSpec>, merged_config: &MetaStoreConfig, sa_name: &str, diff --git a/rust/operator-binary/src/crd/databases.rs b/rust/operator-binary/src/crd/databases.rs index 40265375..7a582900 100644 --- a/rust/operator-binary/src/crd/databases.rs +++ b/rust/operator-binary/src/crd/databases.rs @@ -1,10 +1,10 @@ use serde::{Deserialize, Serialize}; use stackable_operator::{ - databases::{ + database_connections::{ databases::{ derby::DerbyConnection, mysql::MysqlConnection, postgresql::PostgresqlConnection, }, - drivers::jdbc::JDBCDatabaseConnection, + drivers::jdbc::JdbcDatabaseConnection, }, schemars::{self, JsonSchema}, }; @@ -26,11 +26,11 @@ pub enum MetadataDatabaseConnection { Derby(DerbyConnection), // We don't support generic (yet?), as we need to tell the metastore the `--dbtype` on startup, // which is not known for generic connection. - // Generic(GenericJDBCDatabaseConnection), + // Generic(GenericJdbcDatabaseConnection), } impl MetadataDatabaseConnection { - pub fn as_jdbc_database_connection(&self) -> &dyn JDBCDatabaseConnection { + pub fn as_jdbc_database_connection(&self) -> &dyn JdbcDatabaseConnection { match self { Self::Postgresql(p) => p, Self::Mysql(m) => m, From 80b4d422d0acb63e76a9e8d3dafa87998ed98d96 Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Wed, 1 Apr 2026 14:55:04 +0200 Subject: [PATCH 14/14] Impl Deref for MetadataDatabaseConnection --- rust/operator-binary/src/controller.rs | 1 - rust/operator-binary/src/crd/databases.rs | 10 ++++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index a2e5f7d1..68b4344c 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -385,7 +385,6 @@ pub async fn reconcile_hive( .spec .cluster_config .metadata_database - .as_jdbc_database_connection() .jdbc_connection_details("METADATA") .context(InvalidMetadataDatabaseConnectionSnafu)?; diff --git a/rust/operator-binary/src/crd/databases.rs b/rust/operator-binary/src/crd/databases.rs index 7a582900..34d15aee 100644 --- a/rust/operator-binary/src/crd/databases.rs +++ b/rust/operator-binary/src/crd/databases.rs @@ -1,3 +1,5 @@ +use std::ops::Deref; + use serde::{Deserialize, Serialize}; use stackable_operator::{ database_connections::{ @@ -29,15 +31,19 @@ pub enum MetadataDatabaseConnection { // Generic(GenericJdbcDatabaseConnection), } -impl MetadataDatabaseConnection { - pub fn as_jdbc_database_connection(&self) -> &dyn JdbcDatabaseConnection { +impl Deref for MetadataDatabaseConnection { + type Target = dyn JdbcDatabaseConnection; + + fn deref(&self) -> &Self::Target { match self { Self::Postgresql(p) => p, Self::Mysql(m) => m, Self::Derby(d) => d, } } +} +impl MetadataDatabaseConnection { /// Name of the database as it should be passed using the `--db-type` CLI argument to Hive pub fn as_hive_db_type(&self) -> &str { match self {