Skip to main content

kcr_airflow_stackable_tech/v1alpha1/
airflowclusters.rs

1// WARNING: generated by kopium - manual changes will be overwritten
2// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/stackabletech/airflow-operator/airflow.stackable.tech/v1alpha1/airflowclusters.yaml
3// kopium version: 0.23.0
4
5#[allow(unused_imports)]
6mod prelude {
7    pub use kube::CustomResource;
8    pub use serde::{Serialize, Deserialize};
9    pub use std::collections::BTreeMap;
10    pub use k8s_openapi::apimachinery::pkg::apis::meta::v1::Condition;
11}
12
13use self::prelude::*;
14
15/// An Airflow cluster stacklet. This resource is managed by the Stackable operator for Apache Airflow.
16/// Find more information on how to use it and the resources that the operator generates in the
17/// [operator documentation](<https://docs.stackable.tech/home/nightly/airflow/).>
18/// 
19/// The CRD contains three roles: webserver, scheduler and worker/celeryExecutor.
20/// You can use either the celeryExecutor or the kubernetesExecutor.
21#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
22#[kube(group = "airflow.stackable.tech", version = "v1alpha1", kind = "AirflowCluster", plural = "airflowclusters")]
23#[kube(namespaced)]
24#[kube(status = "AirflowClusterStatus")]
25#[kube(schema = "disabled")]
26#[kube(derive="Default")]
27#[kube(derive="PartialEq")]
28pub struct AirflowClusterSpec {
29    /// The celery executor.
30    /// Deployed with an explicit number of replicas.
31    #[serde(default, skip_serializing_if = "Option::is_none", rename = "celeryExecutors")]
32    pub celery_executors: Option<AirflowClusterCeleryExecutors>,
33    /// Configuration that applies to all roles and role groups.
34    /// This includes settings for authentication, git sync, service exposition and volumes, among other things.
35    #[serde(rename = "clusterConfig")]
36    pub cluster_config: AirflowClusterClusterConfig,
37    /// [Cluster operations](<https://docs.stackable.tech/home/nightly/concepts/operations/cluster_operations)>
38    /// properties, allow stopping the product instance as well as pausing reconciliation.
39    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterOperation")]
40    pub cluster_operation: Option<AirflowClusterClusterOperation>,
41    /// The `dagProcessors` role runs the DAG processor routine for DAG preparation.
42    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dagProcessors")]
43    pub dag_processors: Option<AirflowClusterDagProcessors>,
44    /// Specify which image to use, the easiest way is to only configure the `productVersion`.
45    /// You can also configure a custom image registry to pull from, as well as completely custom
46    /// images.
47    /// 
48    /// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)>
49    /// for details.
50    pub image: AirflowClusterImage,
51    /// With the Kuberentes executor, executor Pods are created on demand.
52    #[serde(default, skip_serializing_if = "Option::is_none", rename = "kubernetesExecutors")]
53    pub kubernetes_executors: Option<AirflowClusterKubernetesExecutors>,
54    /// A list of generic Kubernetes objects, which are merged into the objects that the operator
55    /// creates.
56    /// 
57    /// List entries are arbitrary YAML objects, which need to be valid Kubernetes objects.
58    /// 
59    /// Read the [Object overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#object-overrides)>
60    /// for more information.
61    #[serde(default, skip_serializing_if = "Option::is_none", rename = "objectOverrides")]
62    pub object_overrides: Option<Vec<BTreeMap<String, serde_json::Value>>>,
63    /// The `schedulers` is responsible for triggering jobs and persisting their metadata to the backend database.
64    /// Jobs are scheduled on the workers/executors.
65    #[serde(default, skip_serializing_if = "Option::is_none")]
66    pub schedulers: Option<AirflowClusterSchedulers>,
67    /// The `triggerers` role runs the triggerer process for use with deferrable DAG operators.
68    #[serde(default, skip_serializing_if = "Option::is_none")]
69    pub triggerers: Option<AirflowClusterTriggerers>,
70    /// The `webservers` role provides the main UI for user interaction.
71    #[serde(default, skip_serializing_if = "Option::is_none")]
72    pub webservers: Option<AirflowClusterWebservers>,
73}
74
75/// The celery executor.
76/// Deployed with an explicit number of replicas.
77#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
78pub struct AirflowClusterCeleryExecutors {
79    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
80    pub cli_overrides: Option<BTreeMap<String, String>>,
81    #[serde(default, skip_serializing_if = "Option::is_none")]
82    pub config: Option<AirflowClusterCeleryExecutorsConfig>,
83    /// The `configOverrides` can be used to configure properties in product config files
84    /// that are not exposed in the CRD. Read the
85    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
86    /// and consult the operator specific usage guide documentation for details on the
87    /// available config files and settings for the specific product.
88    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
89    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
90    /// `envOverrides` configure environment variables to be set in the Pods.
91    /// It is a map from strings to strings - environment variables and the value to set.
92    /// Read the
93    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
94    /// for more information and consult the operator specific usage guide to find out about
95    /// the product specific environment variables that are available.
96    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
97    pub env_overrides: Option<BTreeMap<String, String>>,
98    /// In the `podOverrides` property you can define a
99    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
100    /// to override any property that can be set on a Kubernetes Pod.
101    /// Read the
102    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
103    /// for more information.
104    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
105    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
106    /// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
107    #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
108    pub role_config: Option<AirflowClusterCeleryExecutorsRoleConfig>,
109    #[serde(rename = "roleGroups")]
110    pub role_groups: BTreeMap<String, AirflowClusterCeleryExecutorsRoleGroups>,
111}
112
113#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
114pub struct AirflowClusterCeleryExecutorsConfig {
115    /// These configuration settings control
116    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
117    #[serde(default, skip_serializing_if = "Option::is_none")]
118    pub affinity: Option<AirflowClusterCeleryExecutorsConfigAffinity>,
119    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
120    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
121    pub graceful_shutdown_timeout: Option<String>,
122    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
123    #[serde(default, skip_serializing_if = "Option::is_none")]
124    pub logging: Option<AirflowClusterCeleryExecutorsConfigLogging>,
125    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
126    /// usage, if this role needs any.
127    #[serde(default, skip_serializing_if = "Option::is_none")]
128    pub resources: Option<AirflowClusterCeleryExecutorsConfigResources>,
129}
130
131/// These configuration settings control
132/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
133#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
134pub struct AirflowClusterCeleryExecutorsConfigAffinity {
135    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
136    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
137    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
138    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
139    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
140    pub node_selector: Option<BTreeMap<String, String>>,
141    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
142    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
143    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
144    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
145    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
146    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
147}
148
149/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
150#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
151pub struct AirflowClusterCeleryExecutorsConfigLogging {
152    /// Log configuration per container.
153    #[serde(default, skip_serializing_if = "Option::is_none")]
154    pub containers: Option<BTreeMap<String, AirflowClusterCeleryExecutorsConfigLoggingContainers>>,
155    /// Wether or not to deploy a container with the Vector log agent.
156    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
157    pub enable_vector_agent: Option<bool>,
158}
159
160/// Log configuration per container.
161#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
162pub struct AirflowClusterCeleryExecutorsConfigLoggingContainers {
163    /// Configuration for the console appender
164    #[serde(default, skip_serializing_if = "Option::is_none")]
165    pub console: Option<AirflowClusterCeleryExecutorsConfigLoggingContainersConsole>,
166    /// Log configuration provided in a ConfigMap
167    #[serde(default, skip_serializing_if = "Option::is_none")]
168    pub custom: Option<AirflowClusterCeleryExecutorsConfigLoggingContainersCustom>,
169    /// Configuration for the file appender
170    #[serde(default, skip_serializing_if = "Option::is_none")]
171    pub file: Option<AirflowClusterCeleryExecutorsConfigLoggingContainersFile>,
172    /// Configuration per logger
173    #[serde(default, skip_serializing_if = "Option::is_none")]
174    pub loggers: Option<BTreeMap<String, AirflowClusterCeleryExecutorsConfigLoggingContainersLoggers>>,
175}
176
177/// Configuration for the console appender
178#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
179pub struct AirflowClusterCeleryExecutorsConfigLoggingContainersConsole {
180    /// The log level threshold.
181    /// Log events with a lower log level are discarded.
182    #[serde(default, skip_serializing_if = "Option::is_none")]
183    pub level: Option<AirflowClusterCeleryExecutorsConfigLoggingContainersConsoleLevel>,
184}
185
186/// Configuration for the console appender
187#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
188pub enum AirflowClusterCeleryExecutorsConfigLoggingContainersConsoleLevel {
189    #[serde(rename = "TRACE")]
190    Trace,
191    #[serde(rename = "DEBUG")]
192    Debug,
193    #[serde(rename = "INFO")]
194    Info,
195    #[serde(rename = "WARN")]
196    Warn,
197    #[serde(rename = "ERROR")]
198    Error,
199    #[serde(rename = "FATAL")]
200    Fatal,
201    #[serde(rename = "NONE")]
202    None,
203}
204
205/// Log configuration provided in a ConfigMap
206#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
207pub struct AirflowClusterCeleryExecutorsConfigLoggingContainersCustom {
208    /// ConfigMap containing the log configuration files
209    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
210    pub config_map: Option<String>,
211}
212
213/// Configuration for the file appender
214#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
215pub struct AirflowClusterCeleryExecutorsConfigLoggingContainersFile {
216    /// The log level threshold.
217    /// Log events with a lower log level are discarded.
218    #[serde(default, skip_serializing_if = "Option::is_none")]
219    pub level: Option<AirflowClusterCeleryExecutorsConfigLoggingContainersFileLevel>,
220}
221
222/// Configuration for the file appender
223#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
224pub enum AirflowClusterCeleryExecutorsConfigLoggingContainersFileLevel {
225    #[serde(rename = "TRACE")]
226    Trace,
227    #[serde(rename = "DEBUG")]
228    Debug,
229    #[serde(rename = "INFO")]
230    Info,
231    #[serde(rename = "WARN")]
232    Warn,
233    #[serde(rename = "ERROR")]
234    Error,
235    #[serde(rename = "FATAL")]
236    Fatal,
237    #[serde(rename = "NONE")]
238    None,
239}
240
241/// Configuration per logger
242#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
243pub struct AirflowClusterCeleryExecutorsConfigLoggingContainersLoggers {
244    /// The log level threshold.
245    /// Log events with a lower log level are discarded.
246    #[serde(default, skip_serializing_if = "Option::is_none")]
247    pub level: Option<AirflowClusterCeleryExecutorsConfigLoggingContainersLoggersLevel>,
248}
249
250/// Configuration per logger
251#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
252pub enum AirflowClusterCeleryExecutorsConfigLoggingContainersLoggersLevel {
253    #[serde(rename = "TRACE")]
254    Trace,
255    #[serde(rename = "DEBUG")]
256    Debug,
257    #[serde(rename = "INFO")]
258    Info,
259    #[serde(rename = "WARN")]
260    Warn,
261    #[serde(rename = "ERROR")]
262    Error,
263    #[serde(rename = "FATAL")]
264    Fatal,
265    #[serde(rename = "NONE")]
266    None,
267}
268
269/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
270/// usage, if this role needs any.
271#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
272pub struct AirflowClusterCeleryExecutorsConfigResources {
273    #[serde(default, skip_serializing_if = "Option::is_none")]
274    pub cpu: Option<AirflowClusterCeleryExecutorsConfigResourcesCpu>,
275    #[serde(default, skip_serializing_if = "Option::is_none")]
276    pub memory: Option<AirflowClusterCeleryExecutorsConfigResourcesMemory>,
277    #[serde(default, skip_serializing_if = "Option::is_none")]
278    pub storage: Option<AirflowClusterCeleryExecutorsConfigResourcesStorage>,
279}
280
281#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
282pub struct AirflowClusterCeleryExecutorsConfigResourcesCpu {
283    /// The maximum amount of CPU cores that can be requested by Pods.
284    /// Equivalent to the `limit` for Pod resource configuration.
285    /// Cores are specified either as a decimal point number or as milli units.
286    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
287    #[serde(default, skip_serializing_if = "Option::is_none")]
288    pub max: Option<String>,
289    /// The minimal amount of CPU cores that Pods need to run.
290    /// Equivalent to the `request` for Pod resource configuration.
291    /// Cores are specified either as a decimal point number or as milli units.
292    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
293    #[serde(default, skip_serializing_if = "Option::is_none")]
294    pub min: Option<String>,
295}
296
297#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
298pub struct AirflowClusterCeleryExecutorsConfigResourcesMemory {
299    /// The maximum amount of memory that should be available to the Pod.
300    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
301    /// which means these suffixes are supported: E, P, T, G, M, k.
302    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
303    /// For example, the following represent roughly the same value:
304    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
305    #[serde(default, skip_serializing_if = "Option::is_none")]
306    pub limit: Option<String>,
307    /// Additional options that can be specified.
308    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
309    pub runtime_limits: Option<AirflowClusterCeleryExecutorsConfigResourcesMemoryRuntimeLimits>,
310}
311
312/// Additional options that can be specified.
313#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
314pub struct AirflowClusterCeleryExecutorsConfigResourcesMemoryRuntimeLimits {
315}
316
317#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
318pub struct AirflowClusterCeleryExecutorsConfigResourcesStorage {
319}
320
321/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
322#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
323pub struct AirflowClusterCeleryExecutorsRoleConfig {
324    /// This struct is used to configure:
325    /// 
326    /// 1. If PodDisruptionBudgets are created by the operator
327    /// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
328    /// 
329    /// Learn more in the
330    /// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
331    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
332    pub pod_disruption_budget: Option<AirflowClusterCeleryExecutorsRoleConfigPodDisruptionBudget>,
333}
334
335/// This struct is used to configure:
336/// 
337/// 1. If PodDisruptionBudgets are created by the operator
338/// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
339/// 
340/// Learn more in the
341/// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
342#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
343pub struct AirflowClusterCeleryExecutorsRoleConfigPodDisruptionBudget {
344    /// Whether a PodDisruptionBudget should be written out for this role.
345    /// Disabling this enables you to specify your own - custom - one.
346    /// Defaults to true.
347    #[serde(default, skip_serializing_if = "Option::is_none")]
348    pub enabled: Option<bool>,
349    /// The number of Pods that are allowed to be down because of voluntary disruptions.
350    /// If you don't explicitly set this, the operator will use a sane default based
351    /// upon knowledge about the individual product.
352    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
353    pub max_unavailable: Option<u16>,
354}
355
356#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
357pub struct AirflowClusterCeleryExecutorsRoleGroups {
358    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
359    pub cli_overrides: Option<BTreeMap<String, String>>,
360    #[serde(default, skip_serializing_if = "Option::is_none")]
361    pub config: Option<AirflowClusterCeleryExecutorsRoleGroupsConfig>,
362    /// The `configOverrides` can be used to configure properties in product config files
363    /// that are not exposed in the CRD. Read the
364    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
365    /// and consult the operator specific usage guide documentation for details on the
366    /// available config files and settings for the specific product.
367    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
368    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
369    /// `envOverrides` configure environment variables to be set in the Pods.
370    /// It is a map from strings to strings - environment variables and the value to set.
371    /// Read the
372    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
373    /// for more information and consult the operator specific usage guide to find out about
374    /// the product specific environment variables that are available.
375    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
376    pub env_overrides: Option<BTreeMap<String, String>>,
377    /// In the `podOverrides` property you can define a
378    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
379    /// to override any property that can be set on a Kubernetes Pod.
380    /// Read the
381    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
382    /// for more information.
383    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
384    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
385    #[serde(default, skip_serializing_if = "Option::is_none")]
386    pub replicas: Option<u16>,
387}
388
389#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
390pub struct AirflowClusterCeleryExecutorsRoleGroupsConfig {
391    /// These configuration settings control
392    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
393    #[serde(default, skip_serializing_if = "Option::is_none")]
394    pub affinity: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigAffinity>,
395    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
396    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
397    pub graceful_shutdown_timeout: Option<String>,
398    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
399    #[serde(default, skip_serializing_if = "Option::is_none")]
400    pub logging: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigLogging>,
401    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
402    /// usage, if this role needs any.
403    #[serde(default, skip_serializing_if = "Option::is_none")]
404    pub resources: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigResources>,
405}
406
407/// These configuration settings control
408/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
409#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
410pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigAffinity {
411    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
412    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
413    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
414    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
415    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
416    pub node_selector: Option<BTreeMap<String, String>>,
417    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
418    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
419    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
420    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
421    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
422    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
423}
424
425/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
426#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
427pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigLogging {
428    /// Log configuration per container.
429    #[serde(default, skip_serializing_if = "Option::is_none")]
430    pub containers: Option<BTreeMap<String, AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainers>>,
431    /// Wether or not to deploy a container with the Vector log agent.
432    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
433    pub enable_vector_agent: Option<bool>,
434}
435
436/// Log configuration per container.
437#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
438pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainers {
439    /// Configuration for the console appender
440    #[serde(default, skip_serializing_if = "Option::is_none")]
441    pub console: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersConsole>,
442    /// Log configuration provided in a ConfigMap
443    #[serde(default, skip_serializing_if = "Option::is_none")]
444    pub custom: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersCustom>,
445    /// Configuration for the file appender
446    #[serde(default, skip_serializing_if = "Option::is_none")]
447    pub file: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersFile>,
448    /// Configuration per logger
449    #[serde(default, skip_serializing_if = "Option::is_none")]
450    pub loggers: Option<BTreeMap<String, AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersLoggers>>,
451}
452
453/// Configuration for the console appender
454#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
455pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersConsole {
456    /// The log level threshold.
457    /// Log events with a lower log level are discarded.
458    #[serde(default, skip_serializing_if = "Option::is_none")]
459    pub level: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersConsoleLevel>,
460}
461
462/// Configuration for the console appender
463#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
464pub enum AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersConsoleLevel {
465    #[serde(rename = "TRACE")]
466    Trace,
467    #[serde(rename = "DEBUG")]
468    Debug,
469    #[serde(rename = "INFO")]
470    Info,
471    #[serde(rename = "WARN")]
472    Warn,
473    #[serde(rename = "ERROR")]
474    Error,
475    #[serde(rename = "FATAL")]
476    Fatal,
477    #[serde(rename = "NONE")]
478    None,
479}
480
481/// Log configuration provided in a ConfigMap
482#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
483pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersCustom {
484    /// ConfigMap containing the log configuration files
485    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
486    pub config_map: Option<String>,
487}
488
489/// Configuration for the file appender
490#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
491pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersFile {
492    /// The log level threshold.
493    /// Log events with a lower log level are discarded.
494    #[serde(default, skip_serializing_if = "Option::is_none")]
495    pub level: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersFileLevel>,
496}
497
498/// Configuration for the file appender
499#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
500pub enum AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersFileLevel {
501    #[serde(rename = "TRACE")]
502    Trace,
503    #[serde(rename = "DEBUG")]
504    Debug,
505    #[serde(rename = "INFO")]
506    Info,
507    #[serde(rename = "WARN")]
508    Warn,
509    #[serde(rename = "ERROR")]
510    Error,
511    #[serde(rename = "FATAL")]
512    Fatal,
513    #[serde(rename = "NONE")]
514    None,
515}
516
517/// Configuration per logger
518#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
519pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersLoggers {
520    /// The log level threshold.
521    /// Log events with a lower log level are discarded.
522    #[serde(default, skip_serializing_if = "Option::is_none")]
523    pub level: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersLoggersLevel>,
524}
525
526/// Configuration per logger
527#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
528pub enum AirflowClusterCeleryExecutorsRoleGroupsConfigLoggingContainersLoggersLevel {
529    #[serde(rename = "TRACE")]
530    Trace,
531    #[serde(rename = "DEBUG")]
532    Debug,
533    #[serde(rename = "INFO")]
534    Info,
535    #[serde(rename = "WARN")]
536    Warn,
537    #[serde(rename = "ERROR")]
538    Error,
539    #[serde(rename = "FATAL")]
540    Fatal,
541    #[serde(rename = "NONE")]
542    None,
543}
544
545/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
546/// usage, if this role needs any.
547#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
548pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigResources {
549    #[serde(default, skip_serializing_if = "Option::is_none")]
550    pub cpu: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesCpu>,
551    #[serde(default, skip_serializing_if = "Option::is_none")]
552    pub memory: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesMemory>,
553    #[serde(default, skip_serializing_if = "Option::is_none")]
554    pub storage: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesStorage>,
555}
556
557#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
558pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesCpu {
559    /// The maximum amount of CPU cores that can be requested by Pods.
560    /// Equivalent to the `limit` for Pod resource configuration.
561    /// Cores are specified either as a decimal point number or as milli units.
562    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
563    #[serde(default, skip_serializing_if = "Option::is_none")]
564    pub max: Option<String>,
565    /// The minimal amount of CPU cores that Pods need to run.
566    /// Equivalent to the `request` for Pod resource configuration.
567    /// Cores are specified either as a decimal point number or as milli units.
568    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
569    #[serde(default, skip_serializing_if = "Option::is_none")]
570    pub min: Option<String>,
571}
572
573#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
574pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesMemory {
575    /// The maximum amount of memory that should be available to the Pod.
576    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
577    /// which means these suffixes are supported: E, P, T, G, M, k.
578    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
579    /// For example, the following represent roughly the same value:
580    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
581    #[serde(default, skip_serializing_if = "Option::is_none")]
582    pub limit: Option<String>,
583    /// Additional options that can be specified.
584    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
585    pub runtime_limits: Option<AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesMemoryRuntimeLimits>,
586}
587
588/// Additional options that can be specified.
589#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
590pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesMemoryRuntimeLimits {
591}
592
593#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
594pub struct AirflowClusterCeleryExecutorsRoleGroupsConfigResourcesStorage {
595}
596
597/// Configuration that applies to all roles and role groups.
598/// This includes settings for authentication, git sync, service exposition and volumes, among other things.
599#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
600pub struct AirflowClusterClusterConfig {
601    #[serde(default, skip_serializing_if = "Option::is_none")]
602    pub authentication: Option<Vec<AirflowClusterClusterConfigAuthentication>>,
603    /// Authorization options.
604    /// Learn more in the [Airflow authorization usage guide](<https://docs.stackable.tech/home/nightly/airflow/usage-guide/security#_authorization).>
605    #[serde(default, skip_serializing_if = "Option::is_none")]
606    pub authorization: Option<AirflowClusterClusterConfigAuthorization>,
607    /// The name of the Secret object containing the admin user credentials and database connection details.
608    /// Read the
609    /// [getting started guide first steps](<https://docs.stackable.tech/home/nightly/airflow/getting_started/first_steps)>
610    /// to find out more.
611    #[serde(rename = "credentialsSecret")]
612    pub credentials_secret: String,
613    /// The `gitSync` settings allow configuring DAGs to mount via `git-sync`.
614    /// Learn more in the
615    /// [mounting DAGs documentation](<https://docs.stackable.tech/home/nightly/airflow/usage-guide/mounting-dags#_via_git_sync).>
616    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dagsGitSync")]
617    pub dags_git_sync: Option<Vec<AirflowClusterClusterConfigDagsGitSync>>,
618    /// Settings related to the database initialization routines (which are always executed by default).
619    #[serde(default, skip_serializing_if = "Option::is_none", rename = "databaseInitialization")]
620    pub database_initialization: Option<AirflowClusterClusterConfigDatabaseInitialization>,
621    /// for internal use only - not for production use.
622    #[serde(default, skip_serializing_if = "Option::is_none", rename = "exposeConfig")]
623    pub expose_config: Option<bool>,
624    /// Whether to load example DAGs or not; defaults to false. The examples are used in the
625    /// [getting started guide](<https://docs.stackable.tech/home/nightly/airflow/getting_started/).>
626    #[serde(default, skip_serializing_if = "Option::is_none", rename = "loadExamples")]
627    pub load_examples: Option<bool>,
628    /// Name of the Vector aggregator [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery).>
629    /// It must contain the key `ADDRESS` with the address of the Vector aggregator.
630    /// Follow the [logging tutorial](<https://docs.stackable.tech/home/nightly/tutorials/logging-vector-aggregator)>
631    /// to learn how to configure log aggregation with Vector.
632    #[serde(default, skip_serializing_if = "Option::is_none", rename = "vectorAggregatorConfigMapName")]
633    pub vector_aggregator_config_map_name: Option<String>,
634    /// Additional volumes to mount. Use together with `volumes` to define volumes.
635    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeMounts")]
636    pub volume_mounts: Option<Vec<BTreeMap<String, serde_json::Value>>>,
637    /// Additional volumes to define. Use together with `volumeMounts` to mount the volumes.
638    #[serde(default, skip_serializing_if = "Option::is_none")]
639    pub volumes: Option<Vec<BTreeMap<String, serde_json::Value>>>,
640}
641
642#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
643pub struct AirflowClusterClusterConfigAuthentication {
644    /// Name of the [AuthenticationClass](<https://docs.stackable.tech/home/nightly/concepts/authentication)> used to authenticate users
645    #[serde(rename = "authenticationClass")]
646    pub authentication_class: String,
647    /// This field contains OIDC-specific configuration. It is only required in case OIDC is used.
648    #[serde(default, skip_serializing_if = "Option::is_none")]
649    pub oidc: Option<AirflowClusterClusterConfigAuthenticationOidc>,
650    /// If we should replace ALL the user's roles each login, or only on registration.
651    /// Gets mapped to `AUTH_ROLES_SYNC_AT_LOGIN`
652    #[serde(default, skip_serializing_if = "Option::is_none", rename = "syncRolesAt")]
653    pub sync_roles_at: Option<AirflowClusterClusterConfigAuthenticationSyncRolesAt>,
654    /// Allow users who are not already in the FAB DB.
655    /// Gets mapped to `AUTH_USER_REGISTRATION`
656    #[serde(default, skip_serializing_if = "Option::is_none", rename = "userRegistration")]
657    pub user_registration: Option<bool>,
658    /// This role will be given in addition to any AUTH_ROLES_MAPPING.
659    /// Gets mapped to `AUTH_USER_REGISTRATION_ROLE`
660    #[serde(default, skip_serializing_if = "Option::is_none", rename = "userRegistrationRole")]
661    pub user_registration_role: Option<String>,
662}
663
664/// This field contains OIDC-specific configuration. It is only required in case OIDC is used.
665#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
666pub struct AirflowClusterClusterConfigAuthenticationOidc {
667    /// A reference to the OIDC client credentials secret. The secret contains
668    /// the client id and secret.
669    #[serde(rename = "clientCredentialsSecret")]
670    pub client_credentials_secret: String,
671    /// An optional list of extra scopes which get merged with the scopes defined in the AuthenticationClass
672    #[serde(default, skip_serializing_if = "Option::is_none", rename = "extraScopes")]
673    pub extra_scopes: Option<Vec<String>>,
674}
675
676#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
677pub enum AirflowClusterClusterConfigAuthenticationSyncRolesAt {
678    Registration,
679    Login,
680}
681
682/// Authorization options.
683/// Learn more in the [Airflow authorization usage guide](<https://docs.stackable.tech/home/nightly/airflow/usage-guide/security#_authorization).>
684#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
685pub struct AirflowClusterClusterConfigAuthorization {
686    /// Configure the OPA stacklet [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)>
687    /// and the name of the Rego package containing your authorization rules.
688    /// Consult the [OPA authorization documentation](<https://docs.stackable.tech/home/nightly/concepts/opa)>
689    /// to learn how to deploy Rego authorization rules with OPA.
690    #[serde(default, skip_serializing_if = "Option::is_none")]
691    pub opa: Option<AirflowClusterClusterConfigAuthorizationOpa>,
692}
693
694/// Configure the OPA stacklet [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)>
695/// and the name of the Rego package containing your authorization rules.
696/// Consult the [OPA authorization documentation](<https://docs.stackable.tech/home/nightly/concepts/opa)>
697/// to learn how to deploy Rego authorization rules with OPA.
698#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
699pub struct AirflowClusterClusterConfigAuthorizationOpa {
700    /// Least Recently Used (LRU) cache with per-entry time-to-live (TTL) value.
701    #[serde(default, skip_serializing_if = "Option::is_none")]
702    pub cache: Option<AirflowClusterClusterConfigAuthorizationOpaCache>,
703    /// The [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery)>
704    /// for the OPA stacklet that should be used for authorization requests.
705    #[serde(rename = "configMapName")]
706    pub config_map_name: String,
707    /// The name of the Rego package containing the Rego rules for the product.
708    #[serde(default, skip_serializing_if = "Option::is_none")]
709    pub package: Option<String>,
710}
711
712/// Least Recently Used (LRU) cache with per-entry time-to-live (TTL) value.
713#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
714pub struct AirflowClusterClusterConfigAuthorizationOpaCache {
715    /// Time to live per entry
716    #[serde(default, skip_serializing_if = "Option::is_none", rename = "entryTimeToLive")]
717    pub entry_time_to_live: Option<String>,
718    /// Maximum number of entries in the cache; If this threshold is reached then the least
719    /// recently used item is removed.
720    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxEntries")]
721    pub max_entries: Option<u32>,
722}
723
724#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
725pub struct AirflowClusterClusterConfigDagsGitSync {
726    /// The branch to clone; defaults to `main`.
727    /// 
728    /// Since git-sync v4.x.x this field is mapped to the flag `--ref`.
729    #[serde(default, skip_serializing_if = "Option::is_none")]
730    pub branch: Option<String>,
731    /// The name of the Secret used to access the repository if it is not public.
732    /// 
733    /// The referenced Secret must include two fields: `user` and `password`.
734    /// The `password` field can either be an actual password (not recommended) or a GitHub token,
735    /// as described in the git-sync [documentation].
736    /// 
737    /// [documentation]: <https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual>
738    #[serde(default, skip_serializing_if = "Option::is_none", rename = "credentialsSecret")]
739    pub credentials_secret: Option<String>,
740    /// The depth of syncing, i.e. the number of commits to clone; defaults to 1.
741    #[serde(default, skip_serializing_if = "Option::is_none")]
742    pub depth: Option<u32>,
743    /// Location in the Git repository containing the resource; defaults to the root folder.
744    /// 
745    /// It can optionally start with `/`, however, no trailing slash is recommended.
746    /// An empty string (``) or slash (`/`) corresponds to the root folder in Git.
747    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gitFolder")]
748    pub git_folder: Option<String>,
749    /// A map of optional configuration settings that are listed in the git-sync [documentation].
750    /// 
751    /// Also read the git-sync [example] in our documentation. These settings are not verified.
752    /// 
753    /// [documentation]: <https://github.com/kubernetes/git-sync/tree/v4.2.4?tab=readme-ov-file#manual>
754    /// [example]: <https://docs.stackable.tech/home/nightly/airflow/usage-guide/mounting-dags#_example>
755    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gitSyncConf")]
756    pub git_sync_conf: Option<BTreeMap<String, String>>,
757    /// The git repository URL that will be cloned, for example: `<https://github.com/stackabletech/airflow-operator`.>
758    pub repo: String,
759    /// The synchronization interval, e.g. `20s` or `5m`; defaults to `20s`.
760    /// 
761    /// Since git-sync v4.x.x this field is mapped to the flag `--period`.
762    #[serde(default, skip_serializing_if = "Option::is_none")]
763    pub wait: Option<String>,
764}
765
766/// Settings related to the database initialization routines (which are always executed by default).
767#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
768pub struct AirflowClusterClusterConfigDatabaseInitialization {
769    /// Whether to execute the database initialization routines (a combination of database initialization, upgrade and migration depending on the Airflow version). Defaults to true to be backwards-compatible.
770    /// WARNING: setting this to false is *unsupported* as subsequent updates to the Airflow cluster may result in broken behaviour due to inconsistent metadata!
771    /// Do not change the default unless you know what you are doing!
772    #[serde(default, skip_serializing_if = "Option::is_none")]
773    pub enabled: Option<bool>,
774}
775
776/// [Cluster operations](<https://docs.stackable.tech/home/nightly/concepts/operations/cluster_operations)>
777/// properties, allow stopping the product instance as well as pausing reconciliation.
778#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
779pub struct AirflowClusterClusterOperation {
780    /// Flag to stop cluster reconciliation by the operator. This means that all changes in the
781    /// custom resource spec are ignored until this flag is set to false or removed. The operator
782    /// will however still watch the deployed resources at the time and update the custom resource
783    /// status field.
784    /// If applied at the same time with `stopped`, `reconciliationPaused` will take precedence over
785    /// `stopped` and stop the reconciliation immediately.
786    #[serde(default, skip_serializing_if = "Option::is_none", rename = "reconciliationPaused")]
787    pub reconciliation_paused: Option<bool>,
788    /// Flag to stop the cluster. This means all deployed resources (e.g. Services, StatefulSets,
789    /// ConfigMaps) are kept but all deployed Pods (e.g. replicas from a StatefulSet) are scaled to 0
790    /// and therefore stopped and removed.
791    /// If applied at the same time with `reconciliationPaused`, the latter will pause reconciliation
792    /// and `stopped` will take no effect until `reconciliationPaused` is set to false or removed.
793    #[serde(default, skip_serializing_if = "Option::is_none")]
794    pub stopped: Option<bool>,
795}
796
797/// The `dagProcessors` role runs the DAG processor routine for DAG preparation.
798#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
799pub struct AirflowClusterDagProcessors {
800    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
801    pub cli_overrides: Option<BTreeMap<String, String>>,
802    #[serde(default, skip_serializing_if = "Option::is_none")]
803    pub config: Option<AirflowClusterDagProcessorsConfig>,
804    /// The `configOverrides` can be used to configure properties in product config files
805    /// that are not exposed in the CRD. Read the
806    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
807    /// and consult the operator specific usage guide documentation for details on the
808    /// available config files and settings for the specific product.
809    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
810    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
811    /// `envOverrides` configure environment variables to be set in the Pods.
812    /// It is a map from strings to strings - environment variables and the value to set.
813    /// Read the
814    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
815    /// for more information and consult the operator specific usage guide to find out about
816    /// the product specific environment variables that are available.
817    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
818    pub env_overrides: Option<BTreeMap<String, String>>,
819    /// In the `podOverrides` property you can define a
820    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
821    /// to override any property that can be set on a Kubernetes Pod.
822    /// Read the
823    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
824    /// for more information.
825    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
826    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
827    /// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
828    #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
829    pub role_config: Option<AirflowClusterDagProcessorsRoleConfig>,
830    #[serde(rename = "roleGroups")]
831    pub role_groups: BTreeMap<String, AirflowClusterDagProcessorsRoleGroups>,
832}
833
834#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
835pub struct AirflowClusterDagProcessorsConfig {
836    /// These configuration settings control
837    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
838    #[serde(default, skip_serializing_if = "Option::is_none")]
839    pub affinity: Option<AirflowClusterDagProcessorsConfigAffinity>,
840    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
841    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
842    pub graceful_shutdown_timeout: Option<String>,
843    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
844    #[serde(default, skip_serializing_if = "Option::is_none")]
845    pub logging: Option<AirflowClusterDagProcessorsConfigLogging>,
846    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
847    /// usage, if this role needs any.
848    #[serde(default, skip_serializing_if = "Option::is_none")]
849    pub resources: Option<AirflowClusterDagProcessorsConfigResources>,
850}
851
852/// These configuration settings control
853/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
854#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
855pub struct AirflowClusterDagProcessorsConfigAffinity {
856    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
857    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
858    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
859    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
860    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
861    pub node_selector: Option<BTreeMap<String, String>>,
862    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
863    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
864    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
865    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
866    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
867    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
868}
869
870/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
871#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
872pub struct AirflowClusterDagProcessorsConfigLogging {
873    /// Log configuration per container.
874    #[serde(default, skip_serializing_if = "Option::is_none")]
875    pub containers: Option<BTreeMap<String, AirflowClusterDagProcessorsConfigLoggingContainers>>,
876    /// Wether or not to deploy a container with the Vector log agent.
877    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
878    pub enable_vector_agent: Option<bool>,
879}
880
881/// Log configuration per container.
882#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
883pub struct AirflowClusterDagProcessorsConfigLoggingContainers {
884    /// Configuration for the console appender
885    #[serde(default, skip_serializing_if = "Option::is_none")]
886    pub console: Option<AirflowClusterDagProcessorsConfigLoggingContainersConsole>,
887    /// Log configuration provided in a ConfigMap
888    #[serde(default, skip_serializing_if = "Option::is_none")]
889    pub custom: Option<AirflowClusterDagProcessorsConfigLoggingContainersCustom>,
890    /// Configuration for the file appender
891    #[serde(default, skip_serializing_if = "Option::is_none")]
892    pub file: Option<AirflowClusterDagProcessorsConfigLoggingContainersFile>,
893    /// Configuration per logger
894    #[serde(default, skip_serializing_if = "Option::is_none")]
895    pub loggers: Option<BTreeMap<String, AirflowClusterDagProcessorsConfigLoggingContainersLoggers>>,
896}
897
898/// Configuration for the console appender
899#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
900pub struct AirflowClusterDagProcessorsConfigLoggingContainersConsole {
901    /// The log level threshold.
902    /// Log events with a lower log level are discarded.
903    #[serde(default, skip_serializing_if = "Option::is_none")]
904    pub level: Option<AirflowClusterDagProcessorsConfigLoggingContainersConsoleLevel>,
905}
906
907/// Configuration for the console appender
908#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
909pub enum AirflowClusterDagProcessorsConfigLoggingContainersConsoleLevel {
910    #[serde(rename = "TRACE")]
911    Trace,
912    #[serde(rename = "DEBUG")]
913    Debug,
914    #[serde(rename = "INFO")]
915    Info,
916    #[serde(rename = "WARN")]
917    Warn,
918    #[serde(rename = "ERROR")]
919    Error,
920    #[serde(rename = "FATAL")]
921    Fatal,
922    #[serde(rename = "NONE")]
923    None,
924}
925
926/// Log configuration provided in a ConfigMap
927#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
928pub struct AirflowClusterDagProcessorsConfigLoggingContainersCustom {
929    /// ConfigMap containing the log configuration files
930    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
931    pub config_map: Option<String>,
932}
933
934/// Configuration for the file appender
935#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
936pub struct AirflowClusterDagProcessorsConfigLoggingContainersFile {
937    /// The log level threshold.
938    /// Log events with a lower log level are discarded.
939    #[serde(default, skip_serializing_if = "Option::is_none")]
940    pub level: Option<AirflowClusterDagProcessorsConfigLoggingContainersFileLevel>,
941}
942
943/// Configuration for the file appender
944#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
945pub enum AirflowClusterDagProcessorsConfigLoggingContainersFileLevel {
946    #[serde(rename = "TRACE")]
947    Trace,
948    #[serde(rename = "DEBUG")]
949    Debug,
950    #[serde(rename = "INFO")]
951    Info,
952    #[serde(rename = "WARN")]
953    Warn,
954    #[serde(rename = "ERROR")]
955    Error,
956    #[serde(rename = "FATAL")]
957    Fatal,
958    #[serde(rename = "NONE")]
959    None,
960}
961
962/// Configuration per logger
963#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
964pub struct AirflowClusterDagProcessorsConfigLoggingContainersLoggers {
965    /// The log level threshold.
966    /// Log events with a lower log level are discarded.
967    #[serde(default, skip_serializing_if = "Option::is_none")]
968    pub level: Option<AirflowClusterDagProcessorsConfigLoggingContainersLoggersLevel>,
969}
970
971/// Configuration per logger
972#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
973pub enum AirflowClusterDagProcessorsConfigLoggingContainersLoggersLevel {
974    #[serde(rename = "TRACE")]
975    Trace,
976    #[serde(rename = "DEBUG")]
977    Debug,
978    #[serde(rename = "INFO")]
979    Info,
980    #[serde(rename = "WARN")]
981    Warn,
982    #[serde(rename = "ERROR")]
983    Error,
984    #[serde(rename = "FATAL")]
985    Fatal,
986    #[serde(rename = "NONE")]
987    None,
988}
989
990/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
991/// usage, if this role needs any.
992#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
993pub struct AirflowClusterDagProcessorsConfigResources {
994    #[serde(default, skip_serializing_if = "Option::is_none")]
995    pub cpu: Option<AirflowClusterDagProcessorsConfigResourcesCpu>,
996    #[serde(default, skip_serializing_if = "Option::is_none")]
997    pub memory: Option<AirflowClusterDagProcessorsConfigResourcesMemory>,
998    #[serde(default, skip_serializing_if = "Option::is_none")]
999    pub storage: Option<AirflowClusterDagProcessorsConfigResourcesStorage>,
1000}
1001
1002#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1003pub struct AirflowClusterDagProcessorsConfigResourcesCpu {
1004    /// The maximum amount of CPU cores that can be requested by Pods.
1005    /// Equivalent to the `limit` for Pod resource configuration.
1006    /// Cores are specified either as a decimal point number or as milli units.
1007    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1008    #[serde(default, skip_serializing_if = "Option::is_none")]
1009    pub max: Option<String>,
1010    /// The minimal amount of CPU cores that Pods need to run.
1011    /// Equivalent to the `request` for Pod resource configuration.
1012    /// Cores are specified either as a decimal point number or as milli units.
1013    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1014    #[serde(default, skip_serializing_if = "Option::is_none")]
1015    pub min: Option<String>,
1016}
1017
1018#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1019pub struct AirflowClusterDagProcessorsConfigResourcesMemory {
1020    /// The maximum amount of memory that should be available to the Pod.
1021    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
1022    /// which means these suffixes are supported: E, P, T, G, M, k.
1023    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
1024    /// For example, the following represent roughly the same value:
1025    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
1026    #[serde(default, skip_serializing_if = "Option::is_none")]
1027    pub limit: Option<String>,
1028    /// Additional options that can be specified.
1029    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
1030    pub runtime_limits: Option<AirflowClusterDagProcessorsConfigResourcesMemoryRuntimeLimits>,
1031}
1032
1033/// Additional options that can be specified.
1034#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1035pub struct AirflowClusterDagProcessorsConfigResourcesMemoryRuntimeLimits {
1036}
1037
1038#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1039pub struct AirflowClusterDagProcessorsConfigResourcesStorage {
1040}
1041
1042/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
1043#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1044pub struct AirflowClusterDagProcessorsRoleConfig {
1045    /// This struct is used to configure:
1046    /// 
1047    /// 1. If PodDisruptionBudgets are created by the operator
1048    /// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
1049    /// 
1050    /// Learn more in the
1051    /// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
1052    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
1053    pub pod_disruption_budget: Option<AirflowClusterDagProcessorsRoleConfigPodDisruptionBudget>,
1054}
1055
1056/// This struct is used to configure:
1057/// 
1058/// 1. If PodDisruptionBudgets are created by the operator
1059/// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
1060/// 
1061/// Learn more in the
1062/// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
1063#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1064pub struct AirflowClusterDagProcessorsRoleConfigPodDisruptionBudget {
1065    /// Whether a PodDisruptionBudget should be written out for this role.
1066    /// Disabling this enables you to specify your own - custom - one.
1067    /// Defaults to true.
1068    #[serde(default, skip_serializing_if = "Option::is_none")]
1069    pub enabled: Option<bool>,
1070    /// The number of Pods that are allowed to be down because of voluntary disruptions.
1071    /// If you don't explicitly set this, the operator will use a sane default based
1072    /// upon knowledge about the individual product.
1073    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
1074    pub max_unavailable: Option<u16>,
1075}
1076
1077#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1078pub struct AirflowClusterDagProcessorsRoleGroups {
1079    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
1080    pub cli_overrides: Option<BTreeMap<String, String>>,
1081    #[serde(default, skip_serializing_if = "Option::is_none")]
1082    pub config: Option<AirflowClusterDagProcessorsRoleGroupsConfig>,
1083    /// The `configOverrides` can be used to configure properties in product config files
1084    /// that are not exposed in the CRD. Read the
1085    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
1086    /// and consult the operator specific usage guide documentation for details on the
1087    /// available config files and settings for the specific product.
1088    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
1089    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
1090    /// `envOverrides` configure environment variables to be set in the Pods.
1091    /// It is a map from strings to strings - environment variables and the value to set.
1092    /// Read the
1093    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
1094    /// for more information and consult the operator specific usage guide to find out about
1095    /// the product specific environment variables that are available.
1096    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
1097    pub env_overrides: Option<BTreeMap<String, String>>,
1098    /// In the `podOverrides` property you can define a
1099    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
1100    /// to override any property that can be set on a Kubernetes Pod.
1101    /// Read the
1102    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
1103    /// for more information.
1104    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
1105    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
1106    #[serde(default, skip_serializing_if = "Option::is_none")]
1107    pub replicas: Option<u16>,
1108}
1109
1110#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1111pub struct AirflowClusterDagProcessorsRoleGroupsConfig {
1112    /// These configuration settings control
1113    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1114    #[serde(default, skip_serializing_if = "Option::is_none")]
1115    pub affinity: Option<AirflowClusterDagProcessorsRoleGroupsConfigAffinity>,
1116    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
1117    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
1118    pub graceful_shutdown_timeout: Option<String>,
1119    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1120    #[serde(default, skip_serializing_if = "Option::is_none")]
1121    pub logging: Option<AirflowClusterDagProcessorsRoleGroupsConfigLogging>,
1122    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
1123    /// usage, if this role needs any.
1124    #[serde(default, skip_serializing_if = "Option::is_none")]
1125    pub resources: Option<AirflowClusterDagProcessorsRoleGroupsConfigResources>,
1126}
1127
1128/// These configuration settings control
1129/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1130#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1131pub struct AirflowClusterDagProcessorsRoleGroupsConfigAffinity {
1132    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1133    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
1134    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
1135    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1136    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
1137    pub node_selector: Option<BTreeMap<String, String>>,
1138    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1139    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
1140    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
1141    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1142    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
1143    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
1144}
1145
1146/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1147#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1148pub struct AirflowClusterDagProcessorsRoleGroupsConfigLogging {
1149    /// Log configuration per container.
1150    #[serde(default, skip_serializing_if = "Option::is_none")]
1151    pub containers: Option<BTreeMap<String, AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainers>>,
1152    /// Wether or not to deploy a container with the Vector log agent.
1153    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
1154    pub enable_vector_agent: Option<bool>,
1155}
1156
1157/// Log configuration per container.
1158#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1159pub struct AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainers {
1160    /// Configuration for the console appender
1161    #[serde(default, skip_serializing_if = "Option::is_none")]
1162    pub console: Option<AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersConsole>,
1163    /// Log configuration provided in a ConfigMap
1164    #[serde(default, skip_serializing_if = "Option::is_none")]
1165    pub custom: Option<AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersCustom>,
1166    /// Configuration for the file appender
1167    #[serde(default, skip_serializing_if = "Option::is_none")]
1168    pub file: Option<AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersFile>,
1169    /// Configuration per logger
1170    #[serde(default, skip_serializing_if = "Option::is_none")]
1171    pub loggers: Option<BTreeMap<String, AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersLoggers>>,
1172}
1173
1174/// Configuration for the console appender
1175#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1176pub struct AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersConsole {
1177    /// The log level threshold.
1178    /// Log events with a lower log level are discarded.
1179    #[serde(default, skip_serializing_if = "Option::is_none")]
1180    pub level: Option<AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersConsoleLevel>,
1181}
1182
1183/// Configuration for the console appender
1184#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1185pub enum AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersConsoleLevel {
1186    #[serde(rename = "TRACE")]
1187    Trace,
1188    #[serde(rename = "DEBUG")]
1189    Debug,
1190    #[serde(rename = "INFO")]
1191    Info,
1192    #[serde(rename = "WARN")]
1193    Warn,
1194    #[serde(rename = "ERROR")]
1195    Error,
1196    #[serde(rename = "FATAL")]
1197    Fatal,
1198    #[serde(rename = "NONE")]
1199    None,
1200}
1201
1202/// Log configuration provided in a ConfigMap
1203#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1204pub struct AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersCustom {
1205    /// ConfigMap containing the log configuration files
1206    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
1207    pub config_map: Option<String>,
1208}
1209
1210/// Configuration for the file appender
1211#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1212pub struct AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersFile {
1213    /// The log level threshold.
1214    /// Log events with a lower log level are discarded.
1215    #[serde(default, skip_serializing_if = "Option::is_none")]
1216    pub level: Option<AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersFileLevel>,
1217}
1218
1219/// Configuration for the file appender
1220#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1221pub enum AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersFileLevel {
1222    #[serde(rename = "TRACE")]
1223    Trace,
1224    #[serde(rename = "DEBUG")]
1225    Debug,
1226    #[serde(rename = "INFO")]
1227    Info,
1228    #[serde(rename = "WARN")]
1229    Warn,
1230    #[serde(rename = "ERROR")]
1231    Error,
1232    #[serde(rename = "FATAL")]
1233    Fatal,
1234    #[serde(rename = "NONE")]
1235    None,
1236}
1237
1238/// Configuration per logger
1239#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1240pub struct AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersLoggers {
1241    /// The log level threshold.
1242    /// Log events with a lower log level are discarded.
1243    #[serde(default, skip_serializing_if = "Option::is_none")]
1244    pub level: Option<AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersLoggersLevel>,
1245}
1246
1247/// Configuration per logger
1248#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1249pub enum AirflowClusterDagProcessorsRoleGroupsConfigLoggingContainersLoggersLevel {
1250    #[serde(rename = "TRACE")]
1251    Trace,
1252    #[serde(rename = "DEBUG")]
1253    Debug,
1254    #[serde(rename = "INFO")]
1255    Info,
1256    #[serde(rename = "WARN")]
1257    Warn,
1258    #[serde(rename = "ERROR")]
1259    Error,
1260    #[serde(rename = "FATAL")]
1261    Fatal,
1262    #[serde(rename = "NONE")]
1263    None,
1264}
1265
1266/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
1267/// usage, if this role needs any.
1268#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1269pub struct AirflowClusterDagProcessorsRoleGroupsConfigResources {
1270    #[serde(default, skip_serializing_if = "Option::is_none")]
1271    pub cpu: Option<AirflowClusterDagProcessorsRoleGroupsConfigResourcesCpu>,
1272    #[serde(default, skip_serializing_if = "Option::is_none")]
1273    pub memory: Option<AirflowClusterDagProcessorsRoleGroupsConfigResourcesMemory>,
1274    #[serde(default, skip_serializing_if = "Option::is_none")]
1275    pub storage: Option<AirflowClusterDagProcessorsRoleGroupsConfigResourcesStorage>,
1276}
1277
1278#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1279pub struct AirflowClusterDagProcessorsRoleGroupsConfigResourcesCpu {
1280    /// The maximum amount of CPU cores that can be requested by Pods.
1281    /// Equivalent to the `limit` for Pod resource configuration.
1282    /// Cores are specified either as a decimal point number or as milli units.
1283    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1284    #[serde(default, skip_serializing_if = "Option::is_none")]
1285    pub max: Option<String>,
1286    /// The minimal amount of CPU cores that Pods need to run.
1287    /// Equivalent to the `request` for Pod resource configuration.
1288    /// Cores are specified either as a decimal point number or as milli units.
1289    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1290    #[serde(default, skip_serializing_if = "Option::is_none")]
1291    pub min: Option<String>,
1292}
1293
1294#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1295pub struct AirflowClusterDagProcessorsRoleGroupsConfigResourcesMemory {
1296    /// The maximum amount of memory that should be available to the Pod.
1297    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
1298    /// which means these suffixes are supported: E, P, T, G, M, k.
1299    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
1300    /// For example, the following represent roughly the same value:
1301    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
1302    #[serde(default, skip_serializing_if = "Option::is_none")]
1303    pub limit: Option<String>,
1304    /// Additional options that can be specified.
1305    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
1306    pub runtime_limits: Option<AirflowClusterDagProcessorsRoleGroupsConfigResourcesMemoryRuntimeLimits>,
1307}
1308
1309/// Additional options that can be specified.
1310#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1311pub struct AirflowClusterDagProcessorsRoleGroupsConfigResourcesMemoryRuntimeLimits {
1312}
1313
1314#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1315pub struct AirflowClusterDagProcessorsRoleGroupsConfigResourcesStorage {
1316}
1317
1318/// Specify which image to use, the easiest way is to only configure the `productVersion`.
1319/// You can also configure a custom image registry to pull from, as well as completely custom
1320/// images.
1321/// 
1322/// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)>
1323/// for details.
1324#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1325pub struct AirflowClusterImage {
1326    /// Overwrite the docker image.
1327    /// Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
1328    #[serde(default, skip_serializing_if = "Option::is_none")]
1329    pub custom: Option<String>,
1330    /// Version of the product, e.g. `1.4.1`.
1331    #[serde(default, skip_serializing_if = "Option::is_none", rename = "productVersion")]
1332    pub product_version: Option<String>,
1333    /// [Pull policy](<https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy)> used when pulling the image.
1334    #[serde(default, skip_serializing_if = "Option::is_none", rename = "pullPolicy")]
1335    pub pull_policy: Option<AirflowClusterImagePullPolicy>,
1336    /// [Image pull secrets](<https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod)> to pull images from a private registry.
1337    #[serde(default, skip_serializing_if = "Option::is_none", rename = "pullSecrets")]
1338    pub pull_secrets: Option<Vec<AirflowClusterImagePullSecrets>>,
1339    /// Name of the docker repo, e.g. `oci.stackable.tech/sdp`
1340    #[serde(default, skip_serializing_if = "Option::is_none")]
1341    pub repo: Option<String>,
1342    /// Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
1343    /// If not specified, the operator will use its own version, e.g. `23.4.1`.
1344    /// When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.
1345    #[serde(default, skip_serializing_if = "Option::is_none", rename = "stackableVersion")]
1346    pub stackable_version: Option<String>,
1347}
1348
1349/// Specify which image to use, the easiest way is to only configure the `productVersion`.
1350/// You can also configure a custom image registry to pull from, as well as completely custom
1351/// images.
1352/// 
1353/// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)>
1354/// for details.
1355#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1356pub enum AirflowClusterImagePullPolicy {
1357    IfNotPresent,
1358    Always,
1359    Never,
1360}
1361
1362/// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
1363#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1364pub struct AirflowClusterImagePullSecrets {
1365    /// 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>
1366    pub name: String,
1367}
1368
1369/// With the Kuberentes executor, executor Pods are created on demand.
1370#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1371pub struct AirflowClusterKubernetesExecutors {
1372    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
1373    pub cli_overrides: Option<BTreeMap<String, String>>,
1374    #[serde(default, skip_serializing_if = "Option::is_none")]
1375    pub config: Option<AirflowClusterKubernetesExecutorsConfig>,
1376    /// The `configOverrides` can be used to configure properties in product config files
1377    /// that are not exposed in the CRD. Read the
1378    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
1379    /// and consult the operator specific usage guide documentation for details on the
1380    /// available config files and settings for the specific product.
1381    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
1382    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
1383    /// `envOverrides` configure environment variables to be set in the Pods.
1384    /// It is a map from strings to strings - environment variables and the value to set.
1385    /// Read the
1386    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
1387    /// for more information and consult the operator specific usage guide to find out about
1388    /// the product specific environment variables that are available.
1389    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
1390    pub env_overrides: Option<BTreeMap<String, String>>,
1391    /// In the `podOverrides` property you can define a
1392    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
1393    /// to override any property that can be set on a Kubernetes Pod.
1394    /// Read the
1395    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
1396    /// for more information.
1397    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
1398    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
1399}
1400
1401#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1402pub struct AirflowClusterKubernetesExecutorsConfig {
1403    /// These configuration settings control
1404    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1405    #[serde(default, skip_serializing_if = "Option::is_none")]
1406    pub affinity: Option<AirflowClusterKubernetesExecutorsConfigAffinity>,
1407    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
1408    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
1409    pub graceful_shutdown_timeout: Option<String>,
1410    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1411    #[serde(default, skip_serializing_if = "Option::is_none")]
1412    pub logging: Option<AirflowClusterKubernetesExecutorsConfigLogging>,
1413    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
1414    /// usage, if this role needs any.
1415    #[serde(default, skip_serializing_if = "Option::is_none")]
1416    pub resources: Option<AirflowClusterKubernetesExecutorsConfigResources>,
1417}
1418
1419/// These configuration settings control
1420/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1421#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1422pub struct AirflowClusterKubernetesExecutorsConfigAffinity {
1423    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1424    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
1425    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
1426    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1427    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
1428    pub node_selector: Option<BTreeMap<String, String>>,
1429    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1430    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
1431    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
1432    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1433    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
1434    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
1435}
1436
1437/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1438#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1439pub struct AirflowClusterKubernetesExecutorsConfigLogging {
1440    /// Log configuration per container.
1441    #[serde(default, skip_serializing_if = "Option::is_none")]
1442    pub containers: Option<BTreeMap<String, AirflowClusterKubernetesExecutorsConfigLoggingContainers>>,
1443    /// Wether or not to deploy a container with the Vector log agent.
1444    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
1445    pub enable_vector_agent: Option<bool>,
1446}
1447
1448/// Log configuration per container.
1449#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1450pub struct AirflowClusterKubernetesExecutorsConfigLoggingContainers {
1451    /// Configuration for the console appender
1452    #[serde(default, skip_serializing_if = "Option::is_none")]
1453    pub console: Option<AirflowClusterKubernetesExecutorsConfigLoggingContainersConsole>,
1454    /// Log configuration provided in a ConfigMap
1455    #[serde(default, skip_serializing_if = "Option::is_none")]
1456    pub custom: Option<AirflowClusterKubernetesExecutorsConfigLoggingContainersCustom>,
1457    /// Configuration for the file appender
1458    #[serde(default, skip_serializing_if = "Option::is_none")]
1459    pub file: Option<AirflowClusterKubernetesExecutorsConfigLoggingContainersFile>,
1460    /// Configuration per logger
1461    #[serde(default, skip_serializing_if = "Option::is_none")]
1462    pub loggers: Option<BTreeMap<String, AirflowClusterKubernetesExecutorsConfigLoggingContainersLoggers>>,
1463}
1464
1465/// Configuration for the console appender
1466#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1467pub struct AirflowClusterKubernetesExecutorsConfigLoggingContainersConsole {
1468    /// The log level threshold.
1469    /// Log events with a lower log level are discarded.
1470    #[serde(default, skip_serializing_if = "Option::is_none")]
1471    pub level: Option<AirflowClusterKubernetesExecutorsConfigLoggingContainersConsoleLevel>,
1472}
1473
1474/// Configuration for the console appender
1475#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1476pub enum AirflowClusterKubernetesExecutorsConfigLoggingContainersConsoleLevel {
1477    #[serde(rename = "TRACE")]
1478    Trace,
1479    #[serde(rename = "DEBUG")]
1480    Debug,
1481    #[serde(rename = "INFO")]
1482    Info,
1483    #[serde(rename = "WARN")]
1484    Warn,
1485    #[serde(rename = "ERROR")]
1486    Error,
1487    #[serde(rename = "FATAL")]
1488    Fatal,
1489    #[serde(rename = "NONE")]
1490    None,
1491}
1492
1493/// Log configuration provided in a ConfigMap
1494#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1495pub struct AirflowClusterKubernetesExecutorsConfigLoggingContainersCustom {
1496    /// ConfigMap containing the log configuration files
1497    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
1498    pub config_map: Option<String>,
1499}
1500
1501/// Configuration for the file appender
1502#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1503pub struct AirflowClusterKubernetesExecutorsConfigLoggingContainersFile {
1504    /// The log level threshold.
1505    /// Log events with a lower log level are discarded.
1506    #[serde(default, skip_serializing_if = "Option::is_none")]
1507    pub level: Option<AirflowClusterKubernetesExecutorsConfigLoggingContainersFileLevel>,
1508}
1509
1510/// Configuration for the file appender
1511#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1512pub enum AirflowClusterKubernetesExecutorsConfigLoggingContainersFileLevel {
1513    #[serde(rename = "TRACE")]
1514    Trace,
1515    #[serde(rename = "DEBUG")]
1516    Debug,
1517    #[serde(rename = "INFO")]
1518    Info,
1519    #[serde(rename = "WARN")]
1520    Warn,
1521    #[serde(rename = "ERROR")]
1522    Error,
1523    #[serde(rename = "FATAL")]
1524    Fatal,
1525    #[serde(rename = "NONE")]
1526    None,
1527}
1528
1529/// Configuration per logger
1530#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1531pub struct AirflowClusterKubernetesExecutorsConfigLoggingContainersLoggers {
1532    /// The log level threshold.
1533    /// Log events with a lower log level are discarded.
1534    #[serde(default, skip_serializing_if = "Option::is_none")]
1535    pub level: Option<AirflowClusterKubernetesExecutorsConfigLoggingContainersLoggersLevel>,
1536}
1537
1538/// Configuration per logger
1539#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1540pub enum AirflowClusterKubernetesExecutorsConfigLoggingContainersLoggersLevel {
1541    #[serde(rename = "TRACE")]
1542    Trace,
1543    #[serde(rename = "DEBUG")]
1544    Debug,
1545    #[serde(rename = "INFO")]
1546    Info,
1547    #[serde(rename = "WARN")]
1548    Warn,
1549    #[serde(rename = "ERROR")]
1550    Error,
1551    #[serde(rename = "FATAL")]
1552    Fatal,
1553    #[serde(rename = "NONE")]
1554    None,
1555}
1556
1557/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
1558/// usage, if this role needs any.
1559#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1560pub struct AirflowClusterKubernetesExecutorsConfigResources {
1561    #[serde(default, skip_serializing_if = "Option::is_none")]
1562    pub cpu: Option<AirflowClusterKubernetesExecutorsConfigResourcesCpu>,
1563    #[serde(default, skip_serializing_if = "Option::is_none")]
1564    pub memory: Option<AirflowClusterKubernetesExecutorsConfigResourcesMemory>,
1565    #[serde(default, skip_serializing_if = "Option::is_none")]
1566    pub storage: Option<AirflowClusterKubernetesExecutorsConfigResourcesStorage>,
1567}
1568
1569#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1570pub struct AirflowClusterKubernetesExecutorsConfigResourcesCpu {
1571    /// The maximum amount of CPU cores that can be requested by Pods.
1572    /// Equivalent to the `limit` for Pod resource configuration.
1573    /// Cores are specified either as a decimal point number or as milli units.
1574    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1575    #[serde(default, skip_serializing_if = "Option::is_none")]
1576    pub max: Option<String>,
1577    /// The minimal amount of CPU cores that Pods need to run.
1578    /// Equivalent to the `request` for Pod resource configuration.
1579    /// Cores are specified either as a decimal point number or as milli units.
1580    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1581    #[serde(default, skip_serializing_if = "Option::is_none")]
1582    pub min: Option<String>,
1583}
1584
1585#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1586pub struct AirflowClusterKubernetesExecutorsConfigResourcesMemory {
1587    /// The maximum amount of memory that should be available to the Pod.
1588    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
1589    /// which means these suffixes are supported: E, P, T, G, M, k.
1590    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
1591    /// For example, the following represent roughly the same value:
1592    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
1593    #[serde(default, skip_serializing_if = "Option::is_none")]
1594    pub limit: Option<String>,
1595    /// Additional options that can be specified.
1596    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
1597    pub runtime_limits: Option<AirflowClusterKubernetesExecutorsConfigResourcesMemoryRuntimeLimits>,
1598}
1599
1600/// Additional options that can be specified.
1601#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1602pub struct AirflowClusterKubernetesExecutorsConfigResourcesMemoryRuntimeLimits {
1603}
1604
1605#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1606pub struct AirflowClusterKubernetesExecutorsConfigResourcesStorage {
1607}
1608
1609/// The `schedulers` is responsible for triggering jobs and persisting their metadata to the backend database.
1610/// Jobs are scheduled on the workers/executors.
1611#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1612pub struct AirflowClusterSchedulers {
1613    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
1614    pub cli_overrides: Option<BTreeMap<String, String>>,
1615    #[serde(default, skip_serializing_if = "Option::is_none")]
1616    pub config: Option<AirflowClusterSchedulersConfig>,
1617    /// The `configOverrides` can be used to configure properties in product config files
1618    /// that are not exposed in the CRD. Read the
1619    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
1620    /// and consult the operator specific usage guide documentation for details on the
1621    /// available config files and settings for the specific product.
1622    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
1623    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
1624    /// `envOverrides` configure environment variables to be set in the Pods.
1625    /// It is a map from strings to strings - environment variables and the value to set.
1626    /// Read the
1627    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
1628    /// for more information and consult the operator specific usage guide to find out about
1629    /// the product specific environment variables that are available.
1630    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
1631    pub env_overrides: Option<BTreeMap<String, String>>,
1632    /// In the `podOverrides` property you can define a
1633    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
1634    /// to override any property that can be set on a Kubernetes Pod.
1635    /// Read the
1636    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
1637    /// for more information.
1638    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
1639    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
1640    /// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
1641    #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
1642    pub role_config: Option<AirflowClusterSchedulersRoleConfig>,
1643    #[serde(rename = "roleGroups")]
1644    pub role_groups: BTreeMap<String, AirflowClusterSchedulersRoleGroups>,
1645}
1646
1647#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1648pub struct AirflowClusterSchedulersConfig {
1649    /// These configuration settings control
1650    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1651    #[serde(default, skip_serializing_if = "Option::is_none")]
1652    pub affinity: Option<AirflowClusterSchedulersConfigAffinity>,
1653    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
1654    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
1655    pub graceful_shutdown_timeout: Option<String>,
1656    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1657    #[serde(default, skip_serializing_if = "Option::is_none")]
1658    pub logging: Option<AirflowClusterSchedulersConfigLogging>,
1659    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
1660    /// usage, if this role needs any.
1661    #[serde(default, skip_serializing_if = "Option::is_none")]
1662    pub resources: Option<AirflowClusterSchedulersConfigResources>,
1663}
1664
1665/// These configuration settings control
1666/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1667#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1668pub struct AirflowClusterSchedulersConfigAffinity {
1669    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1670    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
1671    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
1672    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1673    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
1674    pub node_selector: Option<BTreeMap<String, String>>,
1675    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1676    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
1677    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
1678    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1679    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
1680    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
1681}
1682
1683/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1684#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1685pub struct AirflowClusterSchedulersConfigLogging {
1686    /// Log configuration per container.
1687    #[serde(default, skip_serializing_if = "Option::is_none")]
1688    pub containers: Option<BTreeMap<String, AirflowClusterSchedulersConfigLoggingContainers>>,
1689    /// Wether or not to deploy a container with the Vector log agent.
1690    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
1691    pub enable_vector_agent: Option<bool>,
1692}
1693
1694/// Log configuration per container.
1695#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1696pub struct AirflowClusterSchedulersConfigLoggingContainers {
1697    /// Configuration for the console appender
1698    #[serde(default, skip_serializing_if = "Option::is_none")]
1699    pub console: Option<AirflowClusterSchedulersConfigLoggingContainersConsole>,
1700    /// Log configuration provided in a ConfigMap
1701    #[serde(default, skip_serializing_if = "Option::is_none")]
1702    pub custom: Option<AirflowClusterSchedulersConfigLoggingContainersCustom>,
1703    /// Configuration for the file appender
1704    #[serde(default, skip_serializing_if = "Option::is_none")]
1705    pub file: Option<AirflowClusterSchedulersConfigLoggingContainersFile>,
1706    /// Configuration per logger
1707    #[serde(default, skip_serializing_if = "Option::is_none")]
1708    pub loggers: Option<BTreeMap<String, AirflowClusterSchedulersConfigLoggingContainersLoggers>>,
1709}
1710
1711/// Configuration for the console appender
1712#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1713pub struct AirflowClusterSchedulersConfigLoggingContainersConsole {
1714    /// The log level threshold.
1715    /// Log events with a lower log level are discarded.
1716    #[serde(default, skip_serializing_if = "Option::is_none")]
1717    pub level: Option<AirflowClusterSchedulersConfigLoggingContainersConsoleLevel>,
1718}
1719
1720/// Configuration for the console appender
1721#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1722pub enum AirflowClusterSchedulersConfigLoggingContainersConsoleLevel {
1723    #[serde(rename = "TRACE")]
1724    Trace,
1725    #[serde(rename = "DEBUG")]
1726    Debug,
1727    #[serde(rename = "INFO")]
1728    Info,
1729    #[serde(rename = "WARN")]
1730    Warn,
1731    #[serde(rename = "ERROR")]
1732    Error,
1733    #[serde(rename = "FATAL")]
1734    Fatal,
1735    #[serde(rename = "NONE")]
1736    None,
1737}
1738
1739/// Log configuration provided in a ConfigMap
1740#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1741pub struct AirflowClusterSchedulersConfigLoggingContainersCustom {
1742    /// ConfigMap containing the log configuration files
1743    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
1744    pub config_map: Option<String>,
1745}
1746
1747/// Configuration for the file appender
1748#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1749pub struct AirflowClusterSchedulersConfigLoggingContainersFile {
1750    /// The log level threshold.
1751    /// Log events with a lower log level are discarded.
1752    #[serde(default, skip_serializing_if = "Option::is_none")]
1753    pub level: Option<AirflowClusterSchedulersConfigLoggingContainersFileLevel>,
1754}
1755
1756/// Configuration for the file appender
1757#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1758pub enum AirflowClusterSchedulersConfigLoggingContainersFileLevel {
1759    #[serde(rename = "TRACE")]
1760    Trace,
1761    #[serde(rename = "DEBUG")]
1762    Debug,
1763    #[serde(rename = "INFO")]
1764    Info,
1765    #[serde(rename = "WARN")]
1766    Warn,
1767    #[serde(rename = "ERROR")]
1768    Error,
1769    #[serde(rename = "FATAL")]
1770    Fatal,
1771    #[serde(rename = "NONE")]
1772    None,
1773}
1774
1775/// Configuration per logger
1776#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1777pub struct AirflowClusterSchedulersConfigLoggingContainersLoggers {
1778    /// The log level threshold.
1779    /// Log events with a lower log level are discarded.
1780    #[serde(default, skip_serializing_if = "Option::is_none")]
1781    pub level: Option<AirflowClusterSchedulersConfigLoggingContainersLoggersLevel>,
1782}
1783
1784/// Configuration per logger
1785#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1786pub enum AirflowClusterSchedulersConfigLoggingContainersLoggersLevel {
1787    #[serde(rename = "TRACE")]
1788    Trace,
1789    #[serde(rename = "DEBUG")]
1790    Debug,
1791    #[serde(rename = "INFO")]
1792    Info,
1793    #[serde(rename = "WARN")]
1794    Warn,
1795    #[serde(rename = "ERROR")]
1796    Error,
1797    #[serde(rename = "FATAL")]
1798    Fatal,
1799    #[serde(rename = "NONE")]
1800    None,
1801}
1802
1803/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
1804/// usage, if this role needs any.
1805#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1806pub struct AirflowClusterSchedulersConfigResources {
1807    #[serde(default, skip_serializing_if = "Option::is_none")]
1808    pub cpu: Option<AirflowClusterSchedulersConfigResourcesCpu>,
1809    #[serde(default, skip_serializing_if = "Option::is_none")]
1810    pub memory: Option<AirflowClusterSchedulersConfigResourcesMemory>,
1811    #[serde(default, skip_serializing_if = "Option::is_none")]
1812    pub storage: Option<AirflowClusterSchedulersConfigResourcesStorage>,
1813}
1814
1815#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1816pub struct AirflowClusterSchedulersConfigResourcesCpu {
1817    /// The maximum amount of CPU cores that can be requested by Pods.
1818    /// Equivalent to the `limit` for Pod resource configuration.
1819    /// Cores are specified either as a decimal point number or as milli units.
1820    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1821    #[serde(default, skip_serializing_if = "Option::is_none")]
1822    pub max: Option<String>,
1823    /// The minimal amount of CPU cores that Pods need to run.
1824    /// Equivalent to the `request` for Pod resource configuration.
1825    /// Cores are specified either as a decimal point number or as milli units.
1826    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
1827    #[serde(default, skip_serializing_if = "Option::is_none")]
1828    pub min: Option<String>,
1829}
1830
1831#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1832pub struct AirflowClusterSchedulersConfigResourcesMemory {
1833    /// The maximum amount of memory that should be available to the Pod.
1834    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
1835    /// which means these suffixes are supported: E, P, T, G, M, k.
1836    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
1837    /// For example, the following represent roughly the same value:
1838    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
1839    #[serde(default, skip_serializing_if = "Option::is_none")]
1840    pub limit: Option<String>,
1841    /// Additional options that can be specified.
1842    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
1843    pub runtime_limits: Option<AirflowClusterSchedulersConfigResourcesMemoryRuntimeLimits>,
1844}
1845
1846/// Additional options that can be specified.
1847#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1848pub struct AirflowClusterSchedulersConfigResourcesMemoryRuntimeLimits {
1849}
1850
1851#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1852pub struct AirflowClusterSchedulersConfigResourcesStorage {
1853}
1854
1855/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
1856#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1857pub struct AirflowClusterSchedulersRoleConfig {
1858    /// This struct is used to configure:
1859    /// 
1860    /// 1. If PodDisruptionBudgets are created by the operator
1861    /// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
1862    /// 
1863    /// Learn more in the
1864    /// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
1865    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
1866    pub pod_disruption_budget: Option<AirflowClusterSchedulersRoleConfigPodDisruptionBudget>,
1867}
1868
1869/// This struct is used to configure:
1870/// 
1871/// 1. If PodDisruptionBudgets are created by the operator
1872/// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
1873/// 
1874/// Learn more in the
1875/// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
1876#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1877pub struct AirflowClusterSchedulersRoleConfigPodDisruptionBudget {
1878    /// Whether a PodDisruptionBudget should be written out for this role.
1879    /// Disabling this enables you to specify your own - custom - one.
1880    /// Defaults to true.
1881    #[serde(default, skip_serializing_if = "Option::is_none")]
1882    pub enabled: Option<bool>,
1883    /// The number of Pods that are allowed to be down because of voluntary disruptions.
1884    /// If you don't explicitly set this, the operator will use a sane default based
1885    /// upon knowledge about the individual product.
1886    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
1887    pub max_unavailable: Option<u16>,
1888}
1889
1890#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1891pub struct AirflowClusterSchedulersRoleGroups {
1892    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
1893    pub cli_overrides: Option<BTreeMap<String, String>>,
1894    #[serde(default, skip_serializing_if = "Option::is_none")]
1895    pub config: Option<AirflowClusterSchedulersRoleGroupsConfig>,
1896    /// The `configOverrides` can be used to configure properties in product config files
1897    /// that are not exposed in the CRD. Read the
1898    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
1899    /// and consult the operator specific usage guide documentation for details on the
1900    /// available config files and settings for the specific product.
1901    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
1902    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
1903    /// `envOverrides` configure environment variables to be set in the Pods.
1904    /// It is a map from strings to strings - environment variables and the value to set.
1905    /// Read the
1906    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
1907    /// for more information and consult the operator specific usage guide to find out about
1908    /// the product specific environment variables that are available.
1909    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
1910    pub env_overrides: Option<BTreeMap<String, String>>,
1911    /// In the `podOverrides` property you can define a
1912    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
1913    /// to override any property that can be set on a Kubernetes Pod.
1914    /// Read the
1915    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
1916    /// for more information.
1917    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
1918    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
1919    #[serde(default, skip_serializing_if = "Option::is_none")]
1920    pub replicas: Option<u16>,
1921}
1922
1923#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1924pub struct AirflowClusterSchedulersRoleGroupsConfig {
1925    /// These configuration settings control
1926    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1927    #[serde(default, skip_serializing_if = "Option::is_none")]
1928    pub affinity: Option<AirflowClusterSchedulersRoleGroupsConfigAffinity>,
1929    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
1930    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
1931    pub graceful_shutdown_timeout: Option<String>,
1932    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1933    #[serde(default, skip_serializing_if = "Option::is_none")]
1934    pub logging: Option<AirflowClusterSchedulersRoleGroupsConfigLogging>,
1935    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
1936    /// usage, if this role needs any.
1937    #[serde(default, skip_serializing_if = "Option::is_none")]
1938    pub resources: Option<AirflowClusterSchedulersRoleGroupsConfigResources>,
1939}
1940
1941/// These configuration settings control
1942/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
1943#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1944pub struct AirflowClusterSchedulersRoleGroupsConfigAffinity {
1945    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1946    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
1947    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
1948    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1949    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
1950    pub node_selector: Option<BTreeMap<String, String>>,
1951    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1952    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
1953    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
1954    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
1955    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
1956    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
1957}
1958
1959/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
1960#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1961pub struct AirflowClusterSchedulersRoleGroupsConfigLogging {
1962    /// Log configuration per container.
1963    #[serde(default, skip_serializing_if = "Option::is_none")]
1964    pub containers: Option<BTreeMap<String, AirflowClusterSchedulersRoleGroupsConfigLoggingContainers>>,
1965    /// Wether or not to deploy a container with the Vector log agent.
1966    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
1967    pub enable_vector_agent: Option<bool>,
1968}
1969
1970/// Log configuration per container.
1971#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1972pub struct AirflowClusterSchedulersRoleGroupsConfigLoggingContainers {
1973    /// Configuration for the console appender
1974    #[serde(default, skip_serializing_if = "Option::is_none")]
1975    pub console: Option<AirflowClusterSchedulersRoleGroupsConfigLoggingContainersConsole>,
1976    /// Log configuration provided in a ConfigMap
1977    #[serde(default, skip_serializing_if = "Option::is_none")]
1978    pub custom: Option<AirflowClusterSchedulersRoleGroupsConfigLoggingContainersCustom>,
1979    /// Configuration for the file appender
1980    #[serde(default, skip_serializing_if = "Option::is_none")]
1981    pub file: Option<AirflowClusterSchedulersRoleGroupsConfigLoggingContainersFile>,
1982    /// Configuration per logger
1983    #[serde(default, skip_serializing_if = "Option::is_none")]
1984    pub loggers: Option<BTreeMap<String, AirflowClusterSchedulersRoleGroupsConfigLoggingContainersLoggers>>,
1985}
1986
1987/// Configuration for the console appender
1988#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1989pub struct AirflowClusterSchedulersRoleGroupsConfigLoggingContainersConsole {
1990    /// The log level threshold.
1991    /// Log events with a lower log level are discarded.
1992    #[serde(default, skip_serializing_if = "Option::is_none")]
1993    pub level: Option<AirflowClusterSchedulersRoleGroupsConfigLoggingContainersConsoleLevel>,
1994}
1995
1996/// Configuration for the console appender
1997#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
1998pub enum AirflowClusterSchedulersRoleGroupsConfigLoggingContainersConsoleLevel {
1999    #[serde(rename = "TRACE")]
2000    Trace,
2001    #[serde(rename = "DEBUG")]
2002    Debug,
2003    #[serde(rename = "INFO")]
2004    Info,
2005    #[serde(rename = "WARN")]
2006    Warn,
2007    #[serde(rename = "ERROR")]
2008    Error,
2009    #[serde(rename = "FATAL")]
2010    Fatal,
2011    #[serde(rename = "NONE")]
2012    None,
2013}
2014
2015/// Log configuration provided in a ConfigMap
2016#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2017pub struct AirflowClusterSchedulersRoleGroupsConfigLoggingContainersCustom {
2018    /// ConfigMap containing the log configuration files
2019    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
2020    pub config_map: Option<String>,
2021}
2022
2023/// Configuration for the file appender
2024#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2025pub struct AirflowClusterSchedulersRoleGroupsConfigLoggingContainersFile {
2026    /// The log level threshold.
2027    /// Log events with a lower log level are discarded.
2028    #[serde(default, skip_serializing_if = "Option::is_none")]
2029    pub level: Option<AirflowClusterSchedulersRoleGroupsConfigLoggingContainersFileLevel>,
2030}
2031
2032/// Configuration for the file appender
2033#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2034pub enum AirflowClusterSchedulersRoleGroupsConfigLoggingContainersFileLevel {
2035    #[serde(rename = "TRACE")]
2036    Trace,
2037    #[serde(rename = "DEBUG")]
2038    Debug,
2039    #[serde(rename = "INFO")]
2040    Info,
2041    #[serde(rename = "WARN")]
2042    Warn,
2043    #[serde(rename = "ERROR")]
2044    Error,
2045    #[serde(rename = "FATAL")]
2046    Fatal,
2047    #[serde(rename = "NONE")]
2048    None,
2049}
2050
2051/// Configuration per logger
2052#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2053pub struct AirflowClusterSchedulersRoleGroupsConfigLoggingContainersLoggers {
2054    /// The log level threshold.
2055    /// Log events with a lower log level are discarded.
2056    #[serde(default, skip_serializing_if = "Option::is_none")]
2057    pub level: Option<AirflowClusterSchedulersRoleGroupsConfigLoggingContainersLoggersLevel>,
2058}
2059
2060/// Configuration per logger
2061#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2062pub enum AirflowClusterSchedulersRoleGroupsConfigLoggingContainersLoggersLevel {
2063    #[serde(rename = "TRACE")]
2064    Trace,
2065    #[serde(rename = "DEBUG")]
2066    Debug,
2067    #[serde(rename = "INFO")]
2068    Info,
2069    #[serde(rename = "WARN")]
2070    Warn,
2071    #[serde(rename = "ERROR")]
2072    Error,
2073    #[serde(rename = "FATAL")]
2074    Fatal,
2075    #[serde(rename = "NONE")]
2076    None,
2077}
2078
2079/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2080/// usage, if this role needs any.
2081#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2082pub struct AirflowClusterSchedulersRoleGroupsConfigResources {
2083    #[serde(default, skip_serializing_if = "Option::is_none")]
2084    pub cpu: Option<AirflowClusterSchedulersRoleGroupsConfigResourcesCpu>,
2085    #[serde(default, skip_serializing_if = "Option::is_none")]
2086    pub memory: Option<AirflowClusterSchedulersRoleGroupsConfigResourcesMemory>,
2087    #[serde(default, skip_serializing_if = "Option::is_none")]
2088    pub storage: Option<AirflowClusterSchedulersRoleGroupsConfigResourcesStorage>,
2089}
2090
2091#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2092pub struct AirflowClusterSchedulersRoleGroupsConfigResourcesCpu {
2093    /// The maximum amount of CPU cores that can be requested by Pods.
2094    /// Equivalent to the `limit` for Pod resource configuration.
2095    /// Cores are specified either as a decimal point number or as milli units.
2096    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2097    #[serde(default, skip_serializing_if = "Option::is_none")]
2098    pub max: Option<String>,
2099    /// The minimal amount of CPU cores that Pods need to run.
2100    /// Equivalent to the `request` for Pod resource configuration.
2101    /// Cores are specified either as a decimal point number or as milli units.
2102    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2103    #[serde(default, skip_serializing_if = "Option::is_none")]
2104    pub min: Option<String>,
2105}
2106
2107#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2108pub struct AirflowClusterSchedulersRoleGroupsConfigResourcesMemory {
2109    /// The maximum amount of memory that should be available to the Pod.
2110    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
2111    /// which means these suffixes are supported: E, P, T, G, M, k.
2112    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
2113    /// For example, the following represent roughly the same value:
2114    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
2115    #[serde(default, skip_serializing_if = "Option::is_none")]
2116    pub limit: Option<String>,
2117    /// Additional options that can be specified.
2118    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
2119    pub runtime_limits: Option<AirflowClusterSchedulersRoleGroupsConfigResourcesMemoryRuntimeLimits>,
2120}
2121
2122/// Additional options that can be specified.
2123#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2124pub struct AirflowClusterSchedulersRoleGroupsConfigResourcesMemoryRuntimeLimits {
2125}
2126
2127#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2128pub struct AirflowClusterSchedulersRoleGroupsConfigResourcesStorage {
2129}
2130
2131/// The `triggerers` role runs the triggerer process for use with deferrable DAG operators.
2132#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2133pub struct AirflowClusterTriggerers {
2134    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
2135    pub cli_overrides: Option<BTreeMap<String, String>>,
2136    #[serde(default, skip_serializing_if = "Option::is_none")]
2137    pub config: Option<AirflowClusterTriggerersConfig>,
2138    /// The `configOverrides` can be used to configure properties in product config files
2139    /// that are not exposed in the CRD. Read the
2140    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
2141    /// and consult the operator specific usage guide documentation for details on the
2142    /// available config files and settings for the specific product.
2143    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
2144    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
2145    /// `envOverrides` configure environment variables to be set in the Pods.
2146    /// It is a map from strings to strings - environment variables and the value to set.
2147    /// Read the
2148    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
2149    /// for more information and consult the operator specific usage guide to find out about
2150    /// the product specific environment variables that are available.
2151    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
2152    pub env_overrides: Option<BTreeMap<String, String>>,
2153    /// In the `podOverrides` property you can define a
2154    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
2155    /// to override any property that can be set on a Kubernetes Pod.
2156    /// Read the
2157    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
2158    /// for more information.
2159    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
2160    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
2161    /// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
2162    #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
2163    pub role_config: Option<AirflowClusterTriggerersRoleConfig>,
2164    #[serde(rename = "roleGroups")]
2165    pub role_groups: BTreeMap<String, AirflowClusterTriggerersRoleGroups>,
2166}
2167
2168#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2169pub struct AirflowClusterTriggerersConfig {
2170    /// These configuration settings control
2171    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2172    #[serde(default, skip_serializing_if = "Option::is_none")]
2173    pub affinity: Option<AirflowClusterTriggerersConfigAffinity>,
2174    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
2175    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
2176    pub graceful_shutdown_timeout: Option<String>,
2177    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
2178    #[serde(default, skip_serializing_if = "Option::is_none")]
2179    pub logging: Option<AirflowClusterTriggerersConfigLogging>,
2180    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2181    /// usage, if this role needs any.
2182    #[serde(default, skip_serializing_if = "Option::is_none")]
2183    pub resources: Option<AirflowClusterTriggerersConfigResources>,
2184}
2185
2186/// These configuration settings control
2187/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2188#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2189pub struct AirflowClusterTriggerersConfigAffinity {
2190    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2191    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
2192    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
2193    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2194    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
2195    pub node_selector: Option<BTreeMap<String, String>>,
2196    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2197    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
2198    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
2199    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2200    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
2201    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
2202}
2203
2204/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
2205#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2206pub struct AirflowClusterTriggerersConfigLogging {
2207    /// Log configuration per container.
2208    #[serde(default, skip_serializing_if = "Option::is_none")]
2209    pub containers: Option<BTreeMap<String, AirflowClusterTriggerersConfigLoggingContainers>>,
2210    /// Wether or not to deploy a container with the Vector log agent.
2211    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
2212    pub enable_vector_agent: Option<bool>,
2213}
2214
2215/// Log configuration per container.
2216#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2217pub struct AirflowClusterTriggerersConfigLoggingContainers {
2218    /// Configuration for the console appender
2219    #[serde(default, skip_serializing_if = "Option::is_none")]
2220    pub console: Option<AirflowClusterTriggerersConfigLoggingContainersConsole>,
2221    /// Log configuration provided in a ConfigMap
2222    #[serde(default, skip_serializing_if = "Option::is_none")]
2223    pub custom: Option<AirflowClusterTriggerersConfigLoggingContainersCustom>,
2224    /// Configuration for the file appender
2225    #[serde(default, skip_serializing_if = "Option::is_none")]
2226    pub file: Option<AirflowClusterTriggerersConfigLoggingContainersFile>,
2227    /// Configuration per logger
2228    #[serde(default, skip_serializing_if = "Option::is_none")]
2229    pub loggers: Option<BTreeMap<String, AirflowClusterTriggerersConfigLoggingContainersLoggers>>,
2230}
2231
2232/// Configuration for the console appender
2233#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2234pub struct AirflowClusterTriggerersConfigLoggingContainersConsole {
2235    /// The log level threshold.
2236    /// Log events with a lower log level are discarded.
2237    #[serde(default, skip_serializing_if = "Option::is_none")]
2238    pub level: Option<AirflowClusterTriggerersConfigLoggingContainersConsoleLevel>,
2239}
2240
2241/// Configuration for the console appender
2242#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2243pub enum AirflowClusterTriggerersConfigLoggingContainersConsoleLevel {
2244    #[serde(rename = "TRACE")]
2245    Trace,
2246    #[serde(rename = "DEBUG")]
2247    Debug,
2248    #[serde(rename = "INFO")]
2249    Info,
2250    #[serde(rename = "WARN")]
2251    Warn,
2252    #[serde(rename = "ERROR")]
2253    Error,
2254    #[serde(rename = "FATAL")]
2255    Fatal,
2256    #[serde(rename = "NONE")]
2257    None,
2258}
2259
2260/// Log configuration provided in a ConfigMap
2261#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2262pub struct AirflowClusterTriggerersConfigLoggingContainersCustom {
2263    /// ConfigMap containing the log configuration files
2264    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
2265    pub config_map: Option<String>,
2266}
2267
2268/// Configuration for the file appender
2269#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2270pub struct AirflowClusterTriggerersConfigLoggingContainersFile {
2271    /// The log level threshold.
2272    /// Log events with a lower log level are discarded.
2273    #[serde(default, skip_serializing_if = "Option::is_none")]
2274    pub level: Option<AirflowClusterTriggerersConfigLoggingContainersFileLevel>,
2275}
2276
2277/// Configuration for the file appender
2278#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2279pub enum AirflowClusterTriggerersConfigLoggingContainersFileLevel {
2280    #[serde(rename = "TRACE")]
2281    Trace,
2282    #[serde(rename = "DEBUG")]
2283    Debug,
2284    #[serde(rename = "INFO")]
2285    Info,
2286    #[serde(rename = "WARN")]
2287    Warn,
2288    #[serde(rename = "ERROR")]
2289    Error,
2290    #[serde(rename = "FATAL")]
2291    Fatal,
2292    #[serde(rename = "NONE")]
2293    None,
2294}
2295
2296/// Configuration per logger
2297#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2298pub struct AirflowClusterTriggerersConfigLoggingContainersLoggers {
2299    /// The log level threshold.
2300    /// Log events with a lower log level are discarded.
2301    #[serde(default, skip_serializing_if = "Option::is_none")]
2302    pub level: Option<AirflowClusterTriggerersConfigLoggingContainersLoggersLevel>,
2303}
2304
2305/// Configuration per logger
2306#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2307pub enum AirflowClusterTriggerersConfigLoggingContainersLoggersLevel {
2308    #[serde(rename = "TRACE")]
2309    Trace,
2310    #[serde(rename = "DEBUG")]
2311    Debug,
2312    #[serde(rename = "INFO")]
2313    Info,
2314    #[serde(rename = "WARN")]
2315    Warn,
2316    #[serde(rename = "ERROR")]
2317    Error,
2318    #[serde(rename = "FATAL")]
2319    Fatal,
2320    #[serde(rename = "NONE")]
2321    None,
2322}
2323
2324/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2325/// usage, if this role needs any.
2326#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2327pub struct AirflowClusterTriggerersConfigResources {
2328    #[serde(default, skip_serializing_if = "Option::is_none")]
2329    pub cpu: Option<AirflowClusterTriggerersConfigResourcesCpu>,
2330    #[serde(default, skip_serializing_if = "Option::is_none")]
2331    pub memory: Option<AirflowClusterTriggerersConfigResourcesMemory>,
2332    #[serde(default, skip_serializing_if = "Option::is_none")]
2333    pub storage: Option<AirflowClusterTriggerersConfigResourcesStorage>,
2334}
2335
2336#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2337pub struct AirflowClusterTriggerersConfigResourcesCpu {
2338    /// The maximum amount of CPU cores that can be requested by Pods.
2339    /// Equivalent to the `limit` for Pod resource configuration.
2340    /// Cores are specified either as a decimal point number or as milli units.
2341    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2342    #[serde(default, skip_serializing_if = "Option::is_none")]
2343    pub max: Option<String>,
2344    /// The minimal amount of CPU cores that Pods need to run.
2345    /// Equivalent to the `request` for Pod resource configuration.
2346    /// Cores are specified either as a decimal point number or as milli units.
2347    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2348    #[serde(default, skip_serializing_if = "Option::is_none")]
2349    pub min: Option<String>,
2350}
2351
2352#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2353pub struct AirflowClusterTriggerersConfigResourcesMemory {
2354    /// The maximum amount of memory that should be available to the Pod.
2355    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
2356    /// which means these suffixes are supported: E, P, T, G, M, k.
2357    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
2358    /// For example, the following represent roughly the same value:
2359    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
2360    #[serde(default, skip_serializing_if = "Option::is_none")]
2361    pub limit: Option<String>,
2362    /// Additional options that can be specified.
2363    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
2364    pub runtime_limits: Option<AirflowClusterTriggerersConfigResourcesMemoryRuntimeLimits>,
2365}
2366
2367/// Additional options that can be specified.
2368#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2369pub struct AirflowClusterTriggerersConfigResourcesMemoryRuntimeLimits {
2370}
2371
2372#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2373pub struct AirflowClusterTriggerersConfigResourcesStorage {
2374}
2375
2376/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
2377#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2378pub struct AirflowClusterTriggerersRoleConfig {
2379    /// This struct is used to configure:
2380    /// 
2381    /// 1. If PodDisruptionBudgets are created by the operator
2382    /// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
2383    /// 
2384    /// Learn more in the
2385    /// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
2386    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
2387    pub pod_disruption_budget: Option<AirflowClusterTriggerersRoleConfigPodDisruptionBudget>,
2388}
2389
2390/// This struct is used to configure:
2391/// 
2392/// 1. If PodDisruptionBudgets are created by the operator
2393/// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
2394/// 
2395/// Learn more in the
2396/// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
2397#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2398pub struct AirflowClusterTriggerersRoleConfigPodDisruptionBudget {
2399    /// Whether a PodDisruptionBudget should be written out for this role.
2400    /// Disabling this enables you to specify your own - custom - one.
2401    /// Defaults to true.
2402    #[serde(default, skip_serializing_if = "Option::is_none")]
2403    pub enabled: Option<bool>,
2404    /// The number of Pods that are allowed to be down because of voluntary disruptions.
2405    /// If you don't explicitly set this, the operator will use a sane default based
2406    /// upon knowledge about the individual product.
2407    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
2408    pub max_unavailable: Option<u16>,
2409}
2410
2411#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2412pub struct AirflowClusterTriggerersRoleGroups {
2413    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
2414    pub cli_overrides: Option<BTreeMap<String, String>>,
2415    #[serde(default, skip_serializing_if = "Option::is_none")]
2416    pub config: Option<AirflowClusterTriggerersRoleGroupsConfig>,
2417    /// The `configOverrides` can be used to configure properties in product config files
2418    /// that are not exposed in the CRD. Read the
2419    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
2420    /// and consult the operator specific usage guide documentation for details on the
2421    /// available config files and settings for the specific product.
2422    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
2423    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
2424    /// `envOverrides` configure environment variables to be set in the Pods.
2425    /// It is a map from strings to strings - environment variables and the value to set.
2426    /// Read the
2427    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
2428    /// for more information and consult the operator specific usage guide to find out about
2429    /// the product specific environment variables that are available.
2430    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
2431    pub env_overrides: Option<BTreeMap<String, String>>,
2432    /// In the `podOverrides` property you can define a
2433    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
2434    /// to override any property that can be set on a Kubernetes Pod.
2435    /// Read the
2436    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
2437    /// for more information.
2438    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
2439    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
2440    #[serde(default, skip_serializing_if = "Option::is_none")]
2441    pub replicas: Option<u16>,
2442}
2443
2444#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2445pub struct AirflowClusterTriggerersRoleGroupsConfig {
2446    /// These configuration settings control
2447    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2448    #[serde(default, skip_serializing_if = "Option::is_none")]
2449    pub affinity: Option<AirflowClusterTriggerersRoleGroupsConfigAffinity>,
2450    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
2451    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
2452    pub graceful_shutdown_timeout: Option<String>,
2453    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
2454    #[serde(default, skip_serializing_if = "Option::is_none")]
2455    pub logging: Option<AirflowClusterTriggerersRoleGroupsConfigLogging>,
2456    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2457    /// usage, if this role needs any.
2458    #[serde(default, skip_serializing_if = "Option::is_none")]
2459    pub resources: Option<AirflowClusterTriggerersRoleGroupsConfigResources>,
2460}
2461
2462/// These configuration settings control
2463/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2464#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2465pub struct AirflowClusterTriggerersRoleGroupsConfigAffinity {
2466    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2467    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
2468    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
2469    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2470    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
2471    pub node_selector: Option<BTreeMap<String, String>>,
2472    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2473    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
2474    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
2475    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2476    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
2477    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
2478}
2479
2480/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
2481#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2482pub struct AirflowClusterTriggerersRoleGroupsConfigLogging {
2483    /// Log configuration per container.
2484    #[serde(default, skip_serializing_if = "Option::is_none")]
2485    pub containers: Option<BTreeMap<String, AirflowClusterTriggerersRoleGroupsConfigLoggingContainers>>,
2486    /// Wether or not to deploy a container with the Vector log agent.
2487    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
2488    pub enable_vector_agent: Option<bool>,
2489}
2490
2491/// Log configuration per container.
2492#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2493pub struct AirflowClusterTriggerersRoleGroupsConfigLoggingContainers {
2494    /// Configuration for the console appender
2495    #[serde(default, skip_serializing_if = "Option::is_none")]
2496    pub console: Option<AirflowClusterTriggerersRoleGroupsConfigLoggingContainersConsole>,
2497    /// Log configuration provided in a ConfigMap
2498    #[serde(default, skip_serializing_if = "Option::is_none")]
2499    pub custom: Option<AirflowClusterTriggerersRoleGroupsConfigLoggingContainersCustom>,
2500    /// Configuration for the file appender
2501    #[serde(default, skip_serializing_if = "Option::is_none")]
2502    pub file: Option<AirflowClusterTriggerersRoleGroupsConfigLoggingContainersFile>,
2503    /// Configuration per logger
2504    #[serde(default, skip_serializing_if = "Option::is_none")]
2505    pub loggers: Option<BTreeMap<String, AirflowClusterTriggerersRoleGroupsConfigLoggingContainersLoggers>>,
2506}
2507
2508/// Configuration for the console appender
2509#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2510pub struct AirflowClusterTriggerersRoleGroupsConfigLoggingContainersConsole {
2511    /// The log level threshold.
2512    /// Log events with a lower log level are discarded.
2513    #[serde(default, skip_serializing_if = "Option::is_none")]
2514    pub level: Option<AirflowClusterTriggerersRoleGroupsConfigLoggingContainersConsoleLevel>,
2515}
2516
2517/// Configuration for the console appender
2518#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2519pub enum AirflowClusterTriggerersRoleGroupsConfigLoggingContainersConsoleLevel {
2520    #[serde(rename = "TRACE")]
2521    Trace,
2522    #[serde(rename = "DEBUG")]
2523    Debug,
2524    #[serde(rename = "INFO")]
2525    Info,
2526    #[serde(rename = "WARN")]
2527    Warn,
2528    #[serde(rename = "ERROR")]
2529    Error,
2530    #[serde(rename = "FATAL")]
2531    Fatal,
2532    #[serde(rename = "NONE")]
2533    None,
2534}
2535
2536/// Log configuration provided in a ConfigMap
2537#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2538pub struct AirflowClusterTriggerersRoleGroupsConfigLoggingContainersCustom {
2539    /// ConfigMap containing the log configuration files
2540    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
2541    pub config_map: Option<String>,
2542}
2543
2544/// Configuration for the file appender
2545#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2546pub struct AirflowClusterTriggerersRoleGroupsConfigLoggingContainersFile {
2547    /// The log level threshold.
2548    /// Log events with a lower log level are discarded.
2549    #[serde(default, skip_serializing_if = "Option::is_none")]
2550    pub level: Option<AirflowClusterTriggerersRoleGroupsConfigLoggingContainersFileLevel>,
2551}
2552
2553/// Configuration for the file appender
2554#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2555pub enum AirflowClusterTriggerersRoleGroupsConfigLoggingContainersFileLevel {
2556    #[serde(rename = "TRACE")]
2557    Trace,
2558    #[serde(rename = "DEBUG")]
2559    Debug,
2560    #[serde(rename = "INFO")]
2561    Info,
2562    #[serde(rename = "WARN")]
2563    Warn,
2564    #[serde(rename = "ERROR")]
2565    Error,
2566    #[serde(rename = "FATAL")]
2567    Fatal,
2568    #[serde(rename = "NONE")]
2569    None,
2570}
2571
2572/// Configuration per logger
2573#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2574pub struct AirflowClusterTriggerersRoleGroupsConfigLoggingContainersLoggers {
2575    /// The log level threshold.
2576    /// Log events with a lower log level are discarded.
2577    #[serde(default, skip_serializing_if = "Option::is_none")]
2578    pub level: Option<AirflowClusterTriggerersRoleGroupsConfigLoggingContainersLoggersLevel>,
2579}
2580
2581/// Configuration per logger
2582#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2583pub enum AirflowClusterTriggerersRoleGroupsConfigLoggingContainersLoggersLevel {
2584    #[serde(rename = "TRACE")]
2585    Trace,
2586    #[serde(rename = "DEBUG")]
2587    Debug,
2588    #[serde(rename = "INFO")]
2589    Info,
2590    #[serde(rename = "WARN")]
2591    Warn,
2592    #[serde(rename = "ERROR")]
2593    Error,
2594    #[serde(rename = "FATAL")]
2595    Fatal,
2596    #[serde(rename = "NONE")]
2597    None,
2598}
2599
2600/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2601/// usage, if this role needs any.
2602#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2603pub struct AirflowClusterTriggerersRoleGroupsConfigResources {
2604    #[serde(default, skip_serializing_if = "Option::is_none")]
2605    pub cpu: Option<AirflowClusterTriggerersRoleGroupsConfigResourcesCpu>,
2606    #[serde(default, skip_serializing_if = "Option::is_none")]
2607    pub memory: Option<AirflowClusterTriggerersRoleGroupsConfigResourcesMemory>,
2608    #[serde(default, skip_serializing_if = "Option::is_none")]
2609    pub storage: Option<AirflowClusterTriggerersRoleGroupsConfigResourcesStorage>,
2610}
2611
2612#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2613pub struct AirflowClusterTriggerersRoleGroupsConfigResourcesCpu {
2614    /// The maximum amount of CPU cores that can be requested by Pods.
2615    /// Equivalent to the `limit` for Pod resource configuration.
2616    /// Cores are specified either as a decimal point number or as milli units.
2617    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2618    #[serde(default, skip_serializing_if = "Option::is_none")]
2619    pub max: Option<String>,
2620    /// The minimal amount of CPU cores that Pods need to run.
2621    /// Equivalent to the `request` for Pod resource configuration.
2622    /// Cores are specified either as a decimal point number or as milli units.
2623    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2624    #[serde(default, skip_serializing_if = "Option::is_none")]
2625    pub min: Option<String>,
2626}
2627
2628#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2629pub struct AirflowClusterTriggerersRoleGroupsConfigResourcesMemory {
2630    /// The maximum amount of memory that should be available to the Pod.
2631    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
2632    /// which means these suffixes are supported: E, P, T, G, M, k.
2633    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
2634    /// For example, the following represent roughly the same value:
2635    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
2636    #[serde(default, skip_serializing_if = "Option::is_none")]
2637    pub limit: Option<String>,
2638    /// Additional options that can be specified.
2639    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
2640    pub runtime_limits: Option<AirflowClusterTriggerersRoleGroupsConfigResourcesMemoryRuntimeLimits>,
2641}
2642
2643/// Additional options that can be specified.
2644#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2645pub struct AirflowClusterTriggerersRoleGroupsConfigResourcesMemoryRuntimeLimits {
2646}
2647
2648#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2649pub struct AirflowClusterTriggerersRoleGroupsConfigResourcesStorage {
2650}
2651
2652/// The `webservers` role provides the main UI for user interaction.
2653#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2654pub struct AirflowClusterWebservers {
2655    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
2656    pub cli_overrides: Option<BTreeMap<String, String>>,
2657    #[serde(default, skip_serializing_if = "Option::is_none")]
2658    pub config: Option<AirflowClusterWebserversConfig>,
2659    /// The `configOverrides` can be used to configure properties in product config files
2660    /// that are not exposed in the CRD. Read the
2661    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
2662    /// and consult the operator specific usage guide documentation for details on the
2663    /// available config files and settings for the specific product.
2664    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
2665    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
2666    /// `envOverrides` configure environment variables to be set in the Pods.
2667    /// It is a map from strings to strings - environment variables and the value to set.
2668    /// Read the
2669    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
2670    /// for more information and consult the operator specific usage guide to find out about
2671    /// the product specific environment variables that are available.
2672    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
2673    pub env_overrides: Option<BTreeMap<String, String>>,
2674    /// In the `podOverrides` property you can define a
2675    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
2676    /// to override any property that can be set on a Kubernetes Pod.
2677    /// Read the
2678    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
2679    /// for more information.
2680    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
2681    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
2682    /// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
2683    #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
2684    pub role_config: Option<AirflowClusterWebserversRoleConfig>,
2685    #[serde(rename = "roleGroups")]
2686    pub role_groups: BTreeMap<String, AirflowClusterWebserversRoleGroups>,
2687}
2688
2689#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2690pub struct AirflowClusterWebserversConfig {
2691    /// These configuration settings control
2692    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2693    #[serde(default, skip_serializing_if = "Option::is_none")]
2694    pub affinity: Option<AirflowClusterWebserversConfigAffinity>,
2695    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
2696    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
2697    pub graceful_shutdown_timeout: Option<String>,
2698    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
2699    #[serde(default, skip_serializing_if = "Option::is_none")]
2700    pub logging: Option<AirflowClusterWebserversConfigLogging>,
2701    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2702    /// usage, if this role needs any.
2703    #[serde(default, skip_serializing_if = "Option::is_none")]
2704    pub resources: Option<AirflowClusterWebserversConfigResources>,
2705}
2706
2707/// These configuration settings control
2708/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2709#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2710pub struct AirflowClusterWebserversConfigAffinity {
2711    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2712    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
2713    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
2714    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2715    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
2716    pub node_selector: Option<BTreeMap<String, String>>,
2717    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2718    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
2719    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
2720    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2721    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
2722    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
2723}
2724
2725/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
2726#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2727pub struct AirflowClusterWebserversConfigLogging {
2728    /// Log configuration per container.
2729    #[serde(default, skip_serializing_if = "Option::is_none")]
2730    pub containers: Option<BTreeMap<String, AirflowClusterWebserversConfigLoggingContainers>>,
2731    /// Wether or not to deploy a container with the Vector log agent.
2732    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
2733    pub enable_vector_agent: Option<bool>,
2734}
2735
2736/// Log configuration per container.
2737#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2738pub struct AirflowClusterWebserversConfigLoggingContainers {
2739    /// Configuration for the console appender
2740    #[serde(default, skip_serializing_if = "Option::is_none")]
2741    pub console: Option<AirflowClusterWebserversConfigLoggingContainersConsole>,
2742    /// Log configuration provided in a ConfigMap
2743    #[serde(default, skip_serializing_if = "Option::is_none")]
2744    pub custom: Option<AirflowClusterWebserversConfigLoggingContainersCustom>,
2745    /// Configuration for the file appender
2746    #[serde(default, skip_serializing_if = "Option::is_none")]
2747    pub file: Option<AirflowClusterWebserversConfigLoggingContainersFile>,
2748    /// Configuration per logger
2749    #[serde(default, skip_serializing_if = "Option::is_none")]
2750    pub loggers: Option<BTreeMap<String, AirflowClusterWebserversConfigLoggingContainersLoggers>>,
2751}
2752
2753/// Configuration for the console appender
2754#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2755pub struct AirflowClusterWebserversConfigLoggingContainersConsole {
2756    /// The log level threshold.
2757    /// Log events with a lower log level are discarded.
2758    #[serde(default, skip_serializing_if = "Option::is_none")]
2759    pub level: Option<AirflowClusterWebserversConfigLoggingContainersConsoleLevel>,
2760}
2761
2762/// Configuration for the console appender
2763#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2764pub enum AirflowClusterWebserversConfigLoggingContainersConsoleLevel {
2765    #[serde(rename = "TRACE")]
2766    Trace,
2767    #[serde(rename = "DEBUG")]
2768    Debug,
2769    #[serde(rename = "INFO")]
2770    Info,
2771    #[serde(rename = "WARN")]
2772    Warn,
2773    #[serde(rename = "ERROR")]
2774    Error,
2775    #[serde(rename = "FATAL")]
2776    Fatal,
2777    #[serde(rename = "NONE")]
2778    None,
2779}
2780
2781/// Log configuration provided in a ConfigMap
2782#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2783pub struct AirflowClusterWebserversConfigLoggingContainersCustom {
2784    /// ConfigMap containing the log configuration files
2785    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
2786    pub config_map: Option<String>,
2787}
2788
2789/// Configuration for the file appender
2790#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2791pub struct AirflowClusterWebserversConfigLoggingContainersFile {
2792    /// The log level threshold.
2793    /// Log events with a lower log level are discarded.
2794    #[serde(default, skip_serializing_if = "Option::is_none")]
2795    pub level: Option<AirflowClusterWebserversConfigLoggingContainersFileLevel>,
2796}
2797
2798/// Configuration for the file appender
2799#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2800pub enum AirflowClusterWebserversConfigLoggingContainersFileLevel {
2801    #[serde(rename = "TRACE")]
2802    Trace,
2803    #[serde(rename = "DEBUG")]
2804    Debug,
2805    #[serde(rename = "INFO")]
2806    Info,
2807    #[serde(rename = "WARN")]
2808    Warn,
2809    #[serde(rename = "ERROR")]
2810    Error,
2811    #[serde(rename = "FATAL")]
2812    Fatal,
2813    #[serde(rename = "NONE")]
2814    None,
2815}
2816
2817/// Configuration per logger
2818#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2819pub struct AirflowClusterWebserversConfigLoggingContainersLoggers {
2820    /// The log level threshold.
2821    /// Log events with a lower log level are discarded.
2822    #[serde(default, skip_serializing_if = "Option::is_none")]
2823    pub level: Option<AirflowClusterWebserversConfigLoggingContainersLoggersLevel>,
2824}
2825
2826/// Configuration per logger
2827#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
2828pub enum AirflowClusterWebserversConfigLoggingContainersLoggersLevel {
2829    #[serde(rename = "TRACE")]
2830    Trace,
2831    #[serde(rename = "DEBUG")]
2832    Debug,
2833    #[serde(rename = "INFO")]
2834    Info,
2835    #[serde(rename = "WARN")]
2836    Warn,
2837    #[serde(rename = "ERROR")]
2838    Error,
2839    #[serde(rename = "FATAL")]
2840    Fatal,
2841    #[serde(rename = "NONE")]
2842    None,
2843}
2844
2845/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2846/// usage, if this role needs any.
2847#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2848pub struct AirflowClusterWebserversConfigResources {
2849    #[serde(default, skip_serializing_if = "Option::is_none")]
2850    pub cpu: Option<AirflowClusterWebserversConfigResourcesCpu>,
2851    #[serde(default, skip_serializing_if = "Option::is_none")]
2852    pub memory: Option<AirflowClusterWebserversConfigResourcesMemory>,
2853    #[serde(default, skip_serializing_if = "Option::is_none")]
2854    pub storage: Option<AirflowClusterWebserversConfigResourcesStorage>,
2855}
2856
2857#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2858pub struct AirflowClusterWebserversConfigResourcesCpu {
2859    /// The maximum amount of CPU cores that can be requested by Pods.
2860    /// Equivalent to the `limit` for Pod resource configuration.
2861    /// Cores are specified either as a decimal point number or as milli units.
2862    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2863    #[serde(default, skip_serializing_if = "Option::is_none")]
2864    pub max: Option<String>,
2865    /// The minimal amount of CPU cores that Pods need to run.
2866    /// Equivalent to the `request` for Pod resource configuration.
2867    /// Cores are specified either as a decimal point number or as milli units.
2868    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
2869    #[serde(default, skip_serializing_if = "Option::is_none")]
2870    pub min: Option<String>,
2871}
2872
2873#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2874pub struct AirflowClusterWebserversConfigResourcesMemory {
2875    /// The maximum amount of memory that should be available to the Pod.
2876    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
2877    /// which means these suffixes are supported: E, P, T, G, M, k.
2878    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
2879    /// For example, the following represent roughly the same value:
2880    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
2881    #[serde(default, skip_serializing_if = "Option::is_none")]
2882    pub limit: Option<String>,
2883    /// Additional options that can be specified.
2884    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
2885    pub runtime_limits: Option<AirflowClusterWebserversConfigResourcesMemoryRuntimeLimits>,
2886}
2887
2888/// Additional options that can be specified.
2889#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2890pub struct AirflowClusterWebserversConfigResourcesMemoryRuntimeLimits {
2891}
2892
2893#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2894pub struct AirflowClusterWebserversConfigResourcesStorage {
2895}
2896
2897/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
2898#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2899pub struct AirflowClusterWebserversRoleConfig {
2900    /// This field controls which [ListenerClass](<https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html)> is used to expose the webserver.
2901    #[serde(default, skip_serializing_if = "Option::is_none", rename = "listenerClass")]
2902    pub listener_class: Option<String>,
2903    /// This struct is used to configure:
2904    /// 
2905    /// 1. If PodDisruptionBudgets are created by the operator
2906    /// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
2907    /// 
2908    /// Learn more in the
2909    /// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
2910    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
2911    pub pod_disruption_budget: Option<AirflowClusterWebserversRoleConfigPodDisruptionBudget>,
2912}
2913
2914/// This struct is used to configure:
2915/// 
2916/// 1. If PodDisruptionBudgets are created by the operator
2917/// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
2918/// 
2919/// Learn more in the
2920/// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
2921#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2922pub struct AirflowClusterWebserversRoleConfigPodDisruptionBudget {
2923    /// Whether a PodDisruptionBudget should be written out for this role.
2924    /// Disabling this enables you to specify your own - custom - one.
2925    /// Defaults to true.
2926    #[serde(default, skip_serializing_if = "Option::is_none")]
2927    pub enabled: Option<bool>,
2928    /// The number of Pods that are allowed to be down because of voluntary disruptions.
2929    /// If you don't explicitly set this, the operator will use a sane default based
2930    /// upon knowledge about the individual product.
2931    #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
2932    pub max_unavailable: Option<u16>,
2933}
2934
2935#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2936pub struct AirflowClusterWebserversRoleGroups {
2937    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
2938    pub cli_overrides: Option<BTreeMap<String, String>>,
2939    #[serde(default, skip_serializing_if = "Option::is_none")]
2940    pub config: Option<AirflowClusterWebserversRoleGroupsConfig>,
2941    /// The `configOverrides` can be used to configure properties in product config files
2942    /// that are not exposed in the CRD. Read the
2943    /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
2944    /// and consult the operator specific usage guide documentation for details on the
2945    /// available config files and settings for the specific product.
2946    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
2947    pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
2948    /// `envOverrides` configure environment variables to be set in the Pods.
2949    /// It is a map from strings to strings - environment variables and the value to set.
2950    /// Read the
2951    /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
2952    /// for more information and consult the operator specific usage guide to find out about
2953    /// the product specific environment variables that are available.
2954    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
2955    pub env_overrides: Option<BTreeMap<String, String>>,
2956    /// In the `podOverrides` property you can define a
2957    /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
2958    /// to override any property that can be set on a Kubernetes Pod.
2959    /// Read the
2960    /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
2961    /// for more information.
2962    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
2963    pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
2964    #[serde(default, skip_serializing_if = "Option::is_none")]
2965    pub replicas: Option<u16>,
2966}
2967
2968#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2969pub struct AirflowClusterWebserversRoleGroupsConfig {
2970    /// These configuration settings control
2971    /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2972    #[serde(default, skip_serializing_if = "Option::is_none")]
2973    pub affinity: Option<AirflowClusterWebserversRoleGroupsConfigAffinity>,
2974    /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
2975    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
2976    pub graceful_shutdown_timeout: Option<String>,
2977    /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
2978    #[serde(default, skip_serializing_if = "Option::is_none")]
2979    pub logging: Option<AirflowClusterWebserversRoleGroupsConfigLogging>,
2980    /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
2981    /// usage, if this role needs any.
2982    #[serde(default, skip_serializing_if = "Option::is_none")]
2983    pub resources: Option<AirflowClusterWebserversRoleGroupsConfigResources>,
2984}
2985
2986/// These configuration settings control
2987/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
2988#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2989pub struct AirflowClusterWebserversRoleGroupsConfigAffinity {
2990    /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2991    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
2992    pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
2993    /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2994    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
2995    pub node_selector: Option<BTreeMap<String, String>>,
2996    /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
2997    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
2998    pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
2999    /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
3000    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
3001    pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
3002}
3003
3004/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
3005#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3006pub struct AirflowClusterWebserversRoleGroupsConfigLogging {
3007    /// Log configuration per container.
3008    #[serde(default, skip_serializing_if = "Option::is_none")]
3009    pub containers: Option<BTreeMap<String, AirflowClusterWebserversRoleGroupsConfigLoggingContainers>>,
3010    /// Wether or not to deploy a container with the Vector log agent.
3011    #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
3012    pub enable_vector_agent: Option<bool>,
3013}
3014
3015/// Log configuration per container.
3016#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3017pub struct AirflowClusterWebserversRoleGroupsConfigLoggingContainers {
3018    /// Configuration for the console appender
3019    #[serde(default, skip_serializing_if = "Option::is_none")]
3020    pub console: Option<AirflowClusterWebserversRoleGroupsConfigLoggingContainersConsole>,
3021    /// Log configuration provided in a ConfigMap
3022    #[serde(default, skip_serializing_if = "Option::is_none")]
3023    pub custom: Option<AirflowClusterWebserversRoleGroupsConfigLoggingContainersCustom>,
3024    /// Configuration for the file appender
3025    #[serde(default, skip_serializing_if = "Option::is_none")]
3026    pub file: Option<AirflowClusterWebserversRoleGroupsConfigLoggingContainersFile>,
3027    /// Configuration per logger
3028    #[serde(default, skip_serializing_if = "Option::is_none")]
3029    pub loggers: Option<BTreeMap<String, AirflowClusterWebserversRoleGroupsConfigLoggingContainersLoggers>>,
3030}
3031
3032/// Configuration for the console appender
3033#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3034pub struct AirflowClusterWebserversRoleGroupsConfigLoggingContainersConsole {
3035    /// The log level threshold.
3036    /// Log events with a lower log level are discarded.
3037    #[serde(default, skip_serializing_if = "Option::is_none")]
3038    pub level: Option<AirflowClusterWebserversRoleGroupsConfigLoggingContainersConsoleLevel>,
3039}
3040
3041/// Configuration for the console appender
3042#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
3043pub enum AirflowClusterWebserversRoleGroupsConfigLoggingContainersConsoleLevel {
3044    #[serde(rename = "TRACE")]
3045    Trace,
3046    #[serde(rename = "DEBUG")]
3047    Debug,
3048    #[serde(rename = "INFO")]
3049    Info,
3050    #[serde(rename = "WARN")]
3051    Warn,
3052    #[serde(rename = "ERROR")]
3053    Error,
3054    #[serde(rename = "FATAL")]
3055    Fatal,
3056    #[serde(rename = "NONE")]
3057    None,
3058}
3059
3060/// Log configuration provided in a ConfigMap
3061#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3062pub struct AirflowClusterWebserversRoleGroupsConfigLoggingContainersCustom {
3063    /// ConfigMap containing the log configuration files
3064    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
3065    pub config_map: Option<String>,
3066}
3067
3068/// Configuration for the file appender
3069#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3070pub struct AirflowClusterWebserversRoleGroupsConfigLoggingContainersFile {
3071    /// The log level threshold.
3072    /// Log events with a lower log level are discarded.
3073    #[serde(default, skip_serializing_if = "Option::is_none")]
3074    pub level: Option<AirflowClusterWebserversRoleGroupsConfigLoggingContainersFileLevel>,
3075}
3076
3077/// Configuration for the file appender
3078#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
3079pub enum AirflowClusterWebserversRoleGroupsConfigLoggingContainersFileLevel {
3080    #[serde(rename = "TRACE")]
3081    Trace,
3082    #[serde(rename = "DEBUG")]
3083    Debug,
3084    #[serde(rename = "INFO")]
3085    Info,
3086    #[serde(rename = "WARN")]
3087    Warn,
3088    #[serde(rename = "ERROR")]
3089    Error,
3090    #[serde(rename = "FATAL")]
3091    Fatal,
3092    #[serde(rename = "NONE")]
3093    None,
3094}
3095
3096/// Configuration per logger
3097#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3098pub struct AirflowClusterWebserversRoleGroupsConfigLoggingContainersLoggers {
3099    /// The log level threshold.
3100    /// Log events with a lower log level are discarded.
3101    #[serde(default, skip_serializing_if = "Option::is_none")]
3102    pub level: Option<AirflowClusterWebserversRoleGroupsConfigLoggingContainersLoggersLevel>,
3103}
3104
3105/// Configuration per logger
3106#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
3107pub enum AirflowClusterWebserversRoleGroupsConfigLoggingContainersLoggersLevel {
3108    #[serde(rename = "TRACE")]
3109    Trace,
3110    #[serde(rename = "DEBUG")]
3111    Debug,
3112    #[serde(rename = "INFO")]
3113    Info,
3114    #[serde(rename = "WARN")]
3115    Warn,
3116    #[serde(rename = "ERROR")]
3117    Error,
3118    #[serde(rename = "FATAL")]
3119    Fatal,
3120    #[serde(rename = "NONE")]
3121    None,
3122}
3123
3124/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
3125/// usage, if this role needs any.
3126#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3127pub struct AirflowClusterWebserversRoleGroupsConfigResources {
3128    #[serde(default, skip_serializing_if = "Option::is_none")]
3129    pub cpu: Option<AirflowClusterWebserversRoleGroupsConfigResourcesCpu>,
3130    #[serde(default, skip_serializing_if = "Option::is_none")]
3131    pub memory: Option<AirflowClusterWebserversRoleGroupsConfigResourcesMemory>,
3132    #[serde(default, skip_serializing_if = "Option::is_none")]
3133    pub storage: Option<AirflowClusterWebserversRoleGroupsConfigResourcesStorage>,
3134}
3135
3136#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3137pub struct AirflowClusterWebserversRoleGroupsConfigResourcesCpu {
3138    /// The maximum amount of CPU cores that can be requested by Pods.
3139    /// Equivalent to the `limit` for Pod resource configuration.
3140    /// Cores are specified either as a decimal point number or as milli units.
3141    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
3142    #[serde(default, skip_serializing_if = "Option::is_none")]
3143    pub max: Option<String>,
3144    /// The minimal amount of CPU cores that Pods need to run.
3145    /// Equivalent to the `request` for Pod resource configuration.
3146    /// Cores are specified either as a decimal point number or as milli units.
3147    /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
3148    #[serde(default, skip_serializing_if = "Option::is_none")]
3149    pub min: Option<String>,
3150}
3151
3152#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3153pub struct AirflowClusterWebserversRoleGroupsConfigResourcesMemory {
3154    /// The maximum amount of memory that should be available to the Pod.
3155    /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
3156    /// which means these suffixes are supported: E, P, T, G, M, k.
3157    /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
3158    /// For example, the following represent roughly the same value:
3159    /// `128974848, 129e6, 129M,  128974848000m, 123Mi`
3160    #[serde(default, skip_serializing_if = "Option::is_none")]
3161    pub limit: Option<String>,
3162    /// Additional options that can be specified.
3163    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
3164    pub runtime_limits: Option<AirflowClusterWebserversRoleGroupsConfigResourcesMemoryRuntimeLimits>,
3165}
3166
3167/// Additional options that can be specified.
3168#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3169pub struct AirflowClusterWebserversRoleGroupsConfigResourcesMemoryRuntimeLimits {
3170}
3171
3172#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3173pub struct AirflowClusterWebserversRoleGroupsConfigResourcesStorage {
3174}
3175
3176#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3177pub struct AirflowClusterStatus {
3178    #[serde(default, skip_serializing_if = "Option::is_none")]
3179    pub conditions: Option<Vec<Condition>>,
3180}
3181