kcr_zookeeper_stackable_tech/v1alpha1/zookeeperclusters.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/zookeeper-operator/zookeeper.stackable.tech/v1alpha1/zookeeperclusters.yaml
3// kopium version: 0.22.5
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}
12use self::prelude::*;
13
14/// A ZooKeeper cluster stacklet. This resource is managed by the Stackable operator for Apache ZooKeeper.
15/// Find more information on how to use it and the resources that the operator generates in the
16/// [operator documentation](<https://docs.stackable.tech/home/nightly/zookeeper/).>
17#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
18#[kube(group = "zookeeper.stackable.tech", version = "v1alpha1", kind = "ZookeeperCluster", plural = "zookeeperclusters")]
19#[kube(namespaced)]
20#[kube(status = "ZookeeperClusterStatus")]
21#[kube(schema = "disabled")]
22#[kube(derive="Default")]
23#[kube(derive="PartialEq")]
24pub struct ZookeeperClusterSpec {
25 /// Settings that affect all roles and role groups.
26 /// The settings in the `clusterConfig` are cluster wide settings that do not need to be configurable at role or role group level.
27 #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterConfig")]
28 pub cluster_config: Option<ZookeeperClusterClusterConfig>,
29 /// [Cluster operations](<https://docs.stackable.tech/home/nightly/concepts/operations/cluster_operations)>
30 /// properties, allow stopping the product instance as well as pausing reconciliation.
31 #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterOperation")]
32 pub cluster_operation: Option<ZookeeperClusterClusterOperation>,
33 /// Specify which image to use, the easiest way is to only configure the `productVersion`.
34 /// You can also configure a custom image registry to pull from, as well as completely custom
35 /// images.
36 ///
37 /// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)>
38 /// for details.
39 pub image: ZookeeperClusterImage,
40 /// A list of generic Kubernetes objects, which are merged into the objects that the operator
41 /// creates.
42 ///
43 /// List entries are arbitrary YAML objects, which need to be valid Kubernetes objects.
44 ///
45 /// Read the [Object overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#object-overrides)>
46 /// for more information.
47 #[serde(default, skip_serializing_if = "Option::is_none", rename = "objectOverrides")]
48 pub object_overrides: Option<Vec<BTreeMap<String, serde_json::Value>>>,
49 /// This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing
50 /// all the roleGroups that are part of this role. Additionally, there is a `config`, which is configurable
51 /// at the role *and* roleGroup level. Everything at roleGroup level is merged on top of what is configured
52 /// on role level. There is also a second form of config, which can only be configured
53 /// at role level, the `roleConfig`.
54 /// You can learn more about this in the
55 /// [Roles and role group concept documentation](<https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups).>
56 #[serde(default, skip_serializing_if = "Option::is_none")]
57 pub servers: Option<ZookeeperClusterServers>,
58}
59
60/// Settings that affect all roles and role groups.
61/// The settings in the `clusterConfig` are cluster wide settings that do not need to be configurable at role or role group level.
62#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
63pub struct ZookeeperClusterClusterConfig {
64 /// Authentication settings for ZooKeeper like mTLS authentication.
65 /// Read more in the [authentication usage guide](<https://docs.stackable.tech/home/nightly/zookeeper/usage_guide/authentication).>
66 #[serde(default, skip_serializing_if = "Option::is_none")]
67 pub authentication: Option<Vec<ZookeeperClusterClusterConfigAuthentication>>,
68 /// TLS encryption settings for ZooKeeper (server, quorum).
69 /// Read more in the [encryption usage guide](<https://docs.stackable.tech/home/nightly/zookeeper/usage_guide/encryption).>
70 #[serde(default, skip_serializing_if = "Option::is_none")]
71 pub tls: Option<ZookeeperClusterClusterConfigTls>,
72 /// Name of the Vector aggregator [discovery ConfigMap](<https://docs.stackable.tech/home/nightly/concepts/service_discovery).>
73 /// It must contain the key `ADDRESS` with the address of the Vector aggregator.
74 /// Follow the [logging tutorial](<https://docs.stackable.tech/home/nightly/tutorials/logging-vector-aggregator)>
75 /// to learn how to configure log aggregation with Vector.
76 #[serde(default, skip_serializing_if = "Option::is_none", rename = "vectorAggregatorConfigMapName")]
77 pub vector_aggregator_config_map_name: Option<String>,
78}
79
80#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
81pub struct ZookeeperClusterClusterConfigAuthentication {
82 /// The [AuthenticationClass](<https://docs.stackable.tech/home/stable/concepts/authentication)> to use.
83 ///
84 /// ## mTLS
85 ///
86 /// Only affects client connections. This setting controls:
87 /// - If clients need to authenticate themselves against the server via TLS
88 /// - Which ca.crt to use when validating the provided client certs
89 ///
90 /// This will override the server TLS settings (if set) in `spec.clusterConfig.tls.serverSecretClass`.
91 #[serde(rename = "authenticationClass")]
92 pub authentication_class: String,
93}
94
95/// TLS encryption settings for ZooKeeper (server, quorum).
96/// Read more in the [encryption usage guide](<https://docs.stackable.tech/home/nightly/zookeeper/usage_guide/encryption).>
97#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
98pub struct ZookeeperClusterClusterConfigTls {
99 /// The [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> to use for
100 /// internal quorum communication. Use mutual verification between Zookeeper Nodes
101 /// (mandatory). This setting controls:
102 /// - Which cert the servers should use to authenticate themselves against other servers
103 /// - Which ca.crt to use when validating the other server
104 ///
105 /// Defaults to `tls`
106 #[serde(default, skip_serializing_if = "Option::is_none", rename = "quorumSecretClass")]
107 pub quorum_secret_class: Option<String>,
108 /// The [SecretClass](<https://docs.stackable.tech/home/nightly/secret-operator/secretclass)> to use for
109 /// client connections. This setting controls:
110 /// - If TLS encryption is used at all
111 /// - Which cert the servers should use to authenticate themselves against the client
112 ///
113 /// Defaults to `tls`.
114 #[serde(default, skip_serializing_if = "Option::is_none", rename = "serverSecretClass")]
115 pub server_secret_class: Option<String>,
116}
117
118/// [Cluster operations](<https://docs.stackable.tech/home/nightly/concepts/operations/cluster_operations)>
119/// properties, allow stopping the product instance as well as pausing reconciliation.
120#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
121pub struct ZookeeperClusterClusterOperation {
122 /// Flag to stop cluster reconciliation by the operator. This means that all changes in the
123 /// custom resource spec are ignored until this flag is set to false or removed. The operator
124 /// will however still watch the deployed resources at the time and update the custom resource
125 /// status field.
126 /// If applied at the same time with `stopped`, `reconciliationPaused` will take precedence over
127 /// `stopped` and stop the reconciliation immediately.
128 #[serde(default, skip_serializing_if = "Option::is_none", rename = "reconciliationPaused")]
129 pub reconciliation_paused: Option<bool>,
130 /// Flag to stop the cluster. This means all deployed resources (e.g. Services, StatefulSets,
131 /// ConfigMaps) are kept but all deployed Pods (e.g. replicas from a StatefulSet) are scaled to 0
132 /// and therefore stopped and removed.
133 /// If applied at the same time with `reconciliationPaused`, the latter will pause reconciliation
134 /// and `stopped` will take no effect until `reconciliationPaused` is set to false or removed.
135 #[serde(default, skip_serializing_if = "Option::is_none")]
136 pub stopped: Option<bool>,
137}
138
139/// Specify which image to use, the easiest way is to only configure the `productVersion`.
140/// You can also configure a custom image registry to pull from, as well as completely custom
141/// images.
142///
143/// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)>
144/// for details.
145#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
146pub struct ZookeeperClusterImage {
147 /// Overwrite the docker image.
148 /// Specify the full docker image name, e.g. `oci.stackable.tech/sdp/superset:1.4.1-stackable2.1.0`
149 #[serde(default, skip_serializing_if = "Option::is_none")]
150 pub custom: Option<String>,
151 /// Version of the product, e.g. `1.4.1`.
152 #[serde(default, skip_serializing_if = "Option::is_none", rename = "productVersion")]
153 pub product_version: Option<String>,
154 /// [Pull policy](<https://kubernetes.io/docs/concepts/containers/images/#image-pull-policy)> used when pulling the image.
155 #[serde(default, skip_serializing_if = "Option::is_none", rename = "pullPolicy")]
156 pub pull_policy: Option<ZookeeperClusterImagePullPolicy>,
157 /// [Image pull secrets](<https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod)> to pull images from a private registry.
158 #[serde(default, skip_serializing_if = "Option::is_none", rename = "pullSecrets")]
159 pub pull_secrets: Option<Vec<ZookeeperClusterImagePullSecrets>>,
160 /// Name of the docker repo, e.g. `oci.stackable.tech/sdp`
161 #[serde(default, skip_serializing_if = "Option::is_none")]
162 pub repo: Option<String>,
163 /// Stackable version of the product, e.g. `23.4`, `23.4.1` or `0.0.0-dev`.
164 /// If not specified, the operator will use its own version, e.g. `23.4.1`.
165 /// When using a nightly operator or a pr version, it will use the nightly `0.0.0-dev` image.
166 #[serde(default, skip_serializing_if = "Option::is_none", rename = "stackableVersion")]
167 pub stackable_version: Option<String>,
168}
169
170/// Specify which image to use, the easiest way is to only configure the `productVersion`.
171/// You can also configure a custom image registry to pull from, as well as completely custom
172/// images.
173///
174/// Consult the [Product image selection documentation](<https://docs.stackable.tech/home/nightly/concepts/product_image_selection)>
175/// for details.
176#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
177pub enum ZookeeperClusterImagePullPolicy {
178 IfNotPresent,
179 Always,
180 Never,
181}
182
183/// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
184#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
185pub struct ZookeeperClusterImagePullSecrets {
186 /// 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>
187 pub name: String,
188}
189
190/// This struct represents a role - e.g. HDFS datanodes or Trino workers. It has a key-value-map containing
191/// all the roleGroups that are part of this role. Additionally, there is a `config`, which is configurable
192/// at the role *and* roleGroup level. Everything at roleGroup level is merged on top of what is configured
193/// on role level. There is also a second form of config, which can only be configured
194/// at role level, the `roleConfig`.
195/// You can learn more about this in the
196/// [Roles and role group concept documentation](<https://docs.stackable.tech/home/nightly/concepts/roles-and-role-groups).>
197#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
198pub struct ZookeeperClusterServers {
199 #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
200 pub cli_overrides: Option<BTreeMap<String, String>>,
201 #[serde(default, skip_serializing_if = "Option::is_none")]
202 pub config: Option<ZookeeperClusterServersConfig>,
203 /// The `configOverrides` can be used to configure properties in product config files
204 /// that are not exposed in the CRD. Read the
205 /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
206 /// and consult the operator specific usage guide documentation for details on the
207 /// available config files and settings for the specific product.
208 #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
209 pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
210 /// `envOverrides` configure environment variables to be set in the Pods.
211 /// It is a map from strings to strings - environment variables and the value to set.
212 /// Read the
213 /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
214 /// for more information and consult the operator specific usage guide to find out about
215 /// the product specific environment variables that are available.
216 #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
217 pub env_overrides: Option<BTreeMap<String, String>>,
218 /// Allows overriding JVM arguments.
219 /// Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)>
220 /// for details on the usage.
221 #[serde(default, skip_serializing_if = "Option::is_none", rename = "jvmArgumentOverrides")]
222 pub jvm_argument_overrides: Option<ZookeeperClusterServersJvmArgumentOverrides>,
223 /// In the `podOverrides` property you can define a
224 /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
225 /// to override any property that can be set on a Kubernetes Pod.
226 /// Read the
227 /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
228 /// for more information.
229 #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
230 pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
231 /// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
232 #[serde(default, skip_serializing_if = "Option::is_none", rename = "roleConfig")]
233 pub role_config: Option<ZookeeperClusterServersRoleConfig>,
234 #[serde(rename = "roleGroups")]
235 pub role_groups: BTreeMap<String, ZookeeperClusterServersRoleGroups>,
236}
237
238#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
239pub struct ZookeeperClusterServersConfig {
240 /// These configuration settings control
241 /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
242 #[serde(default, skip_serializing_if = "Option::is_none")]
243 pub affinity: Option<ZookeeperClusterServersConfigAffinity>,
244 /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
245 #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
246 pub graceful_shutdown_timeout: Option<String>,
247 #[serde(default, skip_serializing_if = "Option::is_none", rename = "initLimit")]
248 pub init_limit: Option<u32>,
249 /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
250 #[serde(default, skip_serializing_if = "Option::is_none")]
251 pub logging: Option<ZookeeperClusterServersConfigLogging>,
252 #[serde(default, skip_serializing_if = "Option::is_none", rename = "myidOffset")]
253 pub myid_offset: Option<u16>,
254 /// Request secret (currently only autoTls certificates) lifetime from the secret operator, e.g. `7d`, or `30d`.
255 /// This can be shortened by the `maxCertificateLifetime` setting on the SecretClass issuing the TLS certificate.
256 #[serde(default, skip_serializing_if = "Option::is_none", rename = "requestedSecretLifetime")]
257 pub requested_secret_lifetime: Option<String>,
258 /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
259 /// usage, if this role needs any.
260 #[serde(default, skip_serializing_if = "Option::is_none")]
261 pub resources: Option<ZookeeperClusterServersConfigResources>,
262 #[serde(default, skip_serializing_if = "Option::is_none", rename = "syncLimit")]
263 pub sync_limit: Option<u32>,
264 #[serde(default, skip_serializing_if = "Option::is_none", rename = "tickTime")]
265 pub tick_time: Option<u32>,
266}
267
268/// These configuration settings control
269/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
270#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
271pub struct ZookeeperClusterServersConfigAffinity {
272 /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
273 #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
274 pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
275 /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
276 #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
277 pub node_selector: Option<BTreeMap<String, String>>,
278 /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
279 #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
280 pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
281 /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
282 #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
283 pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
284}
285
286/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
287#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
288pub struct ZookeeperClusterServersConfigLogging {
289 /// Log configuration per container.
290 #[serde(default, skip_serializing_if = "Option::is_none")]
291 pub containers: Option<BTreeMap<String, ZookeeperClusterServersConfigLoggingContainers>>,
292 /// Wether or not to deploy a container with the Vector log agent.
293 #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
294 pub enable_vector_agent: Option<bool>,
295}
296
297/// Log configuration per container.
298#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
299pub struct ZookeeperClusterServersConfigLoggingContainers {
300 /// Configuration for the console appender
301 #[serde(default, skip_serializing_if = "Option::is_none")]
302 pub console: Option<ZookeeperClusterServersConfigLoggingContainersConsole>,
303 /// Log configuration provided in a ConfigMap
304 #[serde(default, skip_serializing_if = "Option::is_none")]
305 pub custom: Option<ZookeeperClusterServersConfigLoggingContainersCustom>,
306 /// Configuration for the file appender
307 #[serde(default, skip_serializing_if = "Option::is_none")]
308 pub file: Option<ZookeeperClusterServersConfigLoggingContainersFile>,
309 /// Configuration per logger
310 #[serde(default, skip_serializing_if = "Option::is_none")]
311 pub loggers: Option<BTreeMap<String, ZookeeperClusterServersConfigLoggingContainersLoggers>>,
312}
313
314/// Configuration for the console appender
315#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
316pub struct ZookeeperClusterServersConfigLoggingContainersConsole {
317 /// The log level threshold.
318 /// Log events with a lower log level are discarded.
319 #[serde(default, skip_serializing_if = "Option::is_none")]
320 pub level: Option<ZookeeperClusterServersConfigLoggingContainersConsoleLevel>,
321}
322
323/// Configuration for the console appender
324#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
325pub enum ZookeeperClusterServersConfigLoggingContainersConsoleLevel {
326 #[serde(rename = "TRACE")]
327 Trace,
328 #[serde(rename = "DEBUG")]
329 Debug,
330 #[serde(rename = "INFO")]
331 Info,
332 #[serde(rename = "WARN")]
333 Warn,
334 #[serde(rename = "ERROR")]
335 Error,
336 #[serde(rename = "FATAL")]
337 Fatal,
338 #[serde(rename = "NONE")]
339 None,
340}
341
342/// Log configuration provided in a ConfigMap
343#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
344pub struct ZookeeperClusterServersConfigLoggingContainersCustom {
345 /// ConfigMap containing the log configuration files
346 #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
347 pub config_map: Option<String>,
348}
349
350/// Configuration for the file appender
351#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
352pub struct ZookeeperClusterServersConfigLoggingContainersFile {
353 /// The log level threshold.
354 /// Log events with a lower log level are discarded.
355 #[serde(default, skip_serializing_if = "Option::is_none")]
356 pub level: Option<ZookeeperClusterServersConfigLoggingContainersFileLevel>,
357}
358
359/// Configuration for the file appender
360#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
361pub enum ZookeeperClusterServersConfigLoggingContainersFileLevel {
362 #[serde(rename = "TRACE")]
363 Trace,
364 #[serde(rename = "DEBUG")]
365 Debug,
366 #[serde(rename = "INFO")]
367 Info,
368 #[serde(rename = "WARN")]
369 Warn,
370 #[serde(rename = "ERROR")]
371 Error,
372 #[serde(rename = "FATAL")]
373 Fatal,
374 #[serde(rename = "NONE")]
375 None,
376}
377
378/// Configuration per logger
379#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
380pub struct ZookeeperClusterServersConfigLoggingContainersLoggers {
381 /// The log level threshold.
382 /// Log events with a lower log level are discarded.
383 #[serde(default, skip_serializing_if = "Option::is_none")]
384 pub level: Option<ZookeeperClusterServersConfigLoggingContainersLoggersLevel>,
385}
386
387/// Configuration per logger
388#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
389pub enum ZookeeperClusterServersConfigLoggingContainersLoggersLevel {
390 #[serde(rename = "TRACE")]
391 Trace,
392 #[serde(rename = "DEBUG")]
393 Debug,
394 #[serde(rename = "INFO")]
395 Info,
396 #[serde(rename = "WARN")]
397 Warn,
398 #[serde(rename = "ERROR")]
399 Error,
400 #[serde(rename = "FATAL")]
401 Fatal,
402 #[serde(rename = "NONE")]
403 None,
404}
405
406/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
407/// usage, if this role needs any.
408#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
409pub struct ZookeeperClusterServersConfigResources {
410 #[serde(default, skip_serializing_if = "Option::is_none")]
411 pub cpu: Option<ZookeeperClusterServersConfigResourcesCpu>,
412 #[serde(default, skip_serializing_if = "Option::is_none")]
413 pub memory: Option<ZookeeperClusterServersConfigResourcesMemory>,
414 #[serde(default, skip_serializing_if = "Option::is_none")]
415 pub storage: Option<ZookeeperClusterServersConfigResourcesStorage>,
416}
417
418#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
419pub struct ZookeeperClusterServersConfigResourcesCpu {
420 /// The maximum amount of CPU cores that can be requested by Pods.
421 /// Equivalent to the `limit` for Pod resource configuration.
422 /// Cores are specified either as a decimal point number or as milli units.
423 /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
424 #[serde(default, skip_serializing_if = "Option::is_none")]
425 pub max: Option<String>,
426 /// The minimal amount of CPU cores that Pods need to run.
427 /// Equivalent to the `request` for Pod resource configuration.
428 /// Cores are specified either as a decimal point number or as milli units.
429 /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
430 #[serde(default, skip_serializing_if = "Option::is_none")]
431 pub min: Option<String>,
432}
433
434#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
435pub struct ZookeeperClusterServersConfigResourcesMemory {
436 /// The maximum amount of memory that should be available to the Pod.
437 /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
438 /// which means these suffixes are supported: E, P, T, G, M, k.
439 /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
440 /// For example, the following represent roughly the same value:
441 /// `128974848, 129e6, 129M, 128974848000m, 123Mi`
442 #[serde(default, skip_serializing_if = "Option::is_none")]
443 pub limit: Option<String>,
444 /// Additional options that can be specified.
445 #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
446 pub runtime_limits: Option<ZookeeperClusterServersConfigResourcesMemoryRuntimeLimits>,
447}
448
449/// Additional options that can be specified.
450#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
451pub struct ZookeeperClusterServersConfigResourcesMemoryRuntimeLimits {
452}
453
454#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
455pub struct ZookeeperClusterServersConfigResourcesStorage {
456 #[serde(default, skip_serializing_if = "Option::is_none")]
457 pub data: Option<ZookeeperClusterServersConfigResourcesStorageData>,
458}
459
460#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
461pub struct ZookeeperClusterServersConfigResourcesStorageData {
462 /// Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.
463 ///
464 /// The serialization format is:
465 ///
466 /// ``` <quantity> ::= <signedNumber><suffix>
467 ///
468 /// (Note that <suffix> may be empty, from the "" case in <decimalSI>.)
469 ///
470 /// <digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
471 ///
472 /// (International System of units; See: <http://physics.nist.gov/cuu/Units/binary.html)>
473 ///
474 /// <decimalSI> ::= m | "" | k | M | G | T | P | E
475 ///
476 /// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
477 ///
478 /// <decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber> ```
479 ///
480 /// No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.
481 ///
482 /// When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.
483 ///
484 /// Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
485 ///
486 /// - No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.
487 ///
488 /// The sign will be omitted unless the number is negative.
489 ///
490 /// Examples:
491 ///
492 /// - 1.5 will be serialized as "1500m" - 1.5Gi will be serialized as "1536Mi"
493 ///
494 /// Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.
495 ///
496 /// Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)
497 ///
498 /// This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
499 #[serde(default, skip_serializing_if = "Option::is_none")]
500 pub capacity: Option<String>,
501 /// A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
502 #[serde(default, skip_serializing_if = "Option::is_none")]
503 pub selectors: Option<ZookeeperClusterServersConfigResourcesStorageDataSelectors>,
504 #[serde(default, skip_serializing_if = "Option::is_none", rename = "storageClass")]
505 pub storage_class: Option<String>,
506}
507
508/// A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
509#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
510pub struct ZookeeperClusterServersConfigResourcesStorageDataSelectors {
511 /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
512 #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
513 pub match_expressions: Option<Vec<ZookeeperClusterServersConfigResourcesStorageDataSelectorsMatchExpressions>>,
514 /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
515 #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
516 pub match_labels: Option<BTreeMap<String, String>>,
517}
518
519/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
520#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
521pub struct ZookeeperClusterServersConfigResourcesStorageDataSelectorsMatchExpressions {
522 /// key is the label key that the selector applies to.
523 pub key: String,
524 /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
525 pub operator: String,
526 /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
527 #[serde(default, skip_serializing_if = "Option::is_none")]
528 pub values: Option<Vec<String>>,
529}
530
531/// Allows overriding JVM arguments.
532/// Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)>
533/// for details on the usage.
534#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
535pub struct ZookeeperClusterServersJvmArgumentOverrides {
536 /// JVM arguments to be added
537 #[serde(default, skip_serializing_if = "Option::is_none")]
538 pub add: Option<Vec<String>>,
539 /// JVM arguments to be removed by exact match
540 #[serde(default, skip_serializing_if = "Option::is_none")]
541 pub remove: Option<Vec<String>>,
542 /// JVM arguments matching any of this regexes will be removed
543 #[serde(default, skip_serializing_if = "Option::is_none", rename = "removeRegex")]
544 pub remove_regex: Option<Vec<String>>,
545}
546
547/// This is a product-agnostic RoleConfig, which is sufficient for most of the products.
548#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
549pub struct ZookeeperClusterServersRoleConfig {
550 /// This field controls which [ListenerClass](<https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html)> is used to expose the ZooKeeper servers.
551 #[serde(default, skip_serializing_if = "Option::is_none", rename = "listenerClass")]
552 pub listener_class: Option<String>,
553 /// This struct is used to configure:
554 ///
555 /// 1. If PodDisruptionBudgets are created by the operator
556 /// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
557 ///
558 /// Learn more in the
559 /// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
560 #[serde(default, skip_serializing_if = "Option::is_none", rename = "podDisruptionBudget")]
561 pub pod_disruption_budget: Option<ZookeeperClusterServersRoleConfigPodDisruptionBudget>,
562}
563
564/// This struct is used to configure:
565///
566/// 1. If PodDisruptionBudgets are created by the operator
567/// 2. The allowed number of Pods to be unavailable (`maxUnavailable`)
568///
569/// Learn more in the
570/// [allowed Pod disruptions documentation](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_disruptions).>
571#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
572pub struct ZookeeperClusterServersRoleConfigPodDisruptionBudget {
573 /// Whether a PodDisruptionBudget should be written out for this role.
574 /// Disabling this enables you to specify your own - custom - one.
575 /// Defaults to true.
576 #[serde(default, skip_serializing_if = "Option::is_none")]
577 pub enabled: Option<bool>,
578 /// The number of Pods that are allowed to be down because of voluntary disruptions.
579 /// If you don't explicitly set this, the operator will use a sane default based
580 /// upon knowledge about the individual product.
581 #[serde(default, skip_serializing_if = "Option::is_none", rename = "maxUnavailable")]
582 pub max_unavailable: Option<u16>,
583}
584
585#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
586pub struct ZookeeperClusterServersRoleGroups {
587 #[serde(default, skip_serializing_if = "Option::is_none", rename = "cliOverrides")]
588 pub cli_overrides: Option<BTreeMap<String, String>>,
589 #[serde(default, skip_serializing_if = "Option::is_none")]
590 pub config: Option<ZookeeperClusterServersRoleGroupsConfig>,
591 /// The `configOverrides` can be used to configure properties in product config files
592 /// that are not exposed in the CRD. Read the
593 /// [config overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#config-overrides)>
594 /// and consult the operator specific usage guide documentation for details on the
595 /// available config files and settings for the specific product.
596 #[serde(default, skip_serializing_if = "Option::is_none", rename = "configOverrides")]
597 pub config_overrides: Option<BTreeMap<String, BTreeMap<String, String>>>,
598 /// `envOverrides` configure environment variables to be set in the Pods.
599 /// It is a map from strings to strings - environment variables and the value to set.
600 /// Read the
601 /// [environment variable overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#env-overrides)>
602 /// for more information and consult the operator specific usage guide to find out about
603 /// the product specific environment variables that are available.
604 #[serde(default, skip_serializing_if = "Option::is_none", rename = "envOverrides")]
605 pub env_overrides: Option<BTreeMap<String, String>>,
606 /// Allows overriding JVM arguments.
607 /// Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)>
608 /// for details on the usage.
609 #[serde(default, skip_serializing_if = "Option::is_none", rename = "jvmArgumentOverrides")]
610 pub jvm_argument_overrides: Option<ZookeeperClusterServersRoleGroupsJvmArgumentOverrides>,
611 /// In the `podOverrides` property you can define a
612 /// [PodTemplateSpec](<https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.27/#podtemplatespec-v1-core)>
613 /// to override any property that can be set on a Kubernetes Pod.
614 /// Read the
615 /// [Pod overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#pod-overrides)>
616 /// for more information.
617 #[serde(default, skip_serializing_if = "Option::is_none", rename = "podOverrides")]
618 pub pod_overrides: Option<BTreeMap<String, serde_json::Value>>,
619 #[serde(default, skip_serializing_if = "Option::is_none")]
620 pub replicas: Option<u16>,
621}
622
623#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
624pub struct ZookeeperClusterServersRoleGroupsConfig {
625 /// These configuration settings control
626 /// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
627 #[serde(default, skip_serializing_if = "Option::is_none")]
628 pub affinity: Option<ZookeeperClusterServersRoleGroupsConfigAffinity>,
629 /// Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
630 #[serde(default, skip_serializing_if = "Option::is_none", rename = "gracefulShutdownTimeout")]
631 pub graceful_shutdown_timeout: Option<String>,
632 #[serde(default, skip_serializing_if = "Option::is_none", rename = "initLimit")]
633 pub init_limit: Option<u32>,
634 /// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
635 #[serde(default, skip_serializing_if = "Option::is_none")]
636 pub logging: Option<ZookeeperClusterServersRoleGroupsConfigLogging>,
637 #[serde(default, skip_serializing_if = "Option::is_none", rename = "myidOffset")]
638 pub myid_offset: Option<u16>,
639 /// Request secret (currently only autoTls certificates) lifetime from the secret operator, e.g. `7d`, or `30d`.
640 /// This can be shortened by the `maxCertificateLifetime` setting on the SecretClass issuing the TLS certificate.
641 #[serde(default, skip_serializing_if = "Option::is_none", rename = "requestedSecretLifetime")]
642 pub requested_secret_lifetime: Option<String>,
643 /// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
644 /// usage, if this role needs any.
645 #[serde(default, skip_serializing_if = "Option::is_none")]
646 pub resources: Option<ZookeeperClusterServersRoleGroupsConfigResources>,
647 #[serde(default, skip_serializing_if = "Option::is_none", rename = "syncLimit")]
648 pub sync_limit: Option<u32>,
649 #[serde(default, skip_serializing_if = "Option::is_none", rename = "tickTime")]
650 pub tick_time: Option<u32>,
651}
652
653/// These configuration settings control
654/// [Pod placement](<https://docs.stackable.tech/home/nightly/concepts/operations/pod_placement).>
655#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
656pub struct ZookeeperClusterServersRoleGroupsConfigAffinity {
657 /// Same as the `spec.affinity.nodeAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
658 #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
659 pub node_affinity: Option<BTreeMap<String, serde_json::Value>>,
660 /// Simple key-value pairs forming a nodeSelector, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
661 #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
662 pub node_selector: Option<BTreeMap<String, String>>,
663 /// Same as the `spec.affinity.podAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
664 #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
665 pub pod_affinity: Option<BTreeMap<String, serde_json::Value>>,
666 /// Same as the `spec.affinity.podAntiAffinity` field on the Pod, see the [Kubernetes docs](<https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node)>
667 #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
668 pub pod_anti_affinity: Option<BTreeMap<String, serde_json::Value>>,
669}
670
671/// Logging configuration, learn more in the [logging concept documentation](<https://docs.stackable.tech/home/nightly/concepts/logging).>
672#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
673pub struct ZookeeperClusterServersRoleGroupsConfigLogging {
674 /// Log configuration per container.
675 #[serde(default, skip_serializing_if = "Option::is_none")]
676 pub containers: Option<BTreeMap<String, ZookeeperClusterServersRoleGroupsConfigLoggingContainers>>,
677 /// Wether or not to deploy a container with the Vector log agent.
678 #[serde(default, skip_serializing_if = "Option::is_none", rename = "enableVectorAgent")]
679 pub enable_vector_agent: Option<bool>,
680}
681
682/// Log configuration per container.
683#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
684pub struct ZookeeperClusterServersRoleGroupsConfigLoggingContainers {
685 /// Configuration for the console appender
686 #[serde(default, skip_serializing_if = "Option::is_none")]
687 pub console: Option<ZookeeperClusterServersRoleGroupsConfigLoggingContainersConsole>,
688 /// Log configuration provided in a ConfigMap
689 #[serde(default, skip_serializing_if = "Option::is_none")]
690 pub custom: Option<ZookeeperClusterServersRoleGroupsConfigLoggingContainersCustom>,
691 /// Configuration for the file appender
692 #[serde(default, skip_serializing_if = "Option::is_none")]
693 pub file: Option<ZookeeperClusterServersRoleGroupsConfigLoggingContainersFile>,
694 /// Configuration per logger
695 #[serde(default, skip_serializing_if = "Option::is_none")]
696 pub loggers: Option<BTreeMap<String, ZookeeperClusterServersRoleGroupsConfigLoggingContainersLoggers>>,
697}
698
699/// Configuration for the console appender
700#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
701pub struct ZookeeperClusterServersRoleGroupsConfigLoggingContainersConsole {
702 /// The log level threshold.
703 /// Log events with a lower log level are discarded.
704 #[serde(default, skip_serializing_if = "Option::is_none")]
705 pub level: Option<ZookeeperClusterServersRoleGroupsConfigLoggingContainersConsoleLevel>,
706}
707
708/// Configuration for the console appender
709#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
710pub enum ZookeeperClusterServersRoleGroupsConfigLoggingContainersConsoleLevel {
711 #[serde(rename = "TRACE")]
712 Trace,
713 #[serde(rename = "DEBUG")]
714 Debug,
715 #[serde(rename = "INFO")]
716 Info,
717 #[serde(rename = "WARN")]
718 Warn,
719 #[serde(rename = "ERROR")]
720 Error,
721 #[serde(rename = "FATAL")]
722 Fatal,
723 #[serde(rename = "NONE")]
724 None,
725}
726
727/// Log configuration provided in a ConfigMap
728#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
729pub struct ZookeeperClusterServersRoleGroupsConfigLoggingContainersCustom {
730 /// ConfigMap containing the log configuration files
731 #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
732 pub config_map: Option<String>,
733}
734
735/// Configuration for the file appender
736#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
737pub struct ZookeeperClusterServersRoleGroupsConfigLoggingContainersFile {
738 /// The log level threshold.
739 /// Log events with a lower log level are discarded.
740 #[serde(default, skip_serializing_if = "Option::is_none")]
741 pub level: Option<ZookeeperClusterServersRoleGroupsConfigLoggingContainersFileLevel>,
742}
743
744/// Configuration for the file appender
745#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
746pub enum ZookeeperClusterServersRoleGroupsConfigLoggingContainersFileLevel {
747 #[serde(rename = "TRACE")]
748 Trace,
749 #[serde(rename = "DEBUG")]
750 Debug,
751 #[serde(rename = "INFO")]
752 Info,
753 #[serde(rename = "WARN")]
754 Warn,
755 #[serde(rename = "ERROR")]
756 Error,
757 #[serde(rename = "FATAL")]
758 Fatal,
759 #[serde(rename = "NONE")]
760 None,
761}
762
763/// Configuration per logger
764#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
765pub struct ZookeeperClusterServersRoleGroupsConfigLoggingContainersLoggers {
766 /// The log level threshold.
767 /// Log events with a lower log level are discarded.
768 #[serde(default, skip_serializing_if = "Option::is_none")]
769 pub level: Option<ZookeeperClusterServersRoleGroupsConfigLoggingContainersLoggersLevel>,
770}
771
772/// Configuration per logger
773#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
774pub enum ZookeeperClusterServersRoleGroupsConfigLoggingContainersLoggersLevel {
775 #[serde(rename = "TRACE")]
776 Trace,
777 #[serde(rename = "DEBUG")]
778 Debug,
779 #[serde(rename = "INFO")]
780 Info,
781 #[serde(rename = "WARN")]
782 Warn,
783 #[serde(rename = "ERROR")]
784 Error,
785 #[serde(rename = "FATAL")]
786 Fatal,
787 #[serde(rename = "NONE")]
788 None,
789}
790
791/// Resource usage is configured here, this includes CPU usage, memory usage and disk storage
792/// usage, if this role needs any.
793#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
794pub struct ZookeeperClusterServersRoleGroupsConfigResources {
795 #[serde(default, skip_serializing_if = "Option::is_none")]
796 pub cpu: Option<ZookeeperClusterServersRoleGroupsConfigResourcesCpu>,
797 #[serde(default, skip_serializing_if = "Option::is_none")]
798 pub memory: Option<ZookeeperClusterServersRoleGroupsConfigResourcesMemory>,
799 #[serde(default, skip_serializing_if = "Option::is_none")]
800 pub storage: Option<ZookeeperClusterServersRoleGroupsConfigResourcesStorage>,
801}
802
803#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
804pub struct ZookeeperClusterServersRoleGroupsConfigResourcesCpu {
805 /// The maximum amount of CPU cores that can be requested by Pods.
806 /// Equivalent to the `limit` for Pod resource configuration.
807 /// Cores are specified either as a decimal point number or as milli units.
808 /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
809 #[serde(default, skip_serializing_if = "Option::is_none")]
810 pub max: Option<String>,
811 /// The minimal amount of CPU cores that Pods need to run.
812 /// Equivalent to the `request` for Pod resource configuration.
813 /// Cores are specified either as a decimal point number or as milli units.
814 /// For example:`1.5` will be 1.5 cores, also written as `1500m`.
815 #[serde(default, skip_serializing_if = "Option::is_none")]
816 pub min: Option<String>,
817}
818
819#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
820pub struct ZookeeperClusterServersRoleGroupsConfigResourcesMemory {
821 /// The maximum amount of memory that should be available to the Pod.
822 /// Specified as a byte [Quantity](<https://kubernetes.io/docs/reference/kubernetes-api/common-definitions/quantity/),>
823 /// which means these suffixes are supported: E, P, T, G, M, k.
824 /// You can also use the power-of-two equivalents: Ei, Pi, Ti, Gi, Mi, Ki.
825 /// For example, the following represent roughly the same value:
826 /// `128974848, 129e6, 129M, 128974848000m, 123Mi`
827 #[serde(default, skip_serializing_if = "Option::is_none")]
828 pub limit: Option<String>,
829 /// Additional options that can be specified.
830 #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeLimits")]
831 pub runtime_limits: Option<ZookeeperClusterServersRoleGroupsConfigResourcesMemoryRuntimeLimits>,
832}
833
834/// Additional options that can be specified.
835#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
836pub struct ZookeeperClusterServersRoleGroupsConfigResourcesMemoryRuntimeLimits {
837}
838
839#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
840pub struct ZookeeperClusterServersRoleGroupsConfigResourcesStorage {
841 #[serde(default, skip_serializing_if = "Option::is_none")]
842 pub data: Option<ZookeeperClusterServersRoleGroupsConfigResourcesStorageData>,
843}
844
845#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
846pub struct ZookeeperClusterServersRoleGroupsConfigResourcesStorageData {
847 /// Quantity is a fixed-point representation of a number. It provides convenient marshaling/unmarshaling in JSON and YAML, in addition to String() and AsInt64() accessors.
848 ///
849 /// The serialization format is:
850 ///
851 /// ``` <quantity> ::= <signedNumber><suffix>
852 ///
853 /// (Note that <suffix> may be empty, from the "" case in <decimalSI>.)
854 ///
855 /// <digit> ::= 0 | 1 | ... | 9 <digits> ::= <digit> | <digit><digits> <number> ::= <digits> | <digits>.<digits> | <digits>. | .<digits> <sign> ::= "+" | "-" <signedNumber> ::= <number> | <sign><number> <suffix> ::= <binarySI> | <decimalExponent> | <decimalSI> <binarySI> ::= Ki | Mi | Gi | Ti | Pi | Ei
856 ///
857 /// (International System of units; See: <http://physics.nist.gov/cuu/Units/binary.html)>
858 ///
859 /// <decimalSI> ::= m | "" | k | M | G | T | P | E
860 ///
861 /// (Note that 1024 = 1Ki but 1000 = 1k; I didn't choose the capitalization.)
862 ///
863 /// <decimalExponent> ::= "e" <signedNumber> | "E" <signedNumber> ```
864 ///
865 /// No matter which of the three exponent forms is used, no quantity may represent a number greater than 2^63-1 in magnitude, nor may it have more than 3 decimal places. Numbers larger or more precise will be capped or rounded up. (E.g.: 0.1m will rounded up to 1m.) This may be extended in the future if we require larger or smaller quantities.
866 ///
867 /// When a Quantity is parsed from a string, it will remember the type of suffix it had, and will use the same type again when it is serialized.
868 ///
869 /// Before serializing, Quantity will be put in "canonical form". This means that Exponent/suffix will be adjusted up or down (with a corresponding increase or decrease in Mantissa) such that:
870 ///
871 /// - No precision is lost - No fractional digits will be emitted - The exponent (or suffix) is as large as possible.
872 ///
873 /// The sign will be omitted unless the number is negative.
874 ///
875 /// Examples:
876 ///
877 /// - 1.5 will be serialized as "1500m" - 1.5Gi will be serialized as "1536Mi"
878 ///
879 /// Note that the quantity will NEVER be internally represented by a floating point number. That is the whole point of this exercise.
880 ///
881 /// Non-canonical values will still parse as long as they are well formed, but will be re-emitted in their canonical form. (So always use canonical form, or don't diff.)
882 ///
883 /// This format is intended to make it difficult to use these numbers without writing some sort of special handling code in the hopes that that will cause implementors to also use a fixed point implementation.
884 #[serde(default, skip_serializing_if = "Option::is_none")]
885 pub capacity: Option<String>,
886 /// A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
887 #[serde(default, skip_serializing_if = "Option::is_none")]
888 pub selectors: Option<ZookeeperClusterServersRoleGroupsConfigResourcesStorageDataSelectors>,
889 #[serde(default, skip_serializing_if = "Option::is_none", rename = "storageClass")]
890 pub storage_class: Option<String>,
891}
892
893/// A label selector is a label query over a set of resources. The result of matchLabels and matchExpressions are ANDed. An empty label selector matches all objects. A null label selector matches no objects.
894#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
895pub struct ZookeeperClusterServersRoleGroupsConfigResourcesStorageDataSelectors {
896 /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
897 #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
898 pub match_expressions: Option<Vec<ZookeeperClusterServersRoleGroupsConfigResourcesStorageDataSelectorsMatchExpressions>>,
899 /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
900 #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
901 pub match_labels: Option<BTreeMap<String, String>>,
902}
903
904/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
905#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
906pub struct ZookeeperClusterServersRoleGroupsConfigResourcesStorageDataSelectorsMatchExpressions {
907 /// key is the label key that the selector applies to.
908 pub key: String,
909 /// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
910 pub operator: String,
911 /// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
912 #[serde(default, skip_serializing_if = "Option::is_none")]
913 pub values: Option<Vec<String>>,
914}
915
916/// Allows overriding JVM arguments.
917/// Please read on the [JVM argument overrides documentation](<https://docs.stackable.tech/home/nightly/concepts/overrides#jvm-argument-overrides)>
918/// for details on the usage.
919#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
920pub struct ZookeeperClusterServersRoleGroupsJvmArgumentOverrides {
921 /// JVM arguments to be added
922 #[serde(default, skip_serializing_if = "Option::is_none")]
923 pub add: Option<Vec<String>>,
924 /// JVM arguments to be removed by exact match
925 #[serde(default, skip_serializing_if = "Option::is_none")]
926 pub remove: Option<Vec<String>>,
927 /// JVM arguments matching any of this regexes will be removed
928 #[serde(default, skip_serializing_if = "Option::is_none", rename = "removeRegex")]
929 pub remove_regex: Option<Vec<String>>,
930}
931
932#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
933pub struct ZookeeperClusterStatus {
934 #[serde(default, skip_serializing_if = "Option::is_none")]
935 pub conditions: Option<Vec<Condition>>,
936 /// An opaque value that changes every time a discovery detail does
937 #[serde(default, skip_serializing_if = "Option::is_none", rename = "discoveryHash")]
938 pub discovery_hash: Option<String>,
939}
940