diff --git a/CHANGELOG.md b/CHANGELOG.md index 6a487685..08ef213e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,16 @@ All notable changes to this project will be documented in this file. - Use `json` file extension for log files ([#733]). - Fix a bug where changes to ConfigMaps that are referenced in the TrinoCluster spec didn't trigger a reconciliation ([#734]). +- BREAKING: The PersistentVolumeClaims for coordinator and workers have been removed ([#769]) + - They caused problems, as Trino kept it's process ID in `/stackable/data/var/run/launcher.pid`. + A forceful stop (e.g. OOMKilled) could result in a leftover PID in this file. + In this case Trino would refuse startup with `trino ERROR: already running as 21`. + As the PersistentVolumeClaims didn't store any actual data, they have been removed. + - Upgrading will result in the error message `Failed to reconcile object [...]: Forbidden: updates to statefulset spec for fields other than [...] are forbidden` + as Kubernetes currently does not allow changing the `volumeClaimTemplates` field. Simply delete the mentioned StatefulSet, the operator will re-create it. + - You might want to clean up now useless PVCs. + Tip: You can list all Trino-related PVCs using `kubectl get pvc -l app.kubernetes.io/name=trino`. + - The `.spec.(coordinators|workers).config.resources.storage.data` field has been removed, as it's not needed anymore. ### Removed @@ -58,6 +68,7 @@ All notable changes to this project will be documented in this file. [#755]: https://github.com/stackabletech/trino-operator/pull/755 [#760]: https://github.com/stackabletech/trino-operator/pull/760 [#766]: https://github.com/stackabletech/trino-operator/pull/766 +[#769]: https://github.com/stackabletech/trino-operator/pull/769 ## [25.3.0] - 2025-03-21 diff --git a/deploy/helm/trino-operator/crds/crds.yaml b/deploy/helm/trino-operator/crds/crds.yaml index 887ababd..e80f6833 100644 --- a/deploy/helm/trino-operator/crds/crds.yaml +++ b/deploy/helm/trino-operator/crds/crds.yaml @@ -295,9 +295,7 @@ spec: memory: limit: null runtimeLimits: {} - storage: - data: - capacity: null + storage: {} description: Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any. properties: cpu: @@ -325,50 +323,6 @@ spec: type: object type: object storage: - properties: - data: - default: - capacity: null - properties: - capacity: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - selectors: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. - nullable: true - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClass: - nullable: true - type: string - type: object type: object type: object type: object @@ -602,9 +556,7 @@ spec: memory: limit: null runtimeLimits: {} - storage: - data: - capacity: null + storage: {} description: Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any. properties: cpu: @@ -632,50 +584,6 @@ spec: type: object type: object storage: - properties: - data: - default: - capacity: null - properties: - capacity: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - selectors: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. - nullable: true - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClass: - nullable: true - type: string - type: object type: object type: object type: object @@ -933,9 +841,7 @@ spec: memory: limit: null runtimeLimits: {} - storage: - data: - capacity: null + storage: {} description: Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any. properties: cpu: @@ -963,50 +869,6 @@ spec: type: object type: object storage: - properties: - data: - default: - capacity: null - properties: - capacity: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - selectors: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. - nullable: true - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClass: - nullable: true - type: string - type: object type: object type: object type: object @@ -1235,9 +1097,7 @@ spec: memory: limit: null runtimeLimits: {} - storage: - data: - capacity: null + storage: {} description: Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any. properties: cpu: @@ -1265,50 +1125,6 @@ spec: type: object type: object storage: - properties: - data: - default: - capacity: null - properties: - capacity: - description: "Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.\n\nThe serialization format is:\n\n``` ::= \n\n\t(Note that may be empty, from the \"\" case in .)\n\n ::= 0 | 1 | ... | 9 ::= | ::= | . | . | . ::= \"+\" | \"-\" ::= | ::= | | ::= Ki | Mi | Gi | Ti | Pi | Ei\n\n\t(International System of units; See: http://physics.nist.gov/cuu/Units/binary.html)\n\n ::= m | \"\" | k | M | G | T | P | E\n\n\t(Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)\n\n ::= \"e\" | \"E\" ```\n\nNo matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.\n\nWhen a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.\n\nBefore serializing, Quantity will be put in \"canonical form\". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:\n\n- No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.\n\nThe sign will be omitted unless the number is negative.\n\nExamples:\n\n- 1.5 will be serialized as \"1500m\" - 1.5Gi will be serialized as \"1536Mi\"\n\nNote that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.\n\nNon-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)\n\nThis format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation." - nullable: true - type: string - selectors: - description: A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects. - nullable: true - properties: - matchExpressions: - description: matchExpressions is a list of label selector requirements. The requirements are ANDed. - items: - description: A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values. - properties: - key: - description: key is the label key that the selector applies to. - type: string - operator: - description: operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist. - type: string - values: - description: values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch. - items: - type: string - type: array - required: - - key - - operator - type: object - type: array - matchLabels: - additionalProperties: - type: string - description: matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed. - type: object - type: object - storageClass: - nullable: true - type: string - type: object type: object type: object type: object diff --git a/docs/modules/trino/pages/usage-guide/configuration.adoc b/docs/modules/trino/pages/usage-guide/configuration.adoc index ef3805da..59ddc40b 100644 --- a/docs/modules/trino/pages/usage-guide/configuration.adoc +++ b/docs/modules/trino/pages/usage-guide/configuration.adoc @@ -108,36 +108,7 @@ workers: Here too, overriding properties such as `http-server.https.port` will lead to broken installations. -== Resources - -=== Storage for data volumes - -You can mount a volume where data (config and logs of Trino) is stored by specifying https://kubernetes.io/docs/concepts/storage/persistent-volumes[PersistentVolumeClaims] for each individual role or role group: - -[source,yaml] ----- -workers: - config: - resources: - storage: - data: - capacity: 2Gi - roleGroups: - default: - config: - resources: - storage: - data: - capacity: 3Gi ----- - -In the above example, all Trino workers in the default group store data (the location of the property `--data-dir`) on a `3Gi` volume. -Additional role groups not specifying any resources inherit the config provided on the role level (`2Gi` volume). -This works the same for memory or CPU requests. - -By default, in case nothing is configured in the custom resource for a certain role group, each Pod has a `2Gi` large local volume mount for the data location containing mainly logs. - -=== Resource Requests +== Resource Requests include::home:concepts:stackable_resource_requests.adoc[] @@ -161,9 +132,6 @@ spec: max: '2000m' memory: limit: '4Gi' - storage: - data: - capacity: '1Gi' workers: config: resources: @@ -172,9 +140,6 @@ spec: max: '4000m' memory: limit: '4Gi' - storage: - data: - capacity: '1Gi' ---- WARNING: The default values are _most likely_ not sufficient to run a proper cluster in production. diff --git a/examples/simple-trino-cluster-resource-limits.yaml b/examples/simple-trino-cluster-resource-limits.yaml index 0128a30f..a31c5f6c 100644 --- a/examples/simple-trino-cluster-resource-limits.yaml +++ b/examples/simple-trino-cluster-resource-limits.yaml @@ -18,9 +18,6 @@ spec: replicas: 1 config: resources: - storage: - data: - capacity: 3Gi cpu: min: 300m max: "2" diff --git a/rust/operator-binary/src/command.rs b/rust/operator-binary/src/command.rs index ac3f4b0b..7f9d14de 100644 --- a/rust/operator-binary/src/command.rs +++ b/rust/operator-binary/src/command.rs @@ -11,8 +11,8 @@ use crate::{ catalog::config::CatalogConfig, controller::{STACKABLE_LOG_CONFIG_DIR, STACKABLE_LOG_DIR}, crd::{ - CONFIG_DIR_NAME, Container, DATA_DIR_NAME, LOG_PROPERTIES, RW_CONFIG_DIR_NAME, - STACKABLE_CLIENT_TLS_DIR, STACKABLE_INTERNAL_TLS_DIR, STACKABLE_MOUNT_INTERNAL_TLS_DIR, + CONFIG_DIR_NAME, Container, LOG_PROPERTIES, RW_CONFIG_DIR_NAME, STACKABLE_CLIENT_TLS_DIR, + STACKABLE_INTERNAL_TLS_DIR, STACKABLE_MOUNT_INTERNAL_TLS_DIR, STACKABLE_MOUNT_SERVER_TLS_DIR, STACKABLE_SERVER_TLS_DIR, STACKABLE_TLS_STORE_PASSWORD, SYSTEM_TRUST_STORE, SYSTEM_TRUST_STORE_PASSWORD, TrinoRole, v1alpha1, }, @@ -119,7 +119,7 @@ pub fn container_trino_args( {remove_vector_shutdown_file_command} prepare_signal_handlers containerdebug --output={STACKABLE_LOG_DIR}/containerdebug-state.json --loop & -bin/launcher run --etc-dir={RW_CONFIG_DIR_NAME} --data-dir={DATA_DIR_NAME} & +bin/launcher run --etc-dir={RW_CONFIG_DIR_NAME} & wait_for_termination $! {create_vector_shutdown_file_command} ", diff --git a/rust/operator-binary/src/controller.rs b/rust/operator-binary/src/controller.rs index 7b37f778..236cb20f 100644 --- a/rust/operator-binary/src/controller.rs +++ b/rust/operator-binary/src/controller.rs @@ -78,12 +78,11 @@ use crate::{ command, config, crd::{ ACCESS_CONTROL_PROPERTIES, APP_NAME, CONFIG_DIR_NAME, CONFIG_PROPERTIES, Container, - DATA_DIR_NAME, DISCOVERY_URI, ENV_INTERNAL_SECRET, HTTP_PORT, HTTP_PORT_NAME, HTTPS_PORT, - HTTPS_PORT_NAME, JVM_CONFIG, JVM_SECURITY_PROPERTIES, LOG_PROPERTIES, - MAX_TRINO_LOG_FILES_SIZE, METRICS_PORT, METRICS_PORT_NAME, NODE_PROPERTIES, - RW_CONFIG_DIR_NAME, STACKABLE_CLIENT_TLS_DIR, STACKABLE_INTERNAL_TLS_DIR, - STACKABLE_MOUNT_INTERNAL_TLS_DIR, STACKABLE_MOUNT_SERVER_TLS_DIR, STACKABLE_SERVER_TLS_DIR, - TrinoRole, + DISCOVERY_URI, ENV_INTERNAL_SECRET, HTTP_PORT, HTTP_PORT_NAME, HTTPS_PORT, HTTPS_PORT_NAME, + JVM_CONFIG, JVM_SECURITY_PROPERTIES, LOG_PROPERTIES, MAX_TRINO_LOG_FILES_SIZE, + METRICS_PORT, METRICS_PORT_NAME, NODE_PROPERTIES, RW_CONFIG_DIR_NAME, + STACKABLE_CLIENT_TLS_DIR, STACKABLE_INTERNAL_TLS_DIR, STACKABLE_MOUNT_INTERNAL_TLS_DIR, + STACKABLE_MOUNT_SERVER_TLS_DIR, STACKABLE_SERVER_TLS_DIR, TrinoRole, authentication::resolve_authentication_classes, catalog, discovery::{TrinoDiscovery, TrinoDiscoveryProtocol, TrinoPodRef}, @@ -1008,8 +1007,6 @@ fn build_rolegroup_statefulset( "-c".to_string(), ]) .args(vec![prepare_args.join("\n")]) - .add_volume_mount("data", DATA_DIR_NAME) - .context(AddVolumeMountSnafu)? .add_volume_mount("rwconfig", RW_CONFIG_DIR_NAME) .context(AddVolumeMountSnafu)? .add_volume_mount("log-config", STACKABLE_LOG_CONFIG_DIR) @@ -1026,14 +1023,7 @@ fn build_rolegroup_statefulset( ) .build(); - // for rw config - let mut persistent_volume_claims = vec![ - merged_config - .resources - .storage - .data - .build_pvc("data", Some(vec!["ReadWriteOnce"])), - ]; + let mut persistent_volume_claims = vec![]; // Add listener if let Some(group_listener_name) = group_listener_name(trino, trino_role) { cb_trino @@ -1069,8 +1059,6 @@ fn build_rolegroup_statefulset( command::container_trino_args(trino_authentication_config, catalogs).join("\n"), ]) .add_env_vars(env) - .add_volume_mount("data", DATA_DIR_NAME) - .context(AddVolumeMountSnafu)? .add_volume_mount("config", CONFIG_DIR_NAME) .context(AddVolumeMountSnafu)? .add_volume_mount("rwconfig", RW_CONFIG_DIR_NAME) diff --git a/rust/operator-binary/src/crd/mod.rs b/rust/operator-binary/src/crd/mod.rs index 862e7846..f615fea5 100644 --- a/rust/operator-binary/src/crd/mod.rs +++ b/rust/operator-binary/src/crd/mod.rs @@ -16,7 +16,7 @@ use stackable_operator::{ product_image_selection::ProductImage, resources::{ CpuLimitsFragment, MemoryLimitsFragment, NoRuntimeLimits, NoRuntimeLimitsFragment, - PvcConfig, PvcConfigFragment, Resources, ResourcesFragment, + Resources, ResourcesFragment, }, }, config::{ @@ -91,7 +91,6 @@ pub const NODE_INTERNAL_ADDRESS_SOURCE_FQDN: &str = "FQDN"; // directories pub const CONFIG_DIR_NAME: &str = "/stackable/config"; pub const RW_CONFIG_DIR_NAME: &str = "/stackable/rwconfig"; -pub const DATA_DIR_NAME: &str = "/stackable/data"; pub const STACKABLE_SERVER_TLS_DIR: &str = "/stackable/server_tls"; pub const STACKABLE_CLIENT_TLS_DIR: &str = "/stackable/client_tls"; pub const STACKABLE_INTERNAL_TLS_DIR: &str = "/stackable/internal_tls"; @@ -232,11 +231,17 @@ pub mod versioned { pub struct TrinoConfig { // config.properties pub query_max_memory: Option, + pub query_max_memory_per_node: Option, + #[fragment_attrs(serde(default))] pub logging: Logging, + + // We need to provide *something* that implements `Fragment`, so we pick an empty struct here. + // Note that a unit "()" would not work, as we need something that implements `Fragment`. #[fragment_attrs(serde(default))] pub resources: Resources, + #[fragment_attrs(serde(default))] pub affinity: StackableAffinity, @@ -327,10 +332,7 @@ pub mod versioned { ), serde(rename_all = "camelCase") )] - pub struct TrinoStorageConfig { - #[fragment_attrs(serde(default))] - pub data: PvcConfig, - } + pub struct TrinoStorageConfig {} #[derive(Clone, Default, Debug, Deserialize, Eq, JsonSchema, PartialEq, Serialize)] #[serde(rename_all = "camelCase")] @@ -490,13 +492,7 @@ impl v1alpha1::TrinoConfig { limit: Some(Quantity(memory.to_string())), runtime_limits: NoRuntimeLimitsFragment {}, }, - storage: v1alpha1::TrinoStorageConfigFragment { - data: PvcConfigFragment { - capacity: Some(Quantity("1Gi".to_owned())), - storage_class: None, - selectors: None, - }, - }, + storage: v1alpha1::TrinoStorageConfigFragment {}, }, query_max_memory: None, query_max_memory_per_node: None, diff --git a/tests/templates/kuttl/resources/10-assert.yaml.j2 b/tests/templates/kuttl/resources/10-assert.yaml.j2 index d66d72c0..3312c50e 100644 --- a/tests/templates/kuttl/resources/10-assert.yaml.j2 +++ b/tests/templates/kuttl/resources/10-assert.yaml.j2 @@ -26,17 +26,6 @@ status: readyReplicas: 1 replicas: 1 --- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: data-trino-coordinator-resources-default-0 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 1Gi ---- apiVersion: apps/v1 kind: StatefulSet metadata: @@ -60,17 +49,6 @@ status: readyReplicas: 1 replicas: 1 --- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: data-trino-worker-resources-from-role-0 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 3Gi ---- apiVersion: apps/v1 kind: StatefulSet metadata: @@ -94,17 +72,6 @@ status: readyReplicas: 1 replicas: 1 --- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: data-trino-worker-resources-from-role-group-0 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 4Gi ---- apiVersion: apps/v1 kind: StatefulSet metadata: @@ -127,14 +94,3 @@ spec: status: readyReplicas: 1 replicas: 1 ---- -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: data-trino-worker-resources-from-pod-overrides-0 -spec: - accessModes: - - ReadWriteOnce - resources: - requests: - storage: 3Gi diff --git a/tests/templates/kuttl/resources/10-install-trino.yaml.j2 b/tests/templates/kuttl/resources/10-install-trino.yaml.j2 index cc3068e5..29a051c0 100644 --- a/tests/templates/kuttl/resources/10-install-trino.yaml.j2 +++ b/tests/templates/kuttl/resources/10-install-trino.yaml.j2 @@ -30,9 +30,6 @@ spec: logging: enableVectorAgent: {{ lookup('env', 'VECTOR_AGGREGATOR') | length > 0 }} resources: - storage: - data: - capacity: 3Gi cpu: min: 300m max: 600m @@ -45,9 +42,6 @@ spec: replicas: 1 config: resources: - storage: - data: - capacity: 4Gi cpu: min: 400m max: 800m