From 83fd30396a0b5f58f80156791b7ac9d3b191a92a Mon Sep 17 00:00:00 2001 From: Techassi Date: Mon, 16 Oct 2023 13:10:04 +0200 Subject: [PATCH] Bump operator-rs to 0.55.0 --- Cargo.lock | 8 ++-- Cargo.toml | 2 +- .../superset-operator/configs/properties.yaml | 22 ++++++++++ deploy/helm/superset-operator/crds/crds.yaml | 40 ++++++++++++++----- rust/crd/src/lib.rs | 10 ++--- .../src/druid_connection_controller.rs | 2 +- .../src/superset_controller.rs | 2 +- 7 files changed, 63 insertions(+), 23 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c1b4efa6..605fc61e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1782,8 +1782,8 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "stackable-operator" -version = "0.54.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=0.54.0#76b8b18089bda1d0ab5c399b4f165019a37f24e0" +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.54.0" -source = "git+https://github.com/stackabletech/operator-rs.git?tag=0.54.0#76b8b18089bda1d0ab5c399b4f165019a37f24e0" +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 982ae0bc..4b98f2a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,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.54.0" } +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" diff --git a/deploy/helm/superset-operator/configs/properties.yaml b/deploy/helm/superset-operator/configs/properties.yaml index ad91cf1f..35ac7ca1 100644 --- a/deploy/helm/superset-operator/configs/properties.yaml +++ b/deploy/helm/superset-operator/configs/properties.yaml @@ -33,3 +33,25 @@ properties: required: false asOfVersion: "0.0.0" description: "Row limit when requesting chart data. Corresponds to ROW_LIMIT" + - property: &webserverTimeout + propertyNames: + - name: "SUPERSET_WEBSERVER_TIMEOUT" + kind: + type: "file" + file: "superset_config.py" + datatype: + type: "integer" + defaultValues: + - fromVersion: "0.0.0" + value: "60" # 1 min + recommendedValues: + # The default timeout of Superset is 60s which is way to low when querying "big data" systems. + # Especially Trino queries often take longer. + # see [the Superset docs](https://superset.apache.org/docs/frequently-asked-questions#why-are-my-queries-timing-out). + - fromVersion: "0.0.0" + value: "300" # 5 min + roles: + - name: "node" + required: true + asOfVersion: "0.0.0" + description: "Maximum number of seconds a Superset request can take before timing out. This settings effect the maximum duration a query to an underlying datasource can take. If you get timeout errors before your query returns the result you can need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT" diff --git a/deploy/helm/superset-operator/crds/crds.yaml b/deploy/helm/superset-operator/crds/crds.yaml index c7b6928d..9237f2da 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,11 +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. See https://docs.stackable.tech/home/nightly/concepts/duration for more information on the duration format + 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. See https://docs.stackable.tech/home/nightly/concepts/duration for more information on the duration format. nullable: true type: string type: object @@ -4071,6 +4081,7 @@ spec: default: enableVectorAgent: null containers: {} + description: Logging configuration properties: containers: additionalProperties: @@ -4078,13 +4089,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 @@ -4100,14 +4112,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 @@ -4121,9 +4135,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 @@ -4136,10 +4151,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 @@ -4152,6 +4170,7 @@ spec: min: null max: null storage: {} + description: CPU and memory limits for Superset pods properties: cpu: default: @@ -4180,11 +4199,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. See https://docs.stackable.tech/home/nightly/concepts/duration for more information on the duration format + 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. See https://docs.stackable.tech/home/nightly/concepts/duration for more information on the duration format. nullable: true type: string type: object diff --git a/rust/crd/src/lib.rs b/rust/crd/src/lib.rs index 6e38a21f..c1736bc4 100644 --- a/rust/crd/src/lib.rs +++ b/rust/crd/src/lib.rs @@ -17,7 +17,6 @@ use stackable_operator::{ }, }, config::{fragment, fragment::Fragment, fragment::ValidationError, merge::Merge}, - duration::Duration, k8s_openapi::apimachinery::pkg::api::resource::Quantity, kube::{runtime::reflector::ObjectRef, CustomResource, ResourceExt}, memory::{BinaryMultiple, MemoryQuantity}, @@ -27,6 +26,7 @@ use stackable_operator::{ role_utils::{GenericRoleConfig, Role, RoleGroup, RoleGroupRef}, schemars::{self, JsonSchema}, status::condition::{ClusterCondition, HasStatusCondition}, + time::Duration, }; use std::collections::BTreeMap; use strum::{Display, EnumIter, EnumString, IntoEnumIterator}; @@ -299,11 +299,9 @@ pub struct SupersetConfig { /// 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. - #[fragment_attrs(schemars( - description = "Maximum time period a Superset request can take before timing out. See https://docs.stackable.tech/home/nightly/concepts/duration for more information on the duration format" - ))] + /// you may need to increase this timeout. Corresponds to SUPERSET_WEBSERVER_TIMEOUT. + /// See https://docs.stackable.tech/home/nightly/concepts/duration for more + /// information on the duration format. pub webserver_timeout: Option, /// CPU and memory limits for Superset pods diff --git a/rust/operator-binary/src/druid_connection_controller.rs b/rust/operator-binary/src/druid_connection_controller.rs index f68caea2..30e3ec5e 100644 --- a/rust/operator-binary/src/druid_connection_controller.rs +++ b/rust/operator-binary/src/druid_connection_controller.rs @@ -6,7 +6,6 @@ use stackable_operator::{ builder::{ContainerBuilder, ObjectMetaBuilder, PodSecurityContextBuilder}, client::Client, commons::product_image_selection::ResolvedProductImage, - duration::Duration, k8s_openapi::api::{ batch::v1::{Job, JobSpec}, core::v1::{ConfigMap, PodSpec, PodTemplateSpec}, @@ -18,6 +17,7 @@ use stackable_operator::{ }, logging::controller::ReconcilerError, status::condition::{ClusterConditionStatus, ClusterConditionType}, + time::Duration, }; use stackable_superset_crd::{ druidconnection::{DruidConnection, DruidConnectionStatus, DruidConnectionStatusCondition}, diff --git a/rust/operator-binary/src/superset_controller.rs b/rust/operator-binary/src/superset_controller.rs index 170b8745..d2636063 100644 --- a/rust/operator-binary/src/superset_controller.rs +++ b/rust/operator-binary/src/superset_controller.rs @@ -23,7 +23,6 @@ use stackable_operator::{ authentication::AuthenticationClassProvider, product_image_selection::ResolvedProductImage, rbac::build_rbac_resources, }, - duration::Duration, k8s_openapi::{ api::{ apps::v1::{StatefulSet, StatefulSetSpec}, @@ -47,6 +46,7 @@ use stackable_operator::{ compute_conditions, operations::ClusterOperationsConditionBuilder, statefulset::StatefulSetConditionBuilder, }, + time::Duration, }; use stackable_superset_crd::{ authentication::SuperSetAuthenticationConfigResolved, Container, SupersetCluster,