// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/stackabletech/trino-operator/trino.stackable.tech/v1alpha1/trinoclusters.yaml
// kopium version: 0.22.3
#[allow(unused_imports)]
mod prelude {
pub use kube::CustomResource;
pub use serde::{Serialize, Deserialize};
pub use std::collections::BTreeMap;
pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
}
use self::prelude::*;
/// A Trino cluster stacklet. This resource is managed by the Stackable operator for Trino. Find more information on how to use it and the resources that the operator generates in the [operator documentation](<https://docs.stackable.tech/home/nightly/trino/).>
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "trino.stackable.tech", version = "v1alpha1", kind = "TrinoCluster", plural = "trinoclusters")]
#[kube(namespaced)]
#[kube(status = "TrinoClusterStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct TrinoClusterSpec {
/// Settings that affect all roles and role groups. The settings in the `clusterConfig` are cluster wide settings that do not need to be configurable at role or role group level.
#[serde(rename = "clusterConfig")]
pub cluster_config: TrinoClusterClusterConfig,
/// [Cluster operations](<https://docs.stackable.tech/home/nightly/concepts/operations/cluster_operations)> properties, allow stopping the product instance as well as pausing reconciliation.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterOperation")]
pub cluster_operation: Option<TrinoClusterClusterOperation>,
/// This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing all the roleGroups that are part of this role. Additionally, there is a `config`, which is configurable at the role *and* roleGroup level. Everything at roleGroup level is merged on top of what is configured on role level. There is also a second form of config, which can only be configured at role level, the `roleConfig`. You can learn more about this in the [Roles and role group concept documentation](<https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub coordinators: Option<TrinoClusterCoordinators>,
/// Specify which image to use, the easiest way is to only configure the `productVersion`. You can also configure a custom image registry to pull from, as well as completely custom images.
///
/// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)> for details.
pub image: TrinoClusterImage,
/// This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing all the roleGroups that are part of this role. Additionally, there is a `config`, which is configurable at the role *and* roleGroup level. Everything at roleGroup level is merged on top of what is configured on role level. There is also a second form of config, which can only be configured at role level, the `roleConfig`. You can learn more about this in the [Roles and role group concept documentation](<https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub workers: Option<TrinoClusterWorkers>,
}
/// Settings that affect all roles and role groups. The settings in the `clusterConfig` are cluster wide settings that do not need to be configurable at role or role group level.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfig {
/// Authentication options for Trino. Learn more in the [Trino authentication usage guide](<https://docs.stackable.tech/home/nightly/trino/usage-guide/security#authentication).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub authentication: Option<Vec<TrinoClusterClusterConfigAuthentication>>,
/// Authorization options for Trino. Learn more in the [Trino authorization usage guide](<https://docs.stackable.tech/home/nightly/trino/usage-guide/security#authorization).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub authorization: Option<TrinoClusterClusterConfigAuthorization>,
/// [LabelSelector](<https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors)> selecting the Catalogs to include in the Trino instance.
#[serde(rename = "catalogLabelSelector")]
pub catalog_label_selector: TrinoClusterClusterConfigCatalogLabelSelector,
/// Client spooling protocol configuration.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "clientProtocol")]
pub client_protocol: Option<TrinoClusterClusterConfigClientProtocol>,
/// Fault tolerant execution configuration. When enabled, Trino can automatically retry queries or tasks in case of failures.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "faultTolerantExecution")]
pub fault_tolerant_execution: Option<TrinoClusterClusterConfigFaultTolerantExecution>,
/// TLS configuration options for server and internal communication.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tls: Option<TrinoClusterClusterConfigTls>,
/// Name of the Vector aggregator [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery).> It must contain the key `ADDRESS` with the address of the Vector aggregator. Follow the [logging tutorial](<https://docs.stackable.tech/home/nightly/tutorials/logging-vector-aggregator)> to learn how to configure log aggregation with Vector.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "vectorAggregatorConfigMapName")]
pub vector_aggregator_config_map_name: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigAuthentication {
/// Name of the [AuthenticationClass](<https://docs.stackable.tech/home/nightly/concepts/authentication)> used to authenticate users
#[serde(rename = "authenticationClass")]
pub authentication_class: String,
/// This field contains OIDC-specific configuration. It is only required in case OIDC is used.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub oidc: Option<TrinoClusterClusterConfigAuthenticationOidc>,
}
/// This field contains OIDC-specific configuration. It is only required in case OIDC is used.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigAuthenticationOidc {
/// A reference to the OIDC client credentials secret. The secret contains the client id and secret.
#[serde(rename = "clientCredentialsSecret")]
pub client_credentials_secret: String,
/// An optional list of extra scopes which get merged with the scopes defined in the AuthenticationClass
#[serde(default, skip_serializing_if = "Option::is_none", rename = "extraScopes")]
pub extra_scopes: Option<Vec<String>>,
}
/// Authorization options for Trino. Learn more in the [Trino authorization usage guide](<https://docs.stackable.tech/home/nightly/trino/usage-guide/security#authorization).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigAuthorization {
/// Configure the OPA stacklet [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)> and the name of the Rego package containing your authorization rules. Consult the [OPA authorization documentation](<https://docs.stackable.tech/home/nightly/concepts/opa)> to learn how to deploy Rego authorization rules with OPA.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub opa: Option<TrinoClusterClusterConfigAuthorizationOpa>,
}
/// Configure the OPA stacklet [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)> and the name of the Rego package containing your authorization rules. Consult the [OPA authorization documentation](<https://docs.stackable.tech/home/nightly/concepts/opa)> to learn how to deploy Rego authorization rules with OPA.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigAuthorizationOpa {
/// The [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)> for the OPA stacklet that should be used for authorization requests.
#[serde(rename = "configMapName")]
pub config_map_name: String,
/// The name of the Rego package containing the Rego rules for the product.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub package: Option<String>,
}
/// [LabelSelector](<https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/#label-selectors)> selecting the Catalogs to include in the Trino instance.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigCatalogLabelSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<TrinoClusterClusterConfigCatalogLabelSelectorMatchExpressions>>,
/// 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.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigCatalogLabelSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// 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.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// Client spooling protocol configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocol {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub spooling: Option<TrinoClusterClusterConfigClientProtocolSpooling>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpooling {
pub filesystem: TrinoClusterClusterConfigClientProtocolSpoolingFilesystem,
pub location: String,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystem {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub s3: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3 {
pub connection: TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3Connection,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3Connection {
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inline: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInline>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
}
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInline {
/// Which access style to use. Defaults to virtual hosted-style as most of the data products out there. Have a look at the [AWS documentation](<https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html).>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "accessStyle")]
pub access_style: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineAccessStyle>,
/// If the S3 uses authentication you have to specify you S3 credentials. In the most cases a [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> providing `accessKey` and `secretKey` is sufficient.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub credentials: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineCredentials>,
/// Host of the S3 server without any protocol or port. For example: `west1.my-cloud.com`.
pub host: String,
/// Port the S3 server listens on. If not specified the product will determine the port to use.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub port: Option<u16>,
/// Bucket region used for signing headers (sigv4).
///
/// This defaults to `us-east-1` which is compatible with other implementations such as Minio.
///
/// WARNING: Some products use the Hadoop S3 implementation which falls back to us-east-2.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub region: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineRegion>,
/// Use a TLS connection. If not specified no TLS will be used.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tls: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTls>,
}
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineAccessStyle {
Path,
VirtualHosted,
}
/// If the S3 uses authentication you have to specify you S3 credentials. In the most cases a [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> providing `accessKey` and `secretKey` is sufficient.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineCredentials {
/// [Scope](<https://docs.stackable.tech/home/nightly/secret-operator/scope)> of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scope: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineCredentialsScope>,
/// [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> containing the LDAP bind credentials.
#[serde(rename = "secretClass")]
pub secret_class: String,
}
/// [Scope](<https://docs.stackable.tech/home/nightly/secret-operator/scope)> of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineCredentialsScope {
/// The listener volume scope allows Node and Service scopes to be inferred from the applicable listeners. This must correspond to Volume names in the Pod that mount Listeners.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "listenerVolumes")]
pub listener_volumes: Option<Vec<String>>,
/// The node scope is resolved to the name of the Kubernetes Node object that the Pod is running on. This will typically be the DNS name of the node.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub node: Option<bool>,
/// The pod scope is resolved to the name of the Kubernetes Pod. This allows the secret to differentiate between StatefulSet replicas.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pod: Option<bool>,
/// The service scope allows Pod objects to specify custom scopes. This should typically correspond to Service objects that the Pod participates in.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<String>>,
}
/// Bucket region used for signing headers (sigv4).
///
/// This defaults to `us-east-1` which is compatible with other implementations such as Minio.
///
/// WARNING: Some products use the Hadoop S3 implementation which falls back to us-east-2.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineRegion {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
/// Use a TLS connection. If not specified no TLS will be used.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTls {
/// The verification method used to verify the certificates of the server and/or the client.
pub verification: TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerification,
}
/// The verification method used to verify the certificates of the server and/or the client.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerification {
/// Use TLS but don't verify certificates.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub none: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationNone>,
/// Use TLS and a CA certificate to verify the server.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationServer>,
}
/// Use TLS but don't verify certificates.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationNone {
}
/// Use TLS and a CA certificate to verify the server.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationServer {
/// CA cert to verify the server.
#[serde(rename = "caCert")]
pub ca_cert: TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationServerCaCert,
}
/// CA cert to verify the server.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationServerCaCert {
/// Name of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> which will provide the CA certificate. Note that a SecretClass does not need to have a key but can also work with just a CA certificate, so if you got provided with a CA cert but don't have access to the key you can still use this method.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretClass")]
pub secret_class: Option<String>,
/// Use TLS and the CA certificates trusted by the common web browsers to verify the server. This can be useful when you e.g. use public AWS S3 or other public available services.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "webPki")]
pub web_pki: Option<TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationServerCaCertWebPki>,
}
/// Use TLS and the CA certificates trusted by the common web browsers to verify the server. This can be useful when you e.g. use public AWS S3 or other public available services.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigClientProtocolSpoolingFilesystemS3ConnectionInlineTlsVerificationServerCaCertWebPki {
}
/// Fault tolerant execution configuration. When enabled, Trino can automatically retry queries or tasks in case of failures.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecution {
/// Query-level fault tolerant execution. Retries entire queries on failure.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub query: Option<TrinoClusterClusterConfigFaultTolerantExecutionQuery>,
/// Task-level fault tolerant execution. Retries individual tasks on failure (requires exchange manager).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub task: Option<TrinoClusterClusterConfigFaultTolerantExecutionTask>,
}
/// Query-level fault tolerant execution. Retries entire queries on failure.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQuery {
/// Data size of the coordinator's in-memory buffer used to store output of query stages.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "exchangeDeduplicationBufferSize")]
pub exchange_deduplication_buffer_size: Option<String>,
/// Exchange manager configuration for spooling intermediate data during fault tolerant execution. Optional for Query retry policy, recommended for large result sets.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "exchangeManager")]
pub exchange_manager: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManager>,
/// Maximum number of times Trino may attempt to retry a query before declaring it failed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryAttempts")]
pub retry_attempts: Option<u32>,
/// Factor by which retry delay is increased on each query failure.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryDelayScaleFactor")]
pub retry_delay_scale_factor: Option<f32>,
/// Minimum time that a failed query must wait before it is retried.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryInitialDelay")]
pub retry_initial_delay: Option<String>,
/// Maximum time that a failed query must wait before it is retried.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryMaxDelay")]
pub retry_max_delay: Option<String>,
}
/// Exchange manager configuration for spooling intermediate data during fault tolerant execution. Optional for Query retry policy, recommended for large result sets.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManager {
/// Whether to enable encryption of spooling data.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "encryptionEnabled")]
pub encryption_enabled: Option<bool>,
/// HDFS-based exchange manager.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub hdfs: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerHdfs>,
/// Local filesystem storage (not recommended for production).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub local: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerLocal>,
/// S3-compatible storage configuration.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub s3: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3>,
/// The minimum buffer pool size for an exchange sink. The larger the buffer pool size, the larger the write parallelism and memory usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sinkBufferPoolMinSize")]
pub sink_buffer_pool_min_size: Option<u32>,
/// The number of buffers per partition in the buffer pool. The larger the buffer pool size, the larger the write parallelism and memory usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sinkBuffersPerPartition")]
pub sink_buffers_per_partition: Option<u32>,
/// Max data size of files written by exchange sinks.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sinkMaxFileSize")]
pub sink_max_file_size: Option<String>,
/// Number of concurrent readers to read from spooling storage. The larger the number of concurrent readers, the larger the read parallelism and memory usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sourceConcurrentReaders")]
pub source_concurrent_readers: Option<u32>,
}
/// HDFS-based exchange manager.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerHdfs {
/// HDFS URIs for spooling data.
#[serde(rename = "baseDirectories")]
pub base_directories: Vec<String>,
/// Block data size for HDFS storage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "blockSize")]
pub block_size: Option<String>,
/// HDFS connection configuration.
pub hdfs: TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerHdfsHdfs,
/// Skip directory scheme validation to support Hadoop-compatible file systems.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "skipDirectorySchemeValidation")]
pub skip_directory_scheme_validation: Option<bool>,
}
/// HDFS connection configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerHdfsHdfs {
/// Name of the [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)> providing information about the HDFS cluster.
#[serde(rename = "configMap")]
pub config_map: String,
}
/// Local filesystem storage (not recommended for production).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerLocal {
/// Local filesystem paths for exchange storage.
#[serde(rename = "baseDirectories")]
pub base_directories: Vec<String>,
}
/// S3-compatible storage configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3 {
/// S3 bucket URIs for spooling data (e.g., s3://bucket1,s3://bucket2).
#[serde(rename = "baseDirectories")]
pub base_directories: Vec<String>,
/// S3 connection configuration. Learn more about S3 configuration in the [S3 concept docs](<https://docs.stackable.tech/home/nightly/concepts/s3).>
pub connection: TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3Connection,
/// Maximum number of times the S3 client should retry a request.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "maxErrorRetries")]
pub max_error_retries: Option<u32>,
/// Part data size for S3 multi-part upload.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "uploadPartSize")]
pub upload_part_size: Option<String>,
}
/// S3 connection configuration. Learn more about S3 configuration in the [S3 concept docs](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3Connection {
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inline: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInline>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
}
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInline {
/// Which access style to use. Defaults to virtual hosted-style as most of the data products out there. Have a look at the [AWS documentation](<https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html).>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "accessStyle")]
pub access_style: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineAccessStyle>,
/// If the S3 uses authentication you have to specify you S3 credentials. In the most cases a [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> providing `accessKey` and `secretKey` is sufficient.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub credentials: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineCredentials>,
/// Host of the S3 server without any protocol or port. For example: `west1.my-cloud.com`.
pub host: String,
/// Port the S3 server listens on. If not specified the product will determine the port to use.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub port: Option<u16>,
/// Bucket region used for signing headers (sigv4).
///
/// This defaults to `us-east-1` which is compatible with other implementations such as Minio.
///
/// WARNING: Some products use the Hadoop S3 implementation which falls back to us-east-2.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub region: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineRegion>,
/// Use a TLS connection. If not specified no TLS will be used.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tls: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTls>,
}
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineAccessStyle {
Path,
VirtualHosted,
}
/// If the S3 uses authentication you have to specify you S3 credentials. In the most cases a [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> providing `accessKey` and `secretKey` is sufficient.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineCredentials {
/// [Scope](<https://docs.stackable.tech/home/nightly/secret-operator/scope)> of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scope: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineCredentialsScope>,
/// [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> containing the LDAP bind credentials.
#[serde(rename = "secretClass")]
pub secret_class: String,
}
/// [Scope](<https://docs.stackable.tech/home/nightly/secret-operator/scope)> of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineCredentialsScope {
/// The listener volume scope allows Node and Service scopes to be inferred from the applicable listeners. This must correspond to Volume names in the Pod that mount Listeners.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "listenerVolumes")]
pub listener_volumes: Option<Vec<String>>,
/// The node scope is resolved to the name of the Kubernetes Node object that the Pod is running on. This will typically be the DNS name of the node.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub node: Option<bool>,
/// The pod scope is resolved to the name of the Kubernetes Pod. This allows the secret to differentiate between StatefulSet replicas.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pod: Option<bool>,
/// The service scope allows Pod objects to specify custom scopes. This should typically correspond to Service objects that the Pod participates in.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<String>>,
}
/// Bucket region used for signing headers (sigv4).
///
/// This defaults to `us-east-1` which is compatible with other implementations such as Minio.
///
/// WARNING: Some products use the Hadoop S3 implementation which falls back to us-east-2.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineRegion {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
/// Use a TLS connection. If not specified no TLS will be used.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTls {
/// The verification method used to verify the certificates of the server and/or the client.
pub verification: TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerification,
}
/// The verification method used to verify the certificates of the server and/or the client.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerification {
/// Use TLS but don't verify certificates.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub none: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationNone>,
/// Use TLS and a CA certificate to verify the server.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationServer>,
}
/// Use TLS but don't verify certificates.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationNone {
}
/// Use TLS and a CA certificate to verify the server.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationServer {
/// CA cert to verify the server.
#[serde(rename = "caCert")]
pub ca_cert: TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationServerCaCert,
}
/// CA cert to verify the server.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationServerCaCert {
/// Name of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> which will provide the CA certificate. Note that a SecretClass does not need to have a key but can also work with just a CA certificate, so if you got provided with a CA cert but don't have access to the key you can still use this method.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretClass")]
pub secret_class: Option<String>,
/// Use TLS and the CA certificates trusted by the common web browsers to verify the server. This can be useful when you e.g. use public AWS S3 or other public available services.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "webPki")]
pub web_pki: Option<TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationServerCaCertWebPki>,
}
/// Use TLS and the CA certificates trusted by the common web browsers to verify the server. This can be useful when you e.g. use public AWS S3 or other public available services.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionQueryExchangeManagerS3ConnectionInlineTlsVerificationServerCaCertWebPki {
}
/// Task-level fault tolerant execution. Retries individual tasks on failure (requires exchange manager).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTask {
/// Data size of the coordinator's in-memory buffer used to store output of query stages.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "exchangeDeduplicationBufferSize")]
pub exchange_deduplication_buffer_size: Option<String>,
/// Exchange manager configuration for spooling intermediate data during fault tolerant execution. Required for Task retry policy.
#[serde(rename = "exchangeManager")]
pub exchange_manager: TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManager,
/// Maximum number of times Trino may attempt to retry a single task before declaring the query failed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryAttemptsPerTask")]
pub retry_attempts_per_task: Option<u32>,
/// Factor by which retry delay is increased on each task failure.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryDelayScaleFactor")]
pub retry_delay_scale_factor: Option<f32>,
/// Minimum time that a failed task must wait before it is retried.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryInitialDelay")]
pub retry_initial_delay: Option<String>,
/// Maximum time that a failed task must wait before it is retried.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "retryMaxDelay")]
pub retry_max_delay: Option<String>,
}
/// Exchange manager configuration for spooling intermediate data during fault tolerant execution. Required for Task retry policy.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManager {
/// Whether to enable encryption of spooling data.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "encryptionEnabled")]
pub encryption_enabled: Option<bool>,
/// HDFS-based exchange manager.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub hdfs: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerHdfs>,
/// Local filesystem storage (not recommended for production).
#[serde(default, skip_serializing_if = "Option::is_none")]
pub local: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerLocal>,
/// S3-compatible storage configuration.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub s3: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3>,
/// The minimum buffer pool size for an exchange sink. The larger the buffer pool size, the larger the write parallelism and memory usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sinkBufferPoolMinSize")]
pub sink_buffer_pool_min_size: Option<u32>,
/// The number of buffers per partition in the buffer pool. The larger the buffer pool size, the larger the write parallelism and memory usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sinkBuffersPerPartition")]
pub sink_buffers_per_partition: Option<u32>,
/// Max data size of files written by exchange sinks.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sinkMaxFileSize")]
pub sink_max_file_size: Option<String>,
/// Number of concurrent readers to read from spooling storage. The larger the number of concurrent readers, the larger the read parallelism and memory usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "sourceConcurrentReaders")]
pub source_concurrent_readers: Option<u32>,
}
/// HDFS-based exchange manager.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerHdfs {
/// HDFS URIs for spooling data.
#[serde(rename = "baseDirectories")]
pub base_directories: Vec<String>,
/// Block data size for HDFS storage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "blockSize")]
pub block_size: Option<String>,
/// HDFS connection configuration.
pub hdfs: TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerHdfsHdfs,
/// Skip directory scheme validation to support Hadoop-compatible file systems.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "skipDirectorySchemeValidation")]
pub skip_directory_scheme_validation: Option<bool>,
}
/// HDFS connection configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerHdfsHdfs {
/// Name of the [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)> providing information about the HDFS cluster.
#[serde(rename = "configMap")]
pub config_map: String,
}
/// Local filesystem storage (not recommended for production).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerLocal {
/// Local filesystem paths for exchange storage.
#[serde(rename = "baseDirectories")]
pub base_directories: Vec<String>,
}
/// S3-compatible storage configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3 {
/// S3 bucket URIs for spooling data (e.g., s3://bucket1,s3://bucket2).
#[serde(rename = "baseDirectories")]
pub base_directories: Vec<String>,
/// S3 connection configuration. Learn more about S3 configuration in the [S3 concept docs](<https://docs.stackable.tech/home/nightly/concepts/s3).>
pub connection: TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3Connection,
/// Maximum number of times the S3 client should retry a request.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "maxErrorRetries")]
pub max_error_retries: Option<u32>,
/// Part data size for S3 multi-part upload.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "uploadPartSize")]
pub upload_part_size: Option<String>,
}
/// S3 connection configuration. Learn more about S3 configuration in the [S3 concept docs](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3Connection {
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub inline: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInline>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub reference: Option<String>,
}
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInline {
/// Which access style to use. Defaults to virtual hosted-style as most of the data products out there. Have a look at the [AWS documentation](<https://docs.aws.amazon.com/AmazonS3/latest/userguide/VirtualHosting.html).>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "accessStyle")]
pub access_style: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineAccessStyle>,
/// If the S3 uses authentication you have to specify you S3 credentials. In the most cases a [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> providing `accessKey` and `secretKey` is sufficient.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub credentials: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineCredentials>,
/// Host of the S3 server without any protocol or port. For example: `west1.my-cloud.com`.
pub host: String,
/// Port the S3 server listens on. If not specified the product will determine the port to use.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub port: Option<u16>,
/// Bucket region used for signing headers (sigv4).
///
/// This defaults to `us-east-1` which is compatible with other implementations such as Minio.
///
/// WARNING: Some products use the Hadoop S3 implementation which falls back to us-east-2.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub region: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineRegion>,
/// Use a TLS connection. If not specified no TLS will be used.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tls: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTls>,
}
/// S3 connection definition as a resource. Learn more on the [S3 concept documentation](<https://docs.stackable.tech/home/nightly/concepts/s3).>
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineAccessStyle {
Path,
VirtualHosted,
}
/// If the S3 uses authentication you have to specify you S3 credentials. In the most cases a [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> providing `accessKey` and `secretKey` is sufficient.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineCredentials {
/// [Scope](<https://docs.stackable.tech/home/nightly/secret-operator/scope)> of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scope: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineCredentialsScope>,
/// [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> containing the LDAP bind credentials.
#[serde(rename = "secretClass")]
pub secret_class: String,
}
/// [Scope](<https://docs.stackable.tech/home/nightly/secret-operator/scope)> of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineCredentialsScope {
/// The listener volume scope allows Node and Service scopes to be inferred from the applicable listeners. This must correspond to Volume names in the Pod that mount Listeners.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "listenerVolumes")]
pub listener_volumes: Option<Vec<String>>,
/// The node scope is resolved to the name of the Kubernetes Node object that the Pod is running on. This will typically be the DNS name of the node.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub node: Option<bool>,
/// The pod scope is resolved to the name of the Kubernetes Pod. This allows the secret to differentiate between StatefulSet replicas.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub pod: Option<bool>,
/// The service scope allows Pod objects to specify custom scopes. This should typically correspond to Service objects that the Pod participates in.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub services: Option<Vec<String>>,
}
/// Bucket region used for signing headers (sigv4).
///
/// This defaults to `us-east-1` which is compatible with other implementations such as Minio.
///
/// WARNING: Some products use the Hadoop S3 implementation which falls back to us-east-2.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineRegion {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
/// Use a TLS connection. If not specified no TLS will be used.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTls {
/// The verification method used to verify the certificates of the server and/or the client.
pub verification: TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerification,
}
/// The verification method used to verify the certificates of the server and/or the client.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerification {
/// Use TLS but don't verify certificates.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub none: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationNone>,
/// Use TLS and a CA certificate to verify the server.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub server: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationServer>,
}
/// Use TLS but don't verify certificates.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationNone {
}
/// Use TLS and a CA certificate to verify the server.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationServer {
/// CA cert to verify the server.
#[serde(rename = "caCert")]
pub ca_cert: TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationServerCaCert,
}
/// CA cert to verify the server.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationServerCaCert {
/// Name of the [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> which will provide the CA certificate. Note that a SecretClass does not need to have a key but can also work with just a CA certificate, so if you got provided with a CA cert but don't have access to the key you can still use this method.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "secretClass")]
pub secret_class: Option<String>,
/// Use TLS and the CA certificates trusted by the common web browsers to verify the server. This can be useful when you e.g. use public AWS S3 or other public available services.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "webPki")]
pub web_pki: Option<TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationServerCaCertWebPki>,
}
/// Use TLS and the CA certificates trusted by the common web browsers to verify the server. This can be useful when you e.g. use public AWS S3 or other public available services.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigFaultTolerantExecutionTaskExchangeManagerS3ConnectionInlineTlsVerificationServerCaCertWebPki {
}
/// TLS configuration options for server and internal communication.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterConfigTls {
/// Only affects internal communication. Use mutual verification between Trino nodes This setting controls: - Which cert the servers should use to authenticate themselves against other servers - Which ca.crt to use when validating the other server
#[serde(default, skip_serializing_if = "Option::is_none", rename = "internalSecretClass")]
pub internal_secret_class: Option<String>,
/// Only affects client connections. This setting controls: - If TLS encryption is used at all - Which cert the servers should use to authenticate themselves against the client
#[serde(default, skip_serializing_if = "Option::is_none", rename = "serverSecretClass")]
pub server_secret_class: Option<String>,
}
/// [Cluster operations](<https://docs.stackable.tech/home/nightly/concepts/operations/cluster_operations)> properties, allow stopping the product instance as well as pausing reconciliation.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterClusterOperation {
/// Flag to stop cluster reconciliation by the operator. This means that all changes in the custom resource spec are ignored until this flag is set to false or removed. The operator will however still watch the deployed resources at the time and update the custom resource status field. If applied at the same time with `stopped`, `reconciliationPaused` will take precedence over `stopped` and stop the reconciliation immediately.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "reconciliationPaused")]
pub reconciliation_paused: Option<bool>,
/// Flag to stop the cluster. This means all deployed resources (e.g. Services, StatefulSets, ConfigMaps) are kept but all deployed Pods (e.g. replicas from a StatefulSet) are scaled to 0 and therefore stopped and removed. If applied at the same time with `reconciliationPaused`, the latter will pause reconciliation and `stopped` will take no effect until `reconciliationPaused` is set to false or removed.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub stopped: Option<bool>,
}
/// This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing all the roleGroups that are part of this role. Additionally, there is a `config`, which is configurable at the role *and* roleGroup level. Everything at roleGroup level is merged on top of what is configured on role level. There is also a second form of config, which can only be configured at role level, the `roleConfig`. You can learn more about this in the [Roles and role group concept documentation](<https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinators {
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
pub cli_overrides: Option<BTreeMap<String, String>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub config: Option<TrinoClusterCoordinatorsConfig>,
/// The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)> and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
/// `envOverrides` configure environment variables to be set in the Pods. It is a map from strings to strings - environment variables and the value to set. Read the [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)> for more information and consult the operator specific usage guide to find out about the product specific environment variables that are available.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
pub env_overrides: Option<BTreeMap<String, String>>,
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "jvmArgumentOverrides")]
pub jvm_argument_overrides: Option<TrinoClusterCoordinatorsJvmArgumentOverrides>,
/// In the `podOverrides` property you can define a [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)> to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)> for more information.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
pub role_config: Option<TrinoClusterCoordinatorsRoleConfig>,
#[serde(rename = "roleGroups")]
pub role_groups: BTreeMap<String, TrinoClusterCoordinatorsRoleGroups>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfig {
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub affinity: Option<TrinoClusterCoordinatorsConfigAffinity>,
/// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
pub graceful_shutdown_timeout: Option<String>,
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub logging: Option<TrinoClusterCoordinatorsConfigLogging>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemory")]
pub query_max_memory: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemoryPerNode")]
pub query_max_memory_per_node: Option<String>,
/// Request secret (currently only autoTls certificates) lifetime from the secret operator, e.g. `7d`, or `30d`. This can be shortened by the `maxCertificateLifetime` setting on the SecretClass issuing the TLS certificate.
///
/// Defaults to `15d` for coordinators (as currently a restart kills all running queries) and `1d` for workers.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "requestedSecretLifetime")]
pub requested_secret_lifetime: Option<String>,
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub resources: Option<TrinoClusterCoordinatorsConfigResources>,
}
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigAffinity {
/// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
pub node_selector: Option<BTreeMap<String, String>>,
/// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
}
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigLogging {
/// Log configuration per container.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub containers: Option<BTreeMap<String, TrinoClusterCoordinatorsConfigLoggingContainers>>,
/// Wether or not to deploy a container with the Vector log agent.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
pub enable_vector_agent: Option<bool>,
}
/// Log configuration per container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigLoggingContainers {
/// Configuration for the console appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub console: Option<TrinoClusterCoordinatorsConfigLoggingContainersConsole>,
/// Custom log configuration provided in a ConfigMap
#[serde(default, skip_serializing_if = "Option::is_none")]
pub custom: Option<TrinoClusterCoordinatorsConfigLoggingContainersCustom>,
/// Configuration for the file appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub file: Option<TrinoClusterCoordinatorsConfigLoggingContainersFile>,
/// Configuration per logger
#[serde(default, skip_serializing_if = "Option::is_none")]
pub loggers: Option<BTreeMap<String, TrinoClusterCoordinatorsConfigLoggingContainersLoggers>>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigLoggingContainersConsole {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterCoordinatorsConfigLoggingContainersConsoleLevel>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterCoordinatorsConfigLoggingContainersConsoleLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Custom log configuration provided in a ConfigMap
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigLoggingContainersCustom {
/// ConfigMap containing the log configuration files
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
pub config_map: Option<String>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigLoggingContainersFile {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterCoordinatorsConfigLoggingContainersFileLevel>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterCoordinatorsConfigLoggingContainersFileLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigLoggingContainersLoggers {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterCoordinatorsConfigLoggingContainersLoggersLevel>,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterCoordinatorsConfigLoggingContainersLoggersLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigResources {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<TrinoClusterCoordinatorsConfigResourcesCpu>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<TrinoClusterCoordinatorsConfigResourcesMemory>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub storage: Option<TrinoClusterCoordinatorsConfigResourcesStorage>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigResourcesCpu {
/// The maximum amount of CPU cores that can be requested by Pods. Equivalent to the `limit` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub max: Option<String>,
/// The minimal amount of CPU cores that Pods need to run. Equivalent to the `request` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub min: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigResourcesMemory {
/// The maximum amount of memory that should be available to the Pod. Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),> which means these suffixes are supported: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: `128974848, 129e6, 129M, 128974848000m, 123Mi`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limit: Option<String>,
/// Additional options that can be specified.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
pub runtime_limits: Option<TrinoClusterCoordinatorsConfigResourcesMemoryRuntimeLimits>,
}
/// Additional options that can be specified.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigResourcesMemoryRuntimeLimits {
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsConfigResourcesStorage {
}
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsJvmArgumentOverrides {
/// JVM arguments to be added
#[serde(default, skip_serializing_if = "Option::is_none")]
pub add: Option<Vec<String>>,
/// JVM arguments to be removed by exact match
#[serde(default, skip_serializing_if = "Option::is_none")]
pub remove: Option<Vec<String>>,
/// JVM arguments matching any of this regexes will be removed
#[serde(default, skip_serializing_if = "Option::is_none", rename = "removeRegex")]
pub remove_regex: Option<Vec<String>>,
}
/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleConfig {
/// This field controls which [ListenerClass](<https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html)> is used to expose the coordinator.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "listenerClass")]
pub listener_class: Option<String>,
/// This struct is used to configure:
///
/// 1. If PodDisruptionBudgets are created by the operator 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
///
/// Learn more in the [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
pub pod_disruption_budget: Option<TrinoClusterCoordinatorsRoleConfigPodDisruptionBudget>,
}
/// This struct is used to configure:
///
/// 1. If PodDisruptionBudgets are created by the operator 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
///
/// Learn more in the [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleConfigPodDisruptionBudget {
/// Whether a PodDisruptionBudget should be written out for this role. Disabling this enables you to specify your own - custom - one. Defaults to true.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// The number of Pods that are allowed to be down because of voluntary disruptions. If you don't explicitly set this, the operator will use a sane default based upon knowledge about the individual product.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
pub max_unavailable: Option<u16>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroups {
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
pub cli_overrides: Option<BTreeMap<String, String>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub config: Option<TrinoClusterCoordinatorsRoleGroupsConfig>,
/// The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)> and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
/// `envOverrides` configure environment variables to be set in the Pods. It is a map from strings to strings - environment variables and the value to set. Read the [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)> for more information and consult the operator specific usage guide to find out about the product specific environment variables that are available.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
pub env_overrides: Option<BTreeMap<String, String>>,
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "jvmArgumentOverrides")]
pub jvm_argument_overrides: Option<TrinoClusterCoordinatorsRoleGroupsJvmArgumentOverrides>,
/// In the `podOverrides` property you can define a [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)> to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)> for more information.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub replicas: Option<u16>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfig {
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub affinity: Option<TrinoClusterCoordinatorsRoleGroupsConfigAffinity>,
/// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
pub graceful_shutdown_timeout: Option<String>,
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub logging: Option<TrinoClusterCoordinatorsRoleGroupsConfigLogging>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemory")]
pub query_max_memory: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemoryPerNode")]
pub query_max_memory_per_node: Option<String>,
/// Request secret (currently only autoTls certificates) lifetime from the secret operator, e.g. `7d`, or `30d`. This can be shortened by the `maxCertificateLifetime` setting on the SecretClass issuing the TLS certificate.
///
/// Defaults to `15d` for coordinators (as currently a restart kills all running queries) and `1d` for workers.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "requestedSecretLifetime")]
pub requested_secret_lifetime: Option<String>,
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub resources: Option<TrinoClusterCoordinatorsRoleGroupsConfigResources>,
}
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigAffinity {
/// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
pub node_selector: Option<BTreeMap<String, String>>,
/// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
}
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigLogging {
/// Log configuration per container.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub containers: Option<BTreeMap<String, TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainers>>,
/// Wether or not to deploy a container with the Vector log agent.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
pub enable_vector_agent: Option<bool>,
}
/// Log configuration per container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainers {
/// Configuration for the console appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub console: Option<TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersConsole>,
/// Custom log configuration provided in a ConfigMap
#[serde(default, skip_serializing_if = "Option::is_none")]
pub custom: Option<TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersCustom>,
/// Configuration for the file appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub file: Option<TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersFile>,
/// Configuration per logger
#[serde(default, skip_serializing_if = "Option::is_none")]
pub loggers: Option<BTreeMap<String, TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersLoggers>>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersConsole {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersConsoleLevel>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersConsoleLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Custom log configuration provided in a ConfigMap
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersCustom {
/// ConfigMap containing the log configuration files
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
pub config_map: Option<String>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersFile {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersFileLevel>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersFileLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersLoggers {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersLoggersLevel>,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterCoordinatorsRoleGroupsConfigLoggingContainersLoggersLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigResources {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<TrinoClusterCoordinatorsRoleGroupsConfigResourcesCpu>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<TrinoClusterCoordinatorsRoleGroupsConfigResourcesMemory>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub storage: Option<TrinoClusterCoordinatorsRoleGroupsConfigResourcesStorage>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigResourcesCpu {
/// The maximum amount of CPU cores that can be requested by Pods. Equivalent to the `limit` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub max: Option<String>,
/// The minimal amount of CPU cores that Pods need to run. Equivalent to the `request` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub min: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigResourcesMemory {
/// The maximum amount of memory that should be available to the Pod. Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),> which means these suffixes are supported: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: `128974848, 129e6, 129M, 128974848000m, 123Mi`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limit: Option<String>,
/// Additional options that can be specified.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
pub runtime_limits: Option<TrinoClusterCoordinatorsRoleGroupsConfigResourcesMemoryRuntimeLimits>,
}
/// Additional options that can be specified.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigResourcesMemoryRuntimeLimits {
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsConfigResourcesStorage {
}
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterCoordinatorsRoleGroupsJvmArgumentOverrides {
/// JVM arguments to be added
#[serde(default, skip_serializing_if = "Option::is_none")]
pub add: Option<Vec<String>>,
/// JVM arguments to be removed by exact match
#[serde(default, skip_serializing_if = "Option::is_none")]
pub remove: Option<Vec<String>>,
/// JVM arguments matching any of this regexes will be removed
#[serde(default, skip_serializing_if = "Option::is_none", rename = "removeRegex")]
pub remove_regex: Option<Vec<String>>,
}
/// Specify which image to use, the easiest way is to only configure the `productVersion`. You can also configure a custom image registry to pull from, as well as completely custom images.
///
/// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)> for details.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterImage {
/// Overwrite the docker image. Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub custom: Option<String>,
/// Version of the product, e.g. `1.4.1`.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "productVersion")]
pub product_version: Option<String>,
/// [Pull policy](<https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy)> used when pulling the image.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pullPolicy")]
pub pull_policy: Option<TrinoClusterImagePullPolicy>,
/// [Image pull secrets](<https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod)> to pull images from a private registry.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "pullSecrets")]
pub pull_secrets: Option<Vec<TrinoClusterImagePullSecrets>>,
/// Name of the docker repo, e.g. `oci.stackable.tech/sdp`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub repo: Option<String>,
/// Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`. If not specified, the operator will use its own version, e.g. `23.4.1`. When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "stackableVersion")]
pub stackable_version: Option<String>,
}
/// Specify which image to use, the easiest way is to only configure the `productVersion`. You can also configure a custom image registry to pull from, as well as completely custom images.
///
/// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)> for details.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterImagePullPolicy {
IfNotPresent,
Always,
Never,
}
/// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterImagePullSecrets {
/// Name of the referent. This field is effectively required, but due to backwards compatibility is allowed to be empty. Instances of this type with an empty value here are almost certainly wrong. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
pub name: String,
}
/// This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing all the roleGroups that are part of this role. Additionally, there is a `config`, which is configurable at the role *and* roleGroup level. Everything at roleGroup level is merged on top of what is configured on role level. There is also a second form of config, which can only be configured at role level, the `roleConfig`. You can learn more about this in the [Roles and role group concept documentation](<https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkers {
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
pub cli_overrides: Option<BTreeMap<String, String>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub config: Option<TrinoClusterWorkersConfig>,
/// The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)> and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
/// `envOverrides` configure environment variables to be set in the Pods. It is a map from strings to strings - environment variables and the value to set. Read the [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)> for more information and consult the operator specific usage guide to find out about the product specific environment variables that are available.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
pub env_overrides: Option<BTreeMap<String, String>>,
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "jvmArgumentOverrides")]
pub jvm_argument_overrides: Option<TrinoClusterWorkersJvmArgumentOverrides>,
/// In the `podOverrides` property you can define a [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)> to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)> for more information.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
pub role_config: Option<TrinoClusterWorkersRoleConfig>,
#[serde(rename = "roleGroups")]
pub role_groups: BTreeMap<String, TrinoClusterWorkersRoleGroups>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfig {
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub affinity: Option<TrinoClusterWorkersConfigAffinity>,
/// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
pub graceful_shutdown_timeout: Option<String>,
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub logging: Option<TrinoClusterWorkersConfigLogging>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemory")]
pub query_max_memory: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemoryPerNode")]
pub query_max_memory_per_node: Option<String>,
/// Request secret (currently only autoTls certificates) lifetime from the secret operator, e.g. `7d`, or `30d`. This can be shortened by the `maxCertificateLifetime` setting on the SecretClass issuing the TLS certificate.
///
/// Defaults to `15d` for coordinators (as currently a restart kills all running queries) and `1d` for workers.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "requestedSecretLifetime")]
pub requested_secret_lifetime: Option<String>,
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub resources: Option<TrinoClusterWorkersConfigResources>,
}
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigAffinity {
/// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
pub node_selector: Option<BTreeMap<String, String>>,
/// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
}
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigLogging {
/// Log configuration per container.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub containers: Option<BTreeMap<String, TrinoClusterWorkersConfigLoggingContainers>>,
/// Wether or not to deploy a container with the Vector log agent.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
pub enable_vector_agent: Option<bool>,
}
/// Log configuration per container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigLoggingContainers {
/// Configuration for the console appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub console: Option<TrinoClusterWorkersConfigLoggingContainersConsole>,
/// Custom log configuration provided in a ConfigMap
#[serde(default, skip_serializing_if = "Option::is_none")]
pub custom: Option<TrinoClusterWorkersConfigLoggingContainersCustom>,
/// Configuration for the file appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub file: Option<TrinoClusterWorkersConfigLoggingContainersFile>,
/// Configuration per logger
#[serde(default, skip_serializing_if = "Option::is_none")]
pub loggers: Option<BTreeMap<String, TrinoClusterWorkersConfigLoggingContainersLoggers>>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigLoggingContainersConsole {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterWorkersConfigLoggingContainersConsoleLevel>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterWorkersConfigLoggingContainersConsoleLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Custom log configuration provided in a ConfigMap
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigLoggingContainersCustom {
/// ConfigMap containing the log configuration files
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
pub config_map: Option<String>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigLoggingContainersFile {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterWorkersConfigLoggingContainersFileLevel>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterWorkersConfigLoggingContainersFileLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigLoggingContainersLoggers {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterWorkersConfigLoggingContainersLoggersLevel>,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterWorkersConfigLoggingContainersLoggersLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigResources {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<TrinoClusterWorkersConfigResourcesCpu>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<TrinoClusterWorkersConfigResourcesMemory>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub storage: Option<TrinoClusterWorkersConfigResourcesStorage>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigResourcesCpu {
/// The maximum amount of CPU cores that can be requested by Pods. Equivalent to the `limit` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub max: Option<String>,
/// The minimal amount of CPU cores that Pods need to run. Equivalent to the `request` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub min: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigResourcesMemory {
/// The maximum amount of memory that should be available to the Pod. Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),> which means these suffixes are supported: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: `128974848, 129e6, 129M, 128974848000m, 123Mi`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limit: Option<String>,
/// Additional options that can be specified.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
pub runtime_limits: Option<TrinoClusterWorkersConfigResourcesMemoryRuntimeLimits>,
}
/// Additional options that can be specified.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigResourcesMemoryRuntimeLimits {
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersConfigResourcesStorage {
}
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersJvmArgumentOverrides {
/// JVM arguments to be added
#[serde(default, skip_serializing_if = "Option::is_none")]
pub add: Option<Vec<String>>,
/// JVM arguments to be removed by exact match
#[serde(default, skip_serializing_if = "Option::is_none")]
pub remove: Option<Vec<String>>,
/// JVM arguments matching any of this regexes will be removed
#[serde(default, skip_serializing_if = "Option::is_none", rename = "removeRegex")]
pub remove_regex: Option<Vec<String>>,
}
/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleConfig {
/// This struct is used to configure:
///
/// 1. If PodDisruptionBudgets are created by the operator 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
///
/// Learn more in the [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
pub pod_disruption_budget: Option<TrinoClusterWorkersRoleConfigPodDisruptionBudget>,
}
/// This struct is used to configure:
///
/// 1. If PodDisruptionBudgets are created by the operator 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
///
/// Learn more in the [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleConfigPodDisruptionBudget {
/// Whether a PodDisruptionBudget should be written out for this role. Disabling this enables you to specify your own - custom - one. Defaults to true.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// The number of Pods that are allowed to be down because of voluntary disruptions. If you don't explicitly set this, the operator will use a sane default based upon knowledge about the individual product.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
pub max_unavailable: Option<u16>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroups {
#[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
pub cli_overrides: Option<BTreeMap<String, String>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub config: Option<TrinoClusterWorkersRoleGroupsConfig>,
/// The `configOverrides` can be used to configure properties in product config files that are not exposed in the CRD. Read the [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)> and consult the operator specific usage guide documentation for details on the available config files and settings for the specific product.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
/// `envOverrides` configure environment variables to be set in the Pods. It is a map from strings to strings - environment variables and the value to set. Read the [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)> for more information and consult the operator specific usage guide to find out about the product specific environment variables that are available.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
pub env_overrides: Option<BTreeMap<String, String>>,
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "jvmArgumentOverrides")]
pub jvm_argument_overrides: Option<TrinoClusterWorkersRoleGroupsJvmArgumentOverrides>,
/// In the `podOverrides` property you can define a [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)> to override any property that can be set on a Kubernetes Pod. Read the [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)> for more information.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub replicas: Option<u16>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfig {
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub affinity: Option<TrinoClusterWorkersRoleGroupsConfigAffinity>,
/// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
pub graceful_shutdown_timeout: Option<String>,
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub logging: Option<TrinoClusterWorkersRoleGroupsConfigLogging>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemory")]
pub query_max_memory: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none", rename = "queryMaxMemoryPerNode")]
pub query_max_memory_per_node: Option<String>,
/// Request secret (currently only autoTls certificates) lifetime from the secret operator, e.g. `7d`, or `30d`. This can be shortened by the `maxCertificateLifetime` setting on the SecretClass issuing the TLS certificate.
///
/// Defaults to `15d` for coordinators (as currently a restart kills all running queries) and `1d` for workers.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "requestedSecretLifetime")]
pub requested_secret_lifetime: Option<String>,
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub resources: Option<TrinoClusterWorkersRoleGroupsConfigResources>,
}
/// These configuration settings control [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigAffinity {
/// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
pub node_selector: Option<BTreeMap<String, String>>,
/// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
/// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
}
/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigLogging {
/// Log configuration per container.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub containers: Option<BTreeMap<String, TrinoClusterWorkersRoleGroupsConfigLoggingContainers>>,
/// Wether or not to deploy a container with the Vector log agent.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
pub enable_vector_agent: Option<bool>,
}
/// Log configuration per container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigLoggingContainers {
/// Configuration for the console appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub console: Option<TrinoClusterWorkersRoleGroupsConfigLoggingContainersConsole>,
/// Custom log configuration provided in a ConfigMap
#[serde(default, skip_serializing_if = "Option::is_none")]
pub custom: Option<TrinoClusterWorkersRoleGroupsConfigLoggingContainersCustom>,
/// Configuration for the file appender
#[serde(default, skip_serializing_if = "Option::is_none")]
pub file: Option<TrinoClusterWorkersRoleGroupsConfigLoggingContainersFile>,
/// Configuration per logger
#[serde(default, skip_serializing_if = "Option::is_none")]
pub loggers: Option<BTreeMap<String, TrinoClusterWorkersRoleGroupsConfigLoggingContainersLoggers>>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigLoggingContainersConsole {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterWorkersRoleGroupsConfigLoggingContainersConsoleLevel>,
}
/// Configuration for the console appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterWorkersRoleGroupsConfigLoggingContainersConsoleLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Custom log configuration provided in a ConfigMap
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigLoggingContainersCustom {
/// ConfigMap containing the log configuration files
#[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
pub config_map: Option<String>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigLoggingContainersFile {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterWorkersRoleGroupsConfigLoggingContainersFileLevel>,
}
/// Configuration for the file appender
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterWorkersRoleGroupsConfigLoggingContainersFileLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigLoggingContainersLoggers {
/// The log level threshold. Log events with a lower log level are discarded.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub level: Option<TrinoClusterWorkersRoleGroupsConfigLoggingContainersLoggersLevel>,
}
/// Configuration per logger
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum TrinoClusterWorkersRoleGroupsConfigLoggingContainersLoggersLevel {
#[serde(rename = "TRACE")]
Trace,
#[serde(rename = "DEBUG")]
Debug,
#[serde(rename = "INFO")]
Info,
#[serde(rename = "WARN")]
Warn,
#[serde(rename = "ERROR")]
Error,
#[serde(rename = "FATAL")]
Fatal,
#[serde(rename = "NONE")]
None,
}
/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage usage, if this role needs any.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigResources {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub cpu: Option<TrinoClusterWorkersRoleGroupsConfigResourcesCpu>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub memory: Option<TrinoClusterWorkersRoleGroupsConfigResourcesMemory>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub storage: Option<TrinoClusterWorkersRoleGroupsConfigResourcesStorage>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigResourcesCpu {
/// The maximum amount of CPU cores that can be requested by Pods. Equivalent to the `limit` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub max: Option<String>,
/// The minimal amount of CPU cores that Pods need to run. Equivalent to the `request` for Pod resource configuration. Cores are specified either as a decimal point number or as milli units. For example:`1.5` will be 1.5 cores, also written as `1500m`.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub min: Option<String>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigResourcesMemory {
/// The maximum amount of memory that should be available to the Pod. Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),> which means these suffixes are supported: E, P, T, G, M, k. You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki. For example, the following represent roughly the same value: `128974848, 129e6, 129M, 128974848000m, 123Mi`
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limit: Option<String>,
/// Additional options that can be specified.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
pub runtime_limits: Option<TrinoClusterWorkersRoleGroupsConfigResourcesMemoryRuntimeLimits>,
}
/// Additional options that can be specified.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigResourcesMemoryRuntimeLimits {
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsConfigResourcesStorage {
}
/// Allows overriding JVM arguments. Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)> for details on the usage.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterWorkersRoleGroupsJvmArgumentOverrides {
/// JVM arguments to be added
#[serde(default, skip_serializing_if = "Option::is_none")]
pub add: Option<Vec<String>>,
/// JVM arguments to be removed by exact match
#[serde(default, skip_serializing_if = "Option::is_none")]
pub remove: Option<Vec<String>>,
/// JVM arguments matching any of this regexes will be removed
#[serde(default, skip_serializing_if = "Option::is_none", rename = "removeRegex")]
pub remove_regex: Option<Vec<String>>,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct TrinoClusterStatus {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub conditions: Option<Vec<Condition>>,
}