From 10a3ebd73afe040f0f0223286b7f7abb6a24d74d Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Mon, 16 Oct 2023 13:12:50 +0200 Subject: [PATCH 01/13] bump vector aggregator --- .../kuttl/logging/01-install-superset-vector-aggregator.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/templates/kuttl/logging/01-install-superset-vector-aggregator.yaml b/tests/templates/kuttl/logging/01-install-superset-vector-aggregator.yaml index c8578918..2a6ea73b 100644 --- a/tests/templates/kuttl/logging/01-install-superset-vector-aggregator.yaml +++ b/tests/templates/kuttl/logging/01-install-superset-vector-aggregator.yaml @@ -5,7 +5,7 @@ commands: - script: >- helm install superset-vector-aggregator vector --namespace $NAMESPACE - --version 0.23.0 + --version 0.26.0 --repo https://helm.vector.dev --values superset-vector-aggregator-values.yaml --- From 1ee763bab7982029ba52d73383fea3e6e210071f Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Mon, 16 Oct 2023 13:13:00 +0200 Subject: [PATCH 02/13] bump operator-rs to 0.55.0 --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6c0e07e8..605fc61e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1782,8 +1782,8 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "stackable-operator" -version = "0.52.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=0.52.1#18af9be0473cd6c30d7426e9ade74c90e4abce22" +version = "0.55.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=0.55.0#bfbc23d3819f815413cb4135e0835acd76aecf97" dependencies = [ "chrono", "clap", @@ -1816,8 +1816,8 @@ dependencies = [ [[package]] name = "stackable-operator-derive" -version = "0.52.1" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=0.52.1#18af9be0473cd6c30d7426e9ade74c90e4abce22" +version = "0.55.0" +source = "git+https://github.com/stackabletech/operator-rs.git?tag=0.55.0#bfbc23d3819f815413cb4135e0835acd76aecf97" dependencies = [ "darling 0.20.3", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index b6181e21..d0d43e1f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,7 +21,7 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" serde_yaml = "0.9" snafu = "0.7" -stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.52.1" } +stackable-operator = { git = "https://github.com/stackabletech/operator-rs.git", tag = "0.55.0" } strum = { version = "0.25", features = ["derive"] } tokio = { version = "1.29", features = ["full"] } tracing = "0.1" From 3a1d09fbdb427ae11b993f7e06386331ac001927 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Mon, 16 Oct 2023 13:13:07 +0200 Subject: [PATCH 03/13] regenerate charts --- deploy/helm/superset-operator/crds/crds.yaml | 38 +++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/deploy/helm/superset-operator/crds/crds.yaml b/deploy/helm/superset-operator/crds/crds.yaml index d34bf75f..5a20e83c 100644 --- a/deploy/helm/superset-operator/crds/crds.yaml +++ b/deploy/helm/superset-operator/crds/crds.yaml @@ -633,6 +633,7 @@ spec: default: enableVectorAgent: null containers: {} + description: Logging configuration properties: containers: additionalProperties: @@ -640,13 +641,14 @@ spec: - required: - custom - {} - description: Fragment derived from `ContainerLogConfigChoice` + description: Log configuration of the container properties: console: + description: Configuration for the console appender nullable: true properties: level: - description: Log levels + description: The log level threshold. Log events with a lower log level are discarded. enum: - TRACE - DEBUG @@ -662,14 +664,16 @@ spec: description: Custom log configuration provided in a ConfigMap properties: configMap: + description: ConfigMap containing the log configuration files nullable: true type: string type: object file: + description: Configuration for the file appender nullable: true properties: level: - description: Log levels + description: The log level threshold. Log events with a lower log level are discarded. enum: - TRACE - DEBUG @@ -683,9 +687,10 @@ spec: type: object loggers: additionalProperties: + description: Configuration of a logger properties: level: - description: Log levels + description: The log level threshold. Log events with a lower log level are discarded. enum: - TRACE - DEBUG @@ -698,10 +703,13 @@ spec: type: string type: object default: {} + description: Configuration per logger type: object type: object + description: Log configuration per container type: object enableVectorAgent: + description: Wether or not to deploy a container with the Vector log agent nullable: true type: boolean type: object @@ -714,6 +722,7 @@ spec: min: null max: null storage: {} + description: CPU and memory limits for Superset pods properties: cpu: default: @@ -742,10 +751,12 @@ spec: type: object type: object rowLimit: + description: Row limit when requesting chart data. Corresponds to ROW_LIMIT format: int32 nullable: true type: integer webserverTimeout: + description: Maximum number of seconds a Superset request can take before timing out. This setting affects the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you may need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT format: uint32 minimum: 0.0 nullable: true @@ -4072,6 +4083,7 @@ spec: default: enableVectorAgent: null containers: {} + description: Logging configuration properties: containers: additionalProperties: @@ -4079,13 +4091,14 @@ spec: - required: - custom - {} - description: Fragment derived from `ContainerLogConfigChoice` + description: Log configuration of the container properties: console: + description: Configuration for the console appender nullable: true properties: level: - description: Log levels + description: The log level threshold. Log events with a lower log level are discarded. enum: - TRACE - DEBUG @@ -4101,14 +4114,16 @@ spec: description: Custom log configuration provided in a ConfigMap properties: configMap: + description: ConfigMap containing the log configuration files nullable: true type: string type: object file: + description: Configuration for the file appender nullable: true properties: level: - description: Log levels + description: The log level threshold. Log events with a lower log level are discarded. enum: - TRACE - DEBUG @@ -4122,9 +4137,10 @@ spec: type: object loggers: additionalProperties: + description: Configuration of a logger properties: level: - description: Log levels + description: The log level threshold. Log events with a lower log level are discarded. enum: - TRACE - DEBUG @@ -4137,10 +4153,13 @@ spec: type: string type: object default: {} + description: Configuration per logger type: object type: object + description: Log configuration per container type: object enableVectorAgent: + description: Wether or not to deploy a container with the Vector log agent nullable: true type: boolean type: object @@ -4153,6 +4172,7 @@ spec: min: null max: null storage: {} + description: CPU and memory limits for Superset pods properties: cpu: default: @@ -4181,10 +4201,12 @@ spec: type: object type: object rowLimit: + description: Row limit when requesting chart data. Corresponds to ROW_LIMIT format: int32 nullable: true type: integer webserverTimeout: + description: Maximum number of seconds a Superset request can take before timing out. This setting affects the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you may need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT format: uint32 minimum: 0.0 nullable: true From 5dd62d0c4065f64751a0dea2f64aca6bdce075d0 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Mon, 16 Oct 2023 13:13:51 +0200 Subject: [PATCH 04/13] adapt test versions --- tests/test-definition.yaml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index 140cfd1d..08b10e4a 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -6,14 +6,12 @@ dimensions: - name: superset values: - - 1.3.2 - - 1.4.2 - - 1.5.3 - - 2.0.1 - 2.1.0 + - 2.1.1 + - 3.0.0 - name: superset-latest values: - - 2.1.0 + - 3.0.0 - name: ldap-authentication values: - no-tls From 1ff9599f13e912509baae5611337278de28529c9 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Mon, 16 Oct 2023 13:17:34 +0200 Subject: [PATCH 05/13] bump examples and docs --- .../getting_started/superset-load-examples-job.yaml | 2 +- .../getting_started/superset-load-examples-job.yaml.j2 | 2 +- .../superset/examples/getting_started/superset.yaml | 2 +- docs/modules/superset/pages/usage-guide/security.adoc | 4 ++-- docs/modules/superset/partials/supported-versions.adoc | 8 +++----- examples/superset-with-ldap.yaml | 2 +- rust/crd/src/affinity.rs | 4 ++-- 7 files changed, 11 insertions(+), 13 deletions(-) diff --git a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml index 9dff8c0a..22bfa22a 100644 --- a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml +++ b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml @@ -13,7 +13,7 @@ spec: name: config containers: - name: superset - image: docker.stackable.tech/stackable/superset:2.1.0-stackable0.0.0-dev + image: docker.stackable.tech/stackable/superset:3.0.0-stackable0.0.0-dev command: [ "/bin/sh", "-c", diff --git a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 index 1b4c4013..ddd2c0c3 100644 --- a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 +++ b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 @@ -13,7 +13,7 @@ spec: name: config containers: - name: superset - image: docker.stackable.tech/stackable/superset:2.1.0-stackable{{ versions.superset }} + image: docker.stackable.tech/stackable/superset:3.0.0-stackable{{ versions.superset }} command: [ "/bin/sh", "-c", diff --git a/docs/modules/superset/examples/getting_started/superset.yaml b/docs/modules/superset/examples/getting_started/superset.yaml index c9d1930a..48a93c20 100644 --- a/docs/modules/superset/examples/getting_started/superset.yaml +++ b/docs/modules/superset/examples/getting_started/superset.yaml @@ -5,7 +5,7 @@ metadata: name: simple-superset spec: image: - productVersion: 2.1.0 + productVersion: 3.0.0 clusterConfig: credentialsSecret: simple-superset-credentials listenerClass: external-unstable diff --git a/docs/modules/superset/pages/usage-guide/security.adoc b/docs/modules/superset/pages/usage-guide/security.adoc index bd35e2a9..caa0d920 100644 --- a/docs/modules/superset/pages/usage-guide/security.adoc +++ b/docs/modules/superset/pages/usage-guide/security.adoc @@ -19,7 +19,7 @@ metadata: name: superset-with-ldap-server spec: image: - productVersion: 2.1.0 + productVersion: 3.0.0 clusterConfig: authentication: - authenticationClass: ldap # <1> @@ -48,7 +48,7 @@ metadata: name: superset-with-oauth spec: image: - productVersion: 2.1.0 + productVersion: 3.0.0 [...] nodes: configOverrides: diff --git a/docs/modules/superset/partials/supported-versions.adoc b/docs/modules/superset/partials/supported-versions.adoc index 0987da8e..28e9ca2b 100644 --- a/docs/modules/superset/partials/supported-versions.adoc +++ b/docs/modules/superset/partials/supported-versions.adoc @@ -2,8 +2,6 @@ // This is a separate file, since it is used by both the direct Superset documentation, and the overarching // Stackable Platform documentation. -- 1.3.2 -- 1.4.1, 1.4.2 -- 1.5.1, 1.5.3 -- 2.0.1 -- 2.1.0 +- 3.0.0 +- 2.1.1 +- 2.1.0 (deprecated) diff --git a/examples/superset-with-ldap.yaml b/examples/superset-with-ldap.yaml index ae3bec93..be4b0285 100644 --- a/examples/superset-with-ldap.yaml +++ b/examples/superset-with-ldap.yaml @@ -149,7 +149,7 @@ metadata: name: superset-with-ldap-server-veri-tls spec: image: - productVersion: 2.1.0 + productVersion: 3.0.0 clusterConfig: authentication: - authenticationClass: superset-with-ldap-server-veri-tls-ldap diff --git a/rust/crd/src/affinity.rs b/rust/crd/src/affinity.rs index 9a3fdc50..2d5efc58 100644 --- a/rust/crd/src/affinity.rs +++ b/rust/crd/src/affinity.rs @@ -46,7 +46,7 @@ mod tests { name: simple-superset spec: image: - productVersion: 2.1.0 + productVersion: 3.0.0 credentialsSecret: simple-superset-credentials nodes: roleGroups: @@ -107,7 +107,7 @@ mod tests { name: simple-superset spec: image: - productVersion: 2.1.0 + productVersion: 3.0.0 credentialsSecret: simple-superset-credentials nodes: roleGroups: From 20ddfadb810a523e6fe02bcb6cb1d5ce8fbec2e8 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Mon, 16 Oct 2023 13:27:53 +0200 Subject: [PATCH 06/13] adapted changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c9fd28f..4ab4c726 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Default stackableVersion to operator version ([#390]). - Support PodDisruptionBudgets ([#407]). +- Added support for versions 2.1.1, 3.0.0 ([#415]). ### Changed @@ -17,11 +18,16 @@ - BREAKING: Rename Service port name from `superset` to `http` for consistency reasons. This change should normally not be breaking, as we only change the name, not the port. However, there might be some e.g. Ingresses that rely on the port name and need to be updated ([#394]). +### Removed + +- Removed support for versions 1.3.2, 1.4.1, 1.4.2, 1.5.1, 1.5.3, 2.0.1 ([#415]). + [#390]: https://github.com/stackabletech/superset-operator/pull/390 [#391]: https://github.com/stackabletech/superset-operator/pull/391 [#394]: https://github.com/stackabletech/superset-operator/pull/394 [#396]: https://github.com/stackabletech/superset-operator/pull/396 [#407]: https://github.com/stackabletech/superset-operator/pull/407 +[#415]: https://github.com/stackabletech/superset-operator/pull/415 ## [23.7.0] - 2023-07-14 From 76e45cd3f8290e252772be5509922006997325b8 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Wed, 18 Oct 2023 09:43:20 +0200 Subject: [PATCH 07/13] adapted changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ab4c726..a4260e84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,8 +10,8 @@ ### Changed -- `vector` `0.26.0` -> `0.31.0` ([#391]). -- `operator-rs` `0.44.0` -> `0.52.1` ([#390], [#407]). +- `vector` `0.26.0` -> `0.33.0` ([#391], [#415]). +- `operator-rs` `0.44.0` -> `0.55.0` ([#390], [#407], [#415]). - BREAKING: Removed SupersetDB object, since it created some problems when reinstalling or upgrading a Superset cluster. Instead, the initialization of the database was moved to the startup phase of each Superset pod. To make sure the initialization does not run in parallel, the `PodManagementPolicy` was set to `OrderedReady` and liveness/readiness probes were added. The `.spec.clusterConfig.loadExamplesOnInit` option was removed from the CRD, because loading the examples at every startup caused problems in certain scenarios, e.g. after an upgrade from Superset 1.5.3 to 2.1.0 ([#396]). ### Fixed From 1a01e27c2ebc98cb8c8d3c33a50c43b090e323b8 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Thu, 19 Oct 2023 12:43:36 +0200 Subject: [PATCH 08/13] bump to 3.0.1 --- .../examples/getting_started/superset-load-examples-job.yaml | 2 +- .../getting_started/superset-load-examples-job.yaml.j2 | 2 +- docs/modules/superset/examples/getting_started/superset.yaml | 2 +- docs/modules/superset/pages/usage-guide/security.adoc | 4 ++-- docs/modules/superset/partials/supported-versions.adoc | 2 +- examples/superset-with-ldap.yaml | 2 +- rust/crd/src/affinity.rs | 4 ++-- tests/test-definition.yaml | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml index 22bfa22a..d99e8b16 100644 --- a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml +++ b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml @@ -13,7 +13,7 @@ spec: name: config containers: - name: superset - image: docker.stackable.tech/stackable/superset:3.0.0-stackable0.0.0-dev + image: docker.stackable.tech/stackable/superset:3.0.1-stackable0.0.0-dev command: [ "/bin/sh", "-c", diff --git a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 index ddd2c0c3..4f339cf6 100644 --- a/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 +++ b/docs/modules/superset/examples/getting_started/superset-load-examples-job.yaml.j2 @@ -13,7 +13,7 @@ spec: name: config containers: - name: superset - image: docker.stackable.tech/stackable/superset:3.0.0-stackable{{ versions.superset }} + image: docker.stackable.tech/stackable/superset:3.0.1-stackable{{ versions.superset }} command: [ "/bin/sh", "-c", diff --git a/docs/modules/superset/examples/getting_started/superset.yaml b/docs/modules/superset/examples/getting_started/superset.yaml index 48a93c20..e618eb06 100644 --- a/docs/modules/superset/examples/getting_started/superset.yaml +++ b/docs/modules/superset/examples/getting_started/superset.yaml @@ -5,7 +5,7 @@ metadata: name: simple-superset spec: image: - productVersion: 3.0.0 + productVersion: 3.0.1 clusterConfig: credentialsSecret: simple-superset-credentials listenerClass: external-unstable diff --git a/docs/modules/superset/pages/usage-guide/security.adoc b/docs/modules/superset/pages/usage-guide/security.adoc index caa0d920..d77086a3 100644 --- a/docs/modules/superset/pages/usage-guide/security.adoc +++ b/docs/modules/superset/pages/usage-guide/security.adoc @@ -19,7 +19,7 @@ metadata: name: superset-with-ldap-server spec: image: - productVersion: 3.0.0 + productVersion: 3.0.1 clusterConfig: authentication: - authenticationClass: ldap # <1> @@ -48,7 +48,7 @@ metadata: name: superset-with-oauth spec: image: - productVersion: 3.0.0 + productVersion: 3.0.1 [...] nodes: configOverrides: diff --git a/docs/modules/superset/partials/supported-versions.adoc b/docs/modules/superset/partials/supported-versions.adoc index 28e9ca2b..f6283c40 100644 --- a/docs/modules/superset/partials/supported-versions.adoc +++ b/docs/modules/superset/partials/supported-versions.adoc @@ -2,6 +2,6 @@ // This is a separate file, since it is used by both the direct Superset documentation, and the overarching // Stackable Platform documentation. -- 3.0.0 +- 3.0.1 - 2.1.1 - 2.1.0 (deprecated) diff --git a/examples/superset-with-ldap.yaml b/examples/superset-with-ldap.yaml index be4b0285..7375ff37 100644 --- a/examples/superset-with-ldap.yaml +++ b/examples/superset-with-ldap.yaml @@ -149,7 +149,7 @@ metadata: name: superset-with-ldap-server-veri-tls spec: image: - productVersion: 3.0.0 + productVersion: 3.0.1 clusterConfig: authentication: - authenticationClass: superset-with-ldap-server-veri-tls-ldap diff --git a/rust/crd/src/affinity.rs b/rust/crd/src/affinity.rs index 2d5efc58..5a508e11 100644 --- a/rust/crd/src/affinity.rs +++ b/rust/crd/src/affinity.rs @@ -46,7 +46,7 @@ mod tests { name: simple-superset spec: image: - productVersion: 3.0.0 + productVersion: 3.0.1 credentialsSecret: simple-superset-credentials nodes: roleGroups: @@ -107,7 +107,7 @@ mod tests { name: simple-superset spec: image: - productVersion: 3.0.0 + productVersion: 3.0.1 credentialsSecret: simple-superset-credentials nodes: roleGroups: diff --git a/tests/test-definition.yaml b/tests/test-definition.yaml index 08b10e4a..b9673b43 100644 --- a/tests/test-definition.yaml +++ b/tests/test-definition.yaml @@ -8,10 +8,10 @@ dimensions: values: - 2.1.0 - 2.1.1 - - 3.0.0 + - 3.0.1 - name: superset-latest values: - - 3.0.0 + - 3.0.1 - name: ldap-authentication values: - no-tls From 81c1ba6c5631ed14f8e8397914d2c33e8ad5c223 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Thu, 19 Oct 2023 12:43:48 +0200 Subject: [PATCH 09/13] set TALISMAN_ENABLED to false --- rust/operator-binary/src/superset_controller.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rust/operator-binary/src/superset_controller.rs b/rust/operator-binary/src/superset_controller.rs index a1ccad9e..ae257829 100644 --- a/rust/operator-binary/src/superset_controller.rs +++ b/rust/operator-binary/src/superset_controller.rs @@ -437,6 +437,14 @@ fn build_rolegroup_config_map( config::add_superset_config(&mut config, authentication_config); + // TODO: this is true per default for versions 3.0.0 and up. + // We deactivate it here to keep existing functionality. + // However this is a security issue and should be configured properly + // Issue: https://github.com/stackabletech/superset-operator/issues/416 + // See: https://github.com/apache/superset/pull/24262 + // See: https://superset.apache.org/docs/security/#content-security-policy-csp + config.insert("TALISMAN_ENABLED".to_string(), "False".to_string()); + let mut config_file = Vec::new(); flask_app_config_writer::write::( &mut config_file, From 2839c67f5faea6f0893246993906cdbcdd635c49 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Thu, 19 Oct 2023 12:45:33 +0200 Subject: [PATCH 10/13] adapted changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4260e84..287ac2a2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ - Default stackableVersion to operator version ([#390]). - Support PodDisruptionBudgets ([#407]). -- Added support for versions 2.1.1, 3.0.0 ([#415]). +- Added support for versions 2.1.1, 3.0.1 ([#415]). ### Changed From 736716ba452c0c725bd2b888db4a510846357a5d Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Fri, 20 Oct 2023 10:15:54 +0200 Subject: [PATCH 11/13] preserve overrides --- .../src/superset_controller.rs | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/rust/operator-binary/src/superset_controller.rs b/rust/operator-binary/src/superset_controller.rs index ae257829..0fe24fef 100644 --- a/rust/operator-binary/src/superset_controller.rs +++ b/rust/operator-binary/src/superset_controller.rs @@ -428,27 +428,31 @@ fn build_rolegroup_config_map( logging: &Logging, vector_aggregator_address: Option<&str>, ) -> Result { - let mut config = rolegroup_config - .get(&PropertyNameKind::File( - SUPERSET_CONFIG_FILENAME.to_string(), - )) - .cloned() - .unwrap_or_default(); - - config::add_superset_config(&mut config, authentication_config); + let mut config_properties = BTreeMap::new(); // TODO: this is true per default for versions 3.0.0 and up. // We deactivate it here to keep existing functionality. // However this is a security issue and should be configured properly // Issue: https://github.com/stackabletech/superset-operator/issues/416 - // See: https://github.com/apache/superset/pull/24262 - // See: https://superset.apache.org/docs/security/#content-security-policy-csp - config.insert("TALISMAN_ENABLED".to_string(), "False".to_string()); + config_properties.insert("TALISMAN_ENABLED".to_string(), "False".to_string()); + + config::add_superset_config(&mut config_properties, authentication_config); + + // The order here should be kept in order to preserve overrides. + // No properties should be added after this extend. + config_properties.extend( + rolegroup_config + .get(&PropertyNameKind::File( + SUPERSET_CONFIG_FILENAME.to_string(), + )) + .cloned() + .unwrap_or_default(), + ); let mut config_file = Vec::new(); flask_app_config_writer::write::( &mut config_file, - config.iter(), + config_properties.iter(), PYTHON_IMPORTS, ) .with_context(|_| BuildRoleGroupConfigFileSnafu { From 5771b21575c735dabac74fdd3693bb161416a5e3 Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Fri, 20 Oct 2023 10:17:40 +0200 Subject: [PATCH 12/13] merged and regenerated charts --- deploy/helm/superset-operator/crds/crds.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/deploy/helm/superset-operator/crds/crds.yaml b/deploy/helm/superset-operator/crds/crds.yaml index 5a20e83c..58367815 100644 --- a/deploy/helm/superset-operator/crds/crds.yaml +++ b/deploy/helm/superset-operator/crds/crds.yaml @@ -751,12 +751,12 @@ spec: type: object type: object rowLimit: - description: Row limit when requesting chart data. Corresponds to ROW_LIMIT + description: Row limit when requesting chart data. Corresponds to ROW_LIMIT. format: int32 nullable: true type: integer webserverTimeout: - description: Maximum number of seconds a Superset request can take before timing out. This setting affects the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you may need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT + description: Maximum time period a Superset request can take before timing out. This setting affects the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you may need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT. format: uint32 minimum: 0.0 nullable: true @@ -4201,12 +4201,12 @@ spec: type: object type: object rowLimit: - description: Row limit when requesting chart data. Corresponds to ROW_LIMIT + description: Row limit when requesting chart data. Corresponds to ROW_LIMIT. format: int32 nullable: true type: integer webserverTimeout: - description: Maximum number of seconds a Superset request can take before timing out. This setting affects the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you may need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT + description: Maximum time period a Superset request can take before timing out. This setting affects the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you may need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT. format: uint32 minimum: 0.0 nullable: true From 3898b6e147fb148918e8be0c28caa9c8fccfa2da Mon Sep 17 00:00:00 2001 From: Malte Sander Date: Fri, 20 Oct 2023 10:21:08 +0200 Subject: [PATCH 13/13] mention override fix in changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 287ac2a2..94a0a8a0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ ### Fixed - BREAKING: Rename Service port name from `superset` to `http` for consistency reasons. This change should normally not be breaking, as we only change the name, not the port. However, there might be some e.g. Ingresses that rely on the port name and need to be updated ([#394]). +- Fixed config override support ([#415]). ### Removed