kcr_pkg_crossplane_io/v1alpha1/
controllerconfigs.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/crossplane/crossplane/pkg.crossplane.io/v1alpha1/controllerconfigs.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::util::intstr::IntOrString;
11}
12use self::prelude::*;
13
14/// ControllerConfigSpec specifies the configuration for a packaged controller.
15/// Values provided will override package manager defaults. Labels and
16/// annotations are passed to both the controller Deployment and ServiceAccount.
17#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
18#[kube(group = "pkg.crossplane.io", version = "v1alpha1", kind = "ControllerConfig", plural = "controllerconfigs")]
19#[kube(schema = "disabled")]
20#[kube(derive="Default")]
21#[kube(derive="PartialEq")]
22pub struct ControllerConfigSpec {
23    /// If specified, the pod's scheduling constraints
24    #[serde(default, skip_serializing_if = "Option::is_none")]
25    pub affinity: Option<ControllerConfigAffinity>,
26    /// Arguments to the entrypoint.
27    /// The docker image's CMD is used if this is not provided.
28    /// Variable references $(VAR_NAME) are expanded using the container's environment. If a variable
29    /// cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax
30    /// can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded,
31    /// regardless of whether the variable exists or not.
32    /// Cannot be updated.
33    /// More info: <https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell>
34    #[serde(default, skip_serializing_if = "Option::is_none")]
35    pub args: Option<Vec<String>>,
36    /// List of environment variables to set in the container.
37    /// Cannot be updated.
38    #[serde(default, skip_serializing_if = "Option::is_none")]
39    pub env: Option<Vec<ControllerConfigEnv>>,
40    /// List of sources to populate environment variables in the container.
41    /// The keys defined within a source must be a C_IDENTIFIER. All invalid keys
42    /// will be reported as an event when the container is starting. When a key exists in multiple
43    /// sources, the value associated with the last source will take precedence.
44    /// Values defined by an Env with a duplicate key will take precedence.
45    /// Cannot be updated.
46    #[serde(default, skip_serializing_if = "Option::is_none", rename = "envFrom")]
47    pub env_from: Option<Vec<ControllerConfigEnvFrom>>,
48    /// Docker image name.
49    /// More info: <https://kubernetes.io/docs/concepts/containers/images>
50    /// This field is optional to allow higher level config management to default or override
51    /// container images in workload controllers like Deployments and StatefulSets.
52    #[serde(default, skip_serializing_if = "Option::is_none")]
53    pub image: Option<String>,
54    /// Image pull policy.
55    /// One of Always, Never, IfNotPresent.
56    /// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
57    /// Cannot be updated.
58    /// More info: <https://kubernetes.io/docs/concepts/containers/images#updating-images>
59    #[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullPolicy")]
60    pub image_pull_policy: Option<String>,
61    /// ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec.
62    /// If specified, these secrets will be passed to individual puller implementations for them to use. For example,
63    /// in the case of docker, only DockerConfig type secrets are honored.
64    /// More info: <https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod>
65    /// Setting ImagePullSecrets will replace any secrets that have been
66    /// propagated to a controller Deployment, typically via packagePullSecrets.
67    #[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullSecrets")]
68    pub image_pull_secrets: Option<Vec<ControllerConfigImagePullSecrets>>,
69    /// Metadata that will be added to the provider Pod.
70    #[serde(default, skip_serializing_if = "Option::is_none")]
71    pub metadata: Option<ControllerConfigMetadata>,
72    /// NodeName is a request to schedule this pod onto a specific node. If it is non-empty,
73    /// the scheduler simply schedules this pod onto that node, assuming that it fits resource
74    /// requirements.
75    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeName")]
76    pub node_name: Option<String>,
77    /// NodeSelector is a selector which must be true for the pod to fit on a node.
78    /// Selector which must match a node's labels for the pod to be scheduled on that node.
79    /// More info: <https://kubernetes.io/docs/concepts/configuration/assign-pod-node/>
80    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
81    pub node_selector: Option<BTreeMap<String, String>>,
82    /// PodSecurityContext holds pod-level security attributes and common container settings.
83    /// Optional: Defaults to empty.  See type description for default values of each field.
84    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podSecurityContext")]
85    pub pod_security_context: Option<ControllerConfigPodSecurityContext>,
86    /// List of container ports to expose on the container
87    #[serde(default, skip_serializing_if = "Option::is_none")]
88    pub ports: Option<Vec<ControllerConfigPorts>>,
89    /// If specified, indicates the pod's priority. "system-node-critical" and
90    /// "system-cluster-critical" are two special keywords which indicate the
91    /// highest priorities with the former being the highest priority. Any other
92    /// name must be defined by creating a PriorityClass object with that name.
93    /// If not specified, the pod priority will be default or zero if there is no
94    /// default.
95    #[serde(default, skip_serializing_if = "Option::is_none", rename = "priorityClassName")]
96    pub priority_class_name: Option<String>,
97    /// Number of desired pods. This is a pointer to distinguish between explicit
98    /// zero and not specified. Defaults to 1.
99    /// Note: If more than 1 replica is set and leader election is not enabled then
100    /// controllers could conflict. Environment variable "LEADER_ELECTION" can be
101    /// used to enable leader election process.
102    #[serde(default, skip_serializing_if = "Option::is_none")]
103    pub replicas: Option<i32>,
104    /// Compute Resources required by this container.
105    /// Cannot be updated.
106    /// More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
107    #[serde(default, skip_serializing_if = "Option::is_none")]
108    pub resources: Option<ControllerConfigResources>,
109    /// RuntimeClassName refers to a RuntimeClass object in the node.k8s.io group, which should be used
110    /// to run this pod.  If no RuntimeClass resource matches the named class, the pod will not be run.
111    /// If unset or empty, the "legacy" RuntimeClass will be used, which is an implicit class with an
112    /// empty definition that uses the default runtime handler.
113    /// More info: <https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/585-runtime-class/README.md>
114    /// This is a beta feature as of Kubernetes v1.14.
115    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runtimeClassName")]
116    pub runtime_class_name: Option<String>,
117    /// SecurityContext holds container-level security attributes and common container settings.
118    /// Optional: Defaults to empty.  See type description for default values of each field.
119    #[serde(default, skip_serializing_if = "Option::is_none", rename = "securityContext")]
120    pub security_context: Option<ControllerConfigSecurityContext>,
121    /// ServiceAccountName is the name of the ServiceAccount to use to run this pod.
122    /// More info: <https://kubernetes.io/docs/tasks/configure-pod-container/configure-service-account/>
123    /// If specified, a ServiceAccount named this ServiceAccountName will be used for
124    /// the spec.serviceAccountName field in Pods to be created and for the subjects.name field
125    /// in a ClusterRoleBinding to be created.
126    /// If there is no ServiceAccount named this ServiceAccountName, a new ServiceAccount
127    /// will be created.
128    /// If there is a pre-existing ServiceAccount named this ServiceAccountName, the ServiceAccount
129    /// will be used. The annotations in the ControllerConfig will be copied to the ServiceAccount
130    /// and pre-existing annotations will be kept.
131    /// Regardless of whether there is a ServiceAccount created by Crossplane or is in place already,
132    /// the ServiceAccount will be deleted once the Provider and ControllerConfig are deleted.
133    #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountName")]
134    pub service_account_name: Option<String>,
135    /// If specified, the pod's tolerations.
136    #[serde(default, skip_serializing_if = "Option::is_none")]
137    pub tolerations: Option<Vec<ControllerConfigTolerations>>,
138    /// List of VolumeMounts to mount into the container's filesystem.
139    /// Cannot be updated.
140    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeMounts")]
141    pub volume_mounts: Option<Vec<ControllerConfigVolumeMounts>>,
142    /// List of volumes that can be mounted by containers belonging to the pod.
143    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes>
144    #[serde(default, skip_serializing_if = "Option::is_none")]
145    pub volumes: Option<Vec<ControllerConfigVolumes>>,
146}
147
148/// If specified, the pod's scheduling constraints
149#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
150pub struct ControllerConfigAffinity {
151    /// Describes node affinity scheduling rules for the pod.
152    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
153    pub node_affinity: Option<ControllerConfigAffinityNodeAffinity>,
154    /// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
155    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
156    pub pod_affinity: Option<ControllerConfigAffinityPodAffinity>,
157    /// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
158    #[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
159    pub pod_anti_affinity: Option<ControllerConfigAffinityPodAntiAffinity>,
160}
161
162/// Describes node affinity scheduling rules for the pod.
163#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
164pub struct ControllerConfigAffinityNodeAffinity {
165    /// The scheduler will prefer to schedule pods to nodes that satisfy
166    /// the affinity expressions specified by this field, but it may choose
167    /// a node that violates one or more of the expressions. The node that is
168    /// most preferred is the one with the greatest sum of weights, i.e.
169    /// for each node that meets all of the scheduling requirements (resource
170    /// request, requiredDuringScheduling affinity expressions, etc.),
171    /// compute a sum by iterating through the elements of this field and adding
172    /// "weight" to the sum if the node matches the corresponding matchExpressions; the
173    /// node(s) with the highest sum are the most preferred.
174    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
175    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
176    /// If the affinity requirements specified by this field are not met at
177    /// scheduling time, the pod will not be scheduled onto the node.
178    /// If the affinity requirements specified by this field cease to be met
179    /// at some point during pod execution (e.g. due to an update), the system
180    /// may or may not try to eventually evict the pod from its node.
181    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
182    pub required_during_scheduling_ignored_during_execution: Option<ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution>,
183}
184
185/// An empty preferred scheduling term matches all objects with implicit weight 0
186/// (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
187#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
188pub struct ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution {
189    /// A node selector term, associated with the corresponding weight.
190    pub preference: ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference,
191    /// Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
192    pub weight: i32,
193}
194
195/// A node selector term, associated with the corresponding weight.
196#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
197pub struct ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference {
198    /// A list of node selector requirements by node's labels.
199    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
200    pub match_expressions: Option<Vec<ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions>>,
201    /// A list of node selector requirements by node's fields.
202    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
203    pub match_fields: Option<Vec<ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields>>,
204}
205
206/// A node selector requirement is a selector that contains values, a key, and an operator
207/// that relates the key and values.
208#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
209pub struct ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions {
210    /// The label key that the selector applies to.
211    pub key: String,
212    /// Represents a key's relationship to a set of values.
213    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
214    pub operator: String,
215    /// An array of string values. If the operator is In or NotIn,
216    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
217    /// the values array must be empty. If the operator is Gt or Lt, the values
218    /// array must have a single element, which will be interpreted as an integer.
219    /// This array is replaced during a strategic merge patch.
220    #[serde(default, skip_serializing_if = "Option::is_none")]
221    pub values: Option<Vec<String>>,
222}
223
224/// A node selector requirement is a selector that contains values, a key, and an operator
225/// that relates the key and values.
226#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
227pub struct ControllerConfigAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields {
228    /// The label key that the selector applies to.
229    pub key: String,
230    /// Represents a key's relationship to a set of values.
231    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
232    pub operator: String,
233    /// An array of string values. If the operator is In or NotIn,
234    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
235    /// the values array must be empty. If the operator is Gt or Lt, the values
236    /// array must have a single element, which will be interpreted as an integer.
237    /// This array is replaced during a strategic merge patch.
238    #[serde(default, skip_serializing_if = "Option::is_none")]
239    pub values: Option<Vec<String>>,
240}
241
242/// If the affinity requirements specified by this field are not met at
243/// scheduling time, the pod will not be scheduled onto the node.
244/// If the affinity requirements specified by this field cease to be met
245/// at some point during pod execution (e.g. due to an update), the system
246/// may or may not try to eventually evict the pod from its node.
247#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
248pub struct ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution {
249    /// Required. A list of node selector terms. The terms are ORed.
250    #[serde(rename = "nodeSelectorTerms")]
251    pub node_selector_terms: Vec<ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms>,
252}
253
254/// A null or empty node selector term matches no objects. The requirements of
255/// them are ANDed.
256/// The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
257#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
258pub struct ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms {
259    /// A list of node selector requirements by node's labels.
260    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
261    pub match_expressions: Option<Vec<ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions>>,
262    /// A list of node selector requirements by node's fields.
263    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
264    pub match_fields: Option<Vec<ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields>>,
265}
266
267/// A node selector requirement is a selector that contains values, a key, and an operator
268/// that relates the key and values.
269#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
270pub struct ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions {
271    /// The label key that the selector applies to.
272    pub key: String,
273    /// Represents a key's relationship to a set of values.
274    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
275    pub operator: String,
276    /// An array of string values. If the operator is In or NotIn,
277    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
278    /// the values array must be empty. If the operator is Gt or Lt, the values
279    /// array must have a single element, which will be interpreted as an integer.
280    /// This array is replaced during a strategic merge patch.
281    #[serde(default, skip_serializing_if = "Option::is_none")]
282    pub values: Option<Vec<String>>,
283}
284
285/// A node selector requirement is a selector that contains values, a key, and an operator
286/// that relates the key and values.
287#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
288pub struct ControllerConfigAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields {
289    /// The label key that the selector applies to.
290    pub key: String,
291    /// Represents a key's relationship to a set of values.
292    /// Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
293    pub operator: String,
294    /// An array of string values. If the operator is In or NotIn,
295    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
296    /// the values array must be empty. If the operator is Gt or Lt, the values
297    /// array must have a single element, which will be interpreted as an integer.
298    /// This array is replaced during a strategic merge patch.
299    #[serde(default, skip_serializing_if = "Option::is_none")]
300    pub values: Option<Vec<String>>,
301}
302
303/// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
304#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
305pub struct ControllerConfigAffinityPodAffinity {
306    /// The scheduler will prefer to schedule pods to nodes that satisfy
307    /// the affinity expressions specified by this field, but it may choose
308    /// a node that violates one or more of the expressions. The node that is
309    /// most preferred is the one with the greatest sum of weights, i.e.
310    /// for each node that meets all of the scheduling requirements (resource
311    /// request, requiredDuringScheduling affinity expressions, etc.),
312    /// compute a sum by iterating through the elements of this field and adding
313    /// "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
314    /// node(s) with the highest sum are the most preferred.
315    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
316    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
317    /// If the affinity requirements specified by this field are not met at
318    /// scheduling time, the pod will not be scheduled onto the node.
319    /// If the affinity requirements specified by this field cease to be met
320    /// at some point during pod execution (e.g. due to a pod label update), the
321    /// system may or may not try to eventually evict the pod from its node.
322    /// When there are multiple elements, the lists of nodes corresponding to each
323    /// podAffinityTerm are intersected, i.e. all terms must be satisfied.
324    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
325    pub required_during_scheduling_ignored_during_execution: Option<Vec<ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
326}
327
328/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
329#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
330pub struct ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution {
331    /// Required. A pod affinity term, associated with the corresponding weight.
332    #[serde(rename = "podAffinityTerm")]
333    pub pod_affinity_term: ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
334    /// weight associated with matching the corresponding podAffinityTerm,
335    /// in the range 1-100.
336    pub weight: i32,
337}
338
339/// Required. A pod affinity term, associated with the corresponding weight.
340#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
341pub struct ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
342    /// A label query over a set of resources, in this case pods.
343    /// If it's null, this PodAffinityTerm matches with no Pods.
344    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
345    pub label_selector: Option<ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
346    /// MatchLabelKeys is a set of pod label keys to select which pods will
347    /// be taken into consideration. The keys are used to lookup values from the
348    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
349    /// to select the group of existing pods which pods will be taken into consideration
350    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
351    /// pod labels will be ignored. The default value is empty.
352    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
353    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
354    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
355    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
356    pub match_label_keys: Option<Vec<String>>,
357    /// MismatchLabelKeys is a set of pod label keys to select which pods will
358    /// be taken into consideration. The keys are used to lookup values from the
359    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
360    /// to select the group of existing pods which pods will be taken into consideration
361    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
362    /// pod labels will be ignored. The default value is empty.
363    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
364    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
365    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
366    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
367    pub mismatch_label_keys: Option<Vec<String>>,
368    /// A label query over the set of namespaces that the term applies to.
369    /// The term is applied to the union of the namespaces selected by this field
370    /// and the ones listed in the namespaces field.
371    /// null selector and null or empty namespaces list means "this pod's namespace".
372    /// An empty selector ({}) matches all namespaces.
373    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
374    pub namespace_selector: Option<ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
375    /// namespaces specifies a static list of namespace names that the term applies to.
376    /// The term is applied to the union of the namespaces listed in this field
377    /// and the ones selected by namespaceSelector.
378    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
379    #[serde(default, skip_serializing_if = "Option::is_none")]
380    pub namespaces: Option<Vec<String>>,
381    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
382    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
383    /// whose value of the label with key topologyKey matches that of any node on which any of the
384    /// selected pods is running.
385    /// Empty topologyKey is not allowed.
386    #[serde(rename = "topologyKey")]
387    pub topology_key: String,
388}
389
390/// A label query over a set of resources, in this case pods.
391/// If it's null, this PodAffinityTerm matches with no Pods.
392#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
393pub struct ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
394    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
395    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
396    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
397    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
398    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
399    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
400    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
401    pub match_labels: Option<BTreeMap<String, String>>,
402}
403
404/// A label selector requirement is a selector that contains values, a key, and an operator that
405/// relates the key and values.
406#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
407pub struct ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions {
408    /// key is the label key that the selector applies to.
409    pub key: String,
410    /// operator represents a key's relationship to a set of values.
411    /// Valid operators are In, NotIn, Exists and DoesNotExist.
412    pub operator: String,
413    /// values is an array of string values. If the operator is In or NotIn,
414    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
415    /// the values array must be empty. This array is replaced during a strategic
416    /// merge patch.
417    #[serde(default, skip_serializing_if = "Option::is_none")]
418    pub values: Option<Vec<String>>,
419}
420
421/// A label query over the set of namespaces that the term applies to.
422/// The term is applied to the union of the namespaces selected by this field
423/// and the ones listed in the namespaces field.
424/// null selector and null or empty namespaces list means "this pod's namespace".
425/// An empty selector ({}) matches all namespaces.
426#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
427pub struct ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
428    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
429    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
430    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
431    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
432    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
433    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
434    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
435    pub match_labels: Option<BTreeMap<String, String>>,
436}
437
438/// A label selector requirement is a selector that contains values, a key, and an operator that
439/// relates the key and values.
440#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
441pub struct ControllerConfigAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions {
442    /// key is the label key that the selector applies to.
443    pub key: String,
444    /// operator represents a key's relationship to a set of values.
445    /// Valid operators are In, NotIn, Exists and DoesNotExist.
446    pub operator: String,
447    /// values is an array of string values. If the operator is In or NotIn,
448    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
449    /// the values array must be empty. This array is replaced during a strategic
450    /// merge patch.
451    #[serde(default, skip_serializing_if = "Option::is_none")]
452    pub values: Option<Vec<String>>,
453}
454
455/// Defines a set of pods (namely those matching the labelSelector
456/// relative to the given namespace(s)) that this pod should be
457/// co-located (affinity) or not co-located (anti-affinity) with,
458/// where co-located is defined as running on a node whose value of
459/// the label with key <topologyKey> matches that of any node on which
460/// a pod of the set of pods is running
461#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
462pub struct ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution {
463    /// A label query over a set of resources, in this case pods.
464    /// If it's null, this PodAffinityTerm matches with no Pods.
465    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
466    pub label_selector: Option<ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
467    /// MatchLabelKeys is a set of pod label keys to select which pods will
468    /// be taken into consideration. The keys are used to lookup values from the
469    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
470    /// to select the group of existing pods which pods will be taken into consideration
471    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
472    /// pod labels will be ignored. The default value is empty.
473    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
474    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
475    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
476    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
477    pub match_label_keys: Option<Vec<String>>,
478    /// MismatchLabelKeys is a set of pod label keys to select which pods will
479    /// be taken into consideration. The keys are used to lookup values from the
480    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
481    /// to select the group of existing pods which pods will be taken into consideration
482    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
483    /// pod labels will be ignored. The default value is empty.
484    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
485    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
486    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
487    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
488    pub mismatch_label_keys: Option<Vec<String>>,
489    /// A label query over the set of namespaces that the term applies to.
490    /// The term is applied to the union of the namespaces selected by this field
491    /// and the ones listed in the namespaces field.
492    /// null selector and null or empty namespaces list means "this pod's namespace".
493    /// An empty selector ({}) matches all namespaces.
494    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
495    pub namespace_selector: Option<ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
496    /// namespaces specifies a static list of namespace names that the term applies to.
497    /// The term is applied to the union of the namespaces listed in this field
498    /// and the ones selected by namespaceSelector.
499    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
500    #[serde(default, skip_serializing_if = "Option::is_none")]
501    pub namespaces: Option<Vec<String>>,
502    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
503    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
504    /// whose value of the label with key topologyKey matches that of any node on which any of the
505    /// selected pods is running.
506    /// Empty topologyKey is not allowed.
507    #[serde(rename = "topologyKey")]
508    pub topology_key: String,
509}
510
511/// A label query over a set of resources, in this case pods.
512/// If it's null, this PodAffinityTerm matches with no Pods.
513#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
514pub struct ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
515    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
516    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
517    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
518    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
519    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
520    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
521    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
522    pub match_labels: Option<BTreeMap<String, String>>,
523}
524
525/// A label selector requirement is a selector that contains values, a key, and an operator that
526/// relates the key and values.
527#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
528pub struct ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions {
529    /// key is the label key that the selector applies to.
530    pub key: String,
531    /// operator represents a key's relationship to a set of values.
532    /// Valid operators are In, NotIn, Exists and DoesNotExist.
533    pub operator: String,
534    /// values is an array of string values. If the operator is In or NotIn,
535    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
536    /// the values array must be empty. This array is replaced during a strategic
537    /// merge patch.
538    #[serde(default, skip_serializing_if = "Option::is_none")]
539    pub values: Option<Vec<String>>,
540}
541
542/// A label query over the set of namespaces that the term applies to.
543/// The term is applied to the union of the namespaces selected by this field
544/// and the ones listed in the namespaces field.
545/// null selector and null or empty namespaces list means "this pod's namespace".
546/// An empty selector ({}) matches all namespaces.
547#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
548pub struct ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
549    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
550    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
551    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
552    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
553    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
554    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
555    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
556    pub match_labels: Option<BTreeMap<String, String>>,
557}
558
559/// A label selector requirement is a selector that contains values, a key, and an operator that
560/// relates the key and values.
561#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
562pub struct ControllerConfigAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions {
563    /// key is the label key that the selector applies to.
564    pub key: String,
565    /// operator represents a key's relationship to a set of values.
566    /// Valid operators are In, NotIn, Exists and DoesNotExist.
567    pub operator: String,
568    /// values is an array of string values. If the operator is In or NotIn,
569    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
570    /// the values array must be empty. This array is replaced during a strategic
571    /// merge patch.
572    #[serde(default, skip_serializing_if = "Option::is_none")]
573    pub values: Option<Vec<String>>,
574}
575
576/// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
577#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
578pub struct ControllerConfigAffinityPodAntiAffinity {
579    /// The scheduler will prefer to schedule pods to nodes that satisfy
580    /// the anti-affinity expressions specified by this field, but it may choose
581    /// a node that violates one or more of the expressions. The node that is
582    /// most preferred is the one with the greatest sum of weights, i.e.
583    /// for each node that meets all of the scheduling requirements (resource
584    /// request, requiredDuringScheduling anti-affinity expressions, etc.),
585    /// compute a sum by iterating through the elements of this field and adding
586    /// "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the
587    /// node(s) with the highest sum are the most preferred.
588    #[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
589    pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
590    /// If the anti-affinity requirements specified by this field are not met at
591    /// scheduling time, the pod will not be scheduled onto the node.
592    /// If the anti-affinity requirements specified by this field cease to be met
593    /// at some point during pod execution (e.g. due to a pod label update), the
594    /// system may or may not try to eventually evict the pod from its node.
595    /// When there are multiple elements, the lists of nodes corresponding to each
596    /// podAffinityTerm are intersected, i.e. all terms must be satisfied.
597    #[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
598    pub required_during_scheduling_ignored_during_execution: Option<Vec<ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
599}
600
601/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
602#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
603pub struct ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution {
604    /// Required. A pod affinity term, associated with the corresponding weight.
605    #[serde(rename = "podAffinityTerm")]
606    pub pod_affinity_term: ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
607    /// weight associated with matching the corresponding podAffinityTerm,
608    /// in the range 1-100.
609    pub weight: i32,
610}
611
612/// Required. A pod affinity term, associated with the corresponding weight.
613#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
614pub struct ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
615    /// A label query over a set of resources, in this case pods.
616    /// If it's null, this PodAffinityTerm matches with no Pods.
617    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
618    pub label_selector: Option<ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
619    /// MatchLabelKeys is a set of pod label keys to select which pods will
620    /// be taken into consideration. The keys are used to lookup values from the
621    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
622    /// to select the group of existing pods which pods will be taken into consideration
623    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
624    /// pod labels will be ignored. The default value is empty.
625    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
626    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
627    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
628    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
629    pub match_label_keys: Option<Vec<String>>,
630    /// MismatchLabelKeys is a set of pod label keys to select which pods will
631    /// be taken into consideration. The keys are used to lookup values from the
632    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
633    /// to select the group of existing pods which pods will be taken into consideration
634    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
635    /// pod labels will be ignored. The default value is empty.
636    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
637    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
638    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
639    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
640    pub mismatch_label_keys: Option<Vec<String>>,
641    /// A label query over the set of namespaces that the term applies to.
642    /// The term is applied to the union of the namespaces selected by this field
643    /// and the ones listed in the namespaces field.
644    /// null selector and null or empty namespaces list means "this pod's namespace".
645    /// An empty selector ({}) matches all namespaces.
646    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
647    pub namespace_selector: Option<ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
648    /// namespaces specifies a static list of namespace names that the term applies to.
649    /// The term is applied to the union of the namespaces listed in this field
650    /// and the ones selected by namespaceSelector.
651    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
652    #[serde(default, skip_serializing_if = "Option::is_none")]
653    pub namespaces: Option<Vec<String>>,
654    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
655    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
656    /// whose value of the label with key topologyKey matches that of any node on which any of the
657    /// selected pods is running.
658    /// Empty topologyKey is not allowed.
659    #[serde(rename = "topologyKey")]
660    pub topology_key: String,
661}
662
663/// A label query over a set of resources, in this case pods.
664/// If it's null, this PodAffinityTerm matches with no Pods.
665#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
666pub struct ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
667    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
668    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
669    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
670    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
671    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
672    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
673    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
674    pub match_labels: Option<BTreeMap<String, String>>,
675}
676
677/// A label selector requirement is a selector that contains values, a key, and an operator that
678/// relates the key and values.
679#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
680pub struct ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions {
681    /// key is the label key that the selector applies to.
682    pub key: String,
683    /// operator represents a key's relationship to a set of values.
684    /// Valid operators are In, NotIn, Exists and DoesNotExist.
685    pub operator: String,
686    /// values is an array of string values. If the operator is In or NotIn,
687    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
688    /// the values array must be empty. This array is replaced during a strategic
689    /// merge patch.
690    #[serde(default, skip_serializing_if = "Option::is_none")]
691    pub values: Option<Vec<String>>,
692}
693
694/// A label query over the set of namespaces that the term applies to.
695/// The term is applied to the union of the namespaces selected by this field
696/// and the ones listed in the namespaces field.
697/// null selector and null or empty namespaces list means "this pod's namespace".
698/// An empty selector ({}) matches all namespaces.
699#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
700pub struct ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
701    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
702    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
703    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
704    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
705    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
706    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
707    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
708    pub match_labels: Option<BTreeMap<String, String>>,
709}
710
711/// A label selector requirement is a selector that contains values, a key, and an operator that
712/// relates the key and values.
713#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
714pub struct ControllerConfigAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions {
715    /// key is the label key that the selector applies to.
716    pub key: String,
717    /// operator represents a key's relationship to a set of values.
718    /// Valid operators are In, NotIn, Exists and DoesNotExist.
719    pub operator: String,
720    /// values is an array of string values. If the operator is In or NotIn,
721    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
722    /// the values array must be empty. This array is replaced during a strategic
723    /// merge patch.
724    #[serde(default, skip_serializing_if = "Option::is_none")]
725    pub values: Option<Vec<String>>,
726}
727
728/// Defines a set of pods (namely those matching the labelSelector
729/// relative to the given namespace(s)) that this pod should be
730/// co-located (affinity) or not co-located (anti-affinity) with,
731/// where co-located is defined as running on a node whose value of
732/// the label with key <topologyKey> matches that of any node on which
733/// a pod of the set of pods is running
734#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
735pub struct ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution {
736    /// A label query over a set of resources, in this case pods.
737    /// If it's null, this PodAffinityTerm matches with no Pods.
738    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
739    pub label_selector: Option<ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
740    /// MatchLabelKeys is a set of pod label keys to select which pods will
741    /// be taken into consideration. The keys are used to lookup values from the
742    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)`
743    /// to select the group of existing pods which pods will be taken into consideration
744    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
745    /// pod labels will be ignored. The default value is empty.
746    /// The same key is forbidden to exist in both matchLabelKeys and labelSelector.
747    /// Also, matchLabelKeys cannot be set when labelSelector isn't set.
748    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
749    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
750    pub match_label_keys: Option<Vec<String>>,
751    /// MismatchLabelKeys is a set of pod label keys to select which pods will
752    /// be taken into consideration. The keys are used to lookup values from the
753    /// incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)`
754    /// to select the group of existing pods which pods will be taken into consideration
755    /// for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming
756    /// pod labels will be ignored. The default value is empty.
757    /// The same key is forbidden to exist in both mismatchLabelKeys and labelSelector.
758    /// Also, mismatchLabelKeys cannot be set when labelSelector isn't set.
759    /// This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
760    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mismatchLabelKeys")]
761    pub mismatch_label_keys: Option<Vec<String>>,
762    /// A label query over the set of namespaces that the term applies to.
763    /// The term is applied to the union of the namespaces selected by this field
764    /// and the ones listed in the namespaces field.
765    /// null selector and null or empty namespaces list means "this pod's namespace".
766    /// An empty selector ({}) matches all namespaces.
767    #[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
768    pub namespace_selector: Option<ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
769    /// namespaces specifies a static list of namespace names that the term applies to.
770    /// The term is applied to the union of the namespaces listed in this field
771    /// and the ones selected by namespaceSelector.
772    /// null or empty namespaces list and null namespaceSelector means "this pod's namespace".
773    #[serde(default, skip_serializing_if = "Option::is_none")]
774    pub namespaces: Option<Vec<String>>,
775    /// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching
776    /// the labelSelector in the specified namespaces, where co-located is defined as running on a node
777    /// whose value of the label with key topologyKey matches that of any node on which any of the
778    /// selected pods is running.
779    /// Empty topologyKey is not allowed.
780    #[serde(rename = "topologyKey")]
781    pub topology_key: String,
782}
783
784/// A label query over a set of resources, in this case pods.
785/// If it's null, this PodAffinityTerm matches with no Pods.
786#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
787pub struct ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
788    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
789    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
790    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
791    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
792    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
793    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
794    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
795    pub match_labels: Option<BTreeMap<String, String>>,
796}
797
798/// A label selector requirement is a selector that contains values, a key, and an operator that
799/// relates the key and values.
800#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
801pub struct ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions {
802    /// key is the label key that the selector applies to.
803    pub key: String,
804    /// operator represents a key's relationship to a set of values.
805    /// Valid operators are In, NotIn, Exists and DoesNotExist.
806    pub operator: String,
807    /// values is an array of string values. If the operator is In or NotIn,
808    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
809    /// the values array must be empty. This array is replaced during a strategic
810    /// merge patch.
811    #[serde(default, skip_serializing_if = "Option::is_none")]
812    pub values: Option<Vec<String>>,
813}
814
815/// A label query over the set of namespaces that the term applies to.
816/// The term is applied to the union of the namespaces selected by this field
817/// and the ones listed in the namespaces field.
818/// null selector and null or empty namespaces list means "this pod's namespace".
819/// An empty selector ({}) matches all namespaces.
820#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
821pub struct ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
822    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
823    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
824    pub match_expressions: Option<Vec<ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
825    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
826    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
827    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
828    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
829    pub match_labels: Option<BTreeMap<String, String>>,
830}
831
832/// A label selector requirement is a selector that contains values, a key, and an operator that
833/// relates the key and values.
834#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
835pub struct ControllerConfigAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions {
836    /// key is the label key that the selector applies to.
837    pub key: String,
838    /// operator represents a key's relationship to a set of values.
839    /// Valid operators are In, NotIn, Exists and DoesNotExist.
840    pub operator: String,
841    /// values is an array of string values. If the operator is In or NotIn,
842    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
843    /// the values array must be empty. This array is replaced during a strategic
844    /// merge patch.
845    #[serde(default, skip_serializing_if = "Option::is_none")]
846    pub values: Option<Vec<String>>,
847}
848
849/// EnvVar represents an environment variable present in a Container.
850#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
851pub struct ControllerConfigEnv {
852    /// Name of the environment variable. Must be a C_IDENTIFIER.
853    pub name: String,
854    /// Variable references $(VAR_NAME) are expanded
855    /// using the previously defined environment variables in the container and
856    /// any service environment variables. If a variable cannot be resolved,
857    /// the reference in the input string will be unchanged. Double $$ are reduced
858    /// to a single $, which allows for escaping the $(VAR_NAME) syntax: i.e.
859    /// "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)".
860    /// Escaped references will never be expanded, regardless of whether the variable
861    /// exists or not.
862    /// Defaults to "".
863    #[serde(default, skip_serializing_if = "Option::is_none")]
864    pub value: Option<String>,
865    /// Source for the environment variable's value. Cannot be used if value is not empty.
866    #[serde(default, skip_serializing_if = "Option::is_none", rename = "valueFrom")]
867    pub value_from: Option<ControllerConfigEnvValueFrom>,
868}
869
870/// Source for the environment variable's value. Cannot be used if value is not empty.
871#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
872pub struct ControllerConfigEnvValueFrom {
873    /// Selects a key of a ConfigMap.
874    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapKeyRef")]
875    pub config_map_key_ref: Option<ControllerConfigEnvValueFromConfigMapKeyRef>,
876    /// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
877    /// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
878    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
879    pub field_ref: Option<ControllerConfigEnvValueFromFieldRef>,
880    /// Selects a resource of the container: only resources limits and requests
881    /// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
882    #[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
883    pub resource_field_ref: Option<ControllerConfigEnvValueFromResourceFieldRef>,
884    /// Selects a key of a secret in the pod's namespace
885    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretKeyRef")]
886    pub secret_key_ref: Option<ControllerConfigEnvValueFromSecretKeyRef>,
887}
888
889/// Selects a key of a ConfigMap.
890#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
891pub struct ControllerConfigEnvValueFromConfigMapKeyRef {
892    /// The key to select.
893    pub key: String,
894    /// Name of the referent.
895    /// This field is effectively required, but due to backwards compatibility is
896    /// allowed to be empty. Instances of this type with an empty value here are
897    /// almost certainly wrong.
898    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
899    #[serde(default, skip_serializing_if = "Option::is_none")]
900    pub name: Option<String>,
901    /// Specify whether the ConfigMap or its key must be defined
902    #[serde(default, skip_serializing_if = "Option::is_none")]
903    pub optional: Option<bool>,
904}
905
906/// Selects a field of the pod: supports metadata.name, metadata.namespace, `metadata.labels['<KEY>']`, `metadata.annotations['<KEY>']`,
907/// spec.nodeName, spec.serviceAccountName, status.hostIP, status.podIP, status.podIPs.
908#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
909pub struct ControllerConfigEnvValueFromFieldRef {
910    /// Version of the schema the FieldPath is written in terms of, defaults to "v1".
911    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
912    pub api_version: Option<String>,
913    /// Path of the field to select in the specified API version.
914    #[serde(rename = "fieldPath")]
915    pub field_path: String,
916}
917
918/// Selects a resource of the container: only resources limits and requests
919/// (limits.cpu, limits.memory, limits.ephemeral-storage, requests.cpu, requests.memory and requests.ephemeral-storage) are currently supported.
920#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
921pub struct ControllerConfigEnvValueFromResourceFieldRef {
922    /// Container name: required for volumes, optional for env vars
923    #[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
924    pub container_name: Option<String>,
925    /// Specifies the output format of the exposed resources, defaults to "1"
926    #[serde(default, skip_serializing_if = "Option::is_none")]
927    pub divisor: Option<IntOrString>,
928    /// Required: resource to select
929    pub resource: String,
930}
931
932/// Selects a key of a secret in the pod's namespace
933#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
934pub struct ControllerConfigEnvValueFromSecretKeyRef {
935    /// The key of the secret to select from.  Must be a valid secret key.
936    pub key: String,
937    /// Name of the referent.
938    /// This field is effectively required, but due to backwards compatibility is
939    /// allowed to be empty. Instances of this type with an empty value here are
940    /// almost certainly wrong.
941    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
942    #[serde(default, skip_serializing_if = "Option::is_none")]
943    pub name: Option<String>,
944    /// Specify whether the Secret or its key must be defined
945    #[serde(default, skip_serializing_if = "Option::is_none")]
946    pub optional: Option<bool>,
947}
948
949/// EnvFromSource represents the source of a set of ConfigMaps
950#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
951pub struct ControllerConfigEnvFrom {
952    /// The ConfigMap to select from
953    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMapRef")]
954    pub config_map_ref: Option<ControllerConfigEnvFromConfigMapRef>,
955    /// An optional identifier to prepend to each key in the ConfigMap. Must be a C_IDENTIFIER.
956    #[serde(default, skip_serializing_if = "Option::is_none")]
957    pub prefix: Option<String>,
958    /// The Secret to select from
959    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")]
960    pub secret_ref: Option<ControllerConfigEnvFromSecretRef>,
961}
962
963/// The ConfigMap to select from
964#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
965pub struct ControllerConfigEnvFromConfigMapRef {
966    /// Name of the referent.
967    /// This field is effectively required, but due to backwards compatibility is
968    /// allowed to be empty. Instances of this type with an empty value here are
969    /// almost certainly wrong.
970    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
971    #[serde(default, skip_serializing_if = "Option::is_none")]
972    pub name: Option<String>,
973    /// Specify whether the ConfigMap must be defined
974    #[serde(default, skip_serializing_if = "Option::is_none")]
975    pub optional: Option<bool>,
976}
977
978/// The Secret to select from
979#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
980pub struct ControllerConfigEnvFromSecretRef {
981    /// Name of the referent.
982    /// This field is effectively required, but due to backwards compatibility is
983    /// allowed to be empty. Instances of this type with an empty value here are
984    /// almost certainly wrong.
985    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
986    #[serde(default, skip_serializing_if = "Option::is_none")]
987    pub name: Option<String>,
988    /// Specify whether the Secret must be defined
989    #[serde(default, skip_serializing_if = "Option::is_none")]
990    pub optional: Option<bool>,
991}
992
993/// LocalObjectReference contains enough information to let you locate the
994/// referenced object inside the same namespace.
995#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
996pub struct ControllerConfigImagePullSecrets {
997    /// Name of the referent.
998    /// This field is effectively required, but due to backwards compatibility is
999    /// allowed to be empty. Instances of this type with an empty value here are
1000    /// almost certainly wrong.
1001    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
1002    #[serde(default, skip_serializing_if = "Option::is_none")]
1003    pub name: Option<String>,
1004}
1005
1006/// Metadata that will be added to the provider Pod.
1007#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1008pub struct ControllerConfigMetadata {
1009    /// Annotations is an unstructured key value map stored with a resource that may be
1010    /// set by external tools to store and retrieve arbitrary metadata. They are not
1011    /// queryable and should be preserved when modifying objects.
1012    /// More info: http:<https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/>
1013    #[serde(default, skip_serializing_if = "Option::is_none")]
1014    pub annotations: Option<BTreeMap<String, String>>,
1015    /// Map of string keys and values that can be used to organize and
1016    /// categorize (scope and select) objects. This will only affect
1017    /// labels on the pod, not the pod selector. Labels will be merged
1018    /// with internal labels used by crossplane, and labels with a
1019    /// crossplane.io key might be overwritten.
1020    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/>
1021    #[serde(default, skip_serializing_if = "Option::is_none")]
1022    pub labels: Option<BTreeMap<String, String>>,
1023}
1024
1025/// PodSecurityContext holds pod-level security attributes and common container settings.
1026/// Optional: Defaults to empty.  See type description for default values of each field.
1027#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1028pub struct ControllerConfigPodSecurityContext {
1029    /// appArmorProfile is the AppArmor options to use by the containers in this pod.
1030    /// Note that this field cannot be set when spec.os.name is windows.
1031    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appArmorProfile")]
1032    pub app_armor_profile: Option<ControllerConfigPodSecurityContextAppArmorProfile>,
1033    /// A special supplemental group that applies to all containers in a pod.
1034    /// Some volume types allow the Kubelet to change the ownership of that volume
1035    /// to be owned by the pod:
1036    /// 
1037    /// 1. The owning GID will be the FSGroup
1038    /// 2. The setgid bit is set (new files created in the volume will be owned by FSGroup)
1039    /// 3. The permission bits are OR'd with rw-rw----
1040    /// 
1041    /// If unset, the Kubelet will not modify the ownership and permissions of any volume.
1042    /// Note that this field cannot be set when spec.os.name is windows.
1043    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsGroup")]
1044    pub fs_group: Option<i64>,
1045    /// fsGroupChangePolicy defines behavior of changing ownership and permission of the volume
1046    /// before being exposed inside Pod. This field will only apply to
1047    /// volume types which support fsGroup based ownership(and permissions).
1048    /// It will have no effect on ephemeral volume types such as: secret, configmaps
1049    /// and emptydir.
1050    /// Valid values are "OnRootMismatch" and "Always". If not specified, "Always" is used.
1051    /// Note that this field cannot be set when spec.os.name is windows.
1052    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsGroupChangePolicy")]
1053    pub fs_group_change_policy: Option<String>,
1054    /// The GID to run the entrypoint of the container process.
1055    /// Uses runtime default if unset.
1056    /// May also be set in SecurityContext.  If set in both SecurityContext and
1057    /// PodSecurityContext, the value specified in SecurityContext takes precedence
1058    /// for that container.
1059    /// Note that this field cannot be set when spec.os.name is windows.
1060    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsGroup")]
1061    pub run_as_group: Option<i64>,
1062    /// Indicates that the container must run as a non-root user.
1063    /// If true, the Kubelet will validate the image at runtime to ensure that it
1064    /// does not run as UID 0 (root) and fail to start the container if it does.
1065    /// If unset or false, no such validation will be performed.
1066    /// May also be set in SecurityContext.  If set in both SecurityContext and
1067    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
1068    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsNonRoot")]
1069    pub run_as_non_root: Option<bool>,
1070    /// The UID to run the entrypoint of the container process.
1071    /// Defaults to user specified in image metadata if unspecified.
1072    /// May also be set in SecurityContext.  If set in both SecurityContext and
1073    /// PodSecurityContext, the value specified in SecurityContext takes precedence
1074    /// for that container.
1075    /// Note that this field cannot be set when spec.os.name is windows.
1076    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUser")]
1077    pub run_as_user: Option<i64>,
1078    /// The SELinux context to be applied to all containers.
1079    /// If unspecified, the container runtime will allocate a random SELinux context for each
1080    /// container.  May also be set in SecurityContext.  If set in
1081    /// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
1082    /// takes precedence for that container.
1083    /// Note that this field cannot be set when spec.os.name is windows.
1084    #[serde(default, skip_serializing_if = "Option::is_none", rename = "seLinuxOptions")]
1085    pub se_linux_options: Option<ControllerConfigPodSecurityContextSeLinuxOptions>,
1086    /// The seccomp options to use by the containers in this pod.
1087    /// Note that this field cannot be set when spec.os.name is windows.
1088    #[serde(default, skip_serializing_if = "Option::is_none", rename = "seccompProfile")]
1089    pub seccomp_profile: Option<ControllerConfigPodSecurityContextSeccompProfile>,
1090    /// A list of groups applied to the first process run in each container, in
1091    /// addition to the container's primary GID and fsGroup (if specified).  If
1092    /// the SupplementalGroupsPolicy feature is enabled, the
1093    /// supplementalGroupsPolicy field determines whether these are in addition
1094    /// to or instead of any group memberships defined in the container image.
1095    /// If unspecified, no additional groups are added, though group memberships
1096    /// defined in the container image may still be used, depending on the
1097    /// supplementalGroupsPolicy field.
1098    /// Note that this field cannot be set when spec.os.name is windows.
1099    #[serde(default, skip_serializing_if = "Option::is_none", rename = "supplementalGroups")]
1100    pub supplemental_groups: Option<Vec<i64>>,
1101    /// Defines how supplemental groups of the first container processes are calculated.
1102    /// Valid values are "Merge" and "Strict". If not specified, "Merge" is used.
1103    /// (Alpha) Using the field requires the SupplementalGroupsPolicy feature gate to be enabled
1104    /// and the container runtime must implement support for this feature.
1105    /// Note that this field cannot be set when spec.os.name is windows.
1106    #[serde(default, skip_serializing_if = "Option::is_none", rename = "supplementalGroupsPolicy")]
1107    pub supplemental_groups_policy: Option<String>,
1108    /// Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported
1109    /// sysctls (by the container runtime) might fail to launch.
1110    /// Note that this field cannot be set when spec.os.name is windows.
1111    #[serde(default, skip_serializing_if = "Option::is_none")]
1112    pub sysctls: Option<Vec<ControllerConfigPodSecurityContextSysctls>>,
1113    /// The Windows specific settings applied to all containers.
1114    /// If unspecified, the options within a container's SecurityContext will be used.
1115    /// If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
1116    /// Note that this field cannot be set when spec.os.name is linux.
1117    #[serde(default, skip_serializing_if = "Option::is_none", rename = "windowsOptions")]
1118    pub windows_options: Option<ControllerConfigPodSecurityContextWindowsOptions>,
1119}
1120
1121/// appArmorProfile is the AppArmor options to use by the containers in this pod.
1122/// Note that this field cannot be set when spec.os.name is windows.
1123#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1124pub struct ControllerConfigPodSecurityContextAppArmorProfile {
1125    /// localhostProfile indicates a profile loaded on the node that should be used.
1126    /// The profile must be preconfigured on the node to work.
1127    /// Must match the loaded name of the profile.
1128    /// Must be set if and only if type is "Localhost".
1129    #[serde(default, skip_serializing_if = "Option::is_none", rename = "localhostProfile")]
1130    pub localhost_profile: Option<String>,
1131    /// type indicates which kind of AppArmor profile will be applied.
1132    /// Valid options are:
1133    ///   Localhost - a profile pre-loaded on the node.
1134    ///   RuntimeDefault - the container runtime's default profile.
1135    ///   Unconfined - no AppArmor enforcement.
1136    #[serde(rename = "type")]
1137    pub r#type: String,
1138}
1139
1140/// The SELinux context to be applied to all containers.
1141/// If unspecified, the container runtime will allocate a random SELinux context for each
1142/// container.  May also be set in SecurityContext.  If set in
1143/// both SecurityContext and PodSecurityContext, the value specified in SecurityContext
1144/// takes precedence for that container.
1145/// Note that this field cannot be set when spec.os.name is windows.
1146#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1147pub struct ControllerConfigPodSecurityContextSeLinuxOptions {
1148    /// Level is SELinux level label that applies to the container.
1149    #[serde(default, skip_serializing_if = "Option::is_none")]
1150    pub level: Option<String>,
1151    /// Role is a SELinux role label that applies to the container.
1152    #[serde(default, skip_serializing_if = "Option::is_none")]
1153    pub role: Option<String>,
1154    /// Type is a SELinux type label that applies to the container.
1155    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
1156    pub r#type: Option<String>,
1157    /// User is a SELinux user label that applies to the container.
1158    #[serde(default, skip_serializing_if = "Option::is_none")]
1159    pub user: Option<String>,
1160}
1161
1162/// The seccomp options to use by the containers in this pod.
1163/// Note that this field cannot be set when spec.os.name is windows.
1164#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1165pub struct ControllerConfigPodSecurityContextSeccompProfile {
1166    /// localhostProfile indicates a profile defined in a file on the node should be used.
1167    /// The profile must be preconfigured on the node to work.
1168    /// Must be a descending path, relative to the kubelet's configured seccomp profile location.
1169    /// Must be set if type is "Localhost". Must NOT be set for any other type.
1170    #[serde(default, skip_serializing_if = "Option::is_none", rename = "localhostProfile")]
1171    pub localhost_profile: Option<String>,
1172    /// type indicates which kind of seccomp profile will be applied.
1173    /// Valid options are:
1174    /// 
1175    /// Localhost - a profile defined in a file on the node should be used.
1176    /// RuntimeDefault - the container runtime default profile should be used.
1177    /// Unconfined - no profile should be applied.
1178    #[serde(rename = "type")]
1179    pub r#type: String,
1180}
1181
1182/// Sysctl defines a kernel parameter to be set
1183#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1184pub struct ControllerConfigPodSecurityContextSysctls {
1185    /// Name of a property to set
1186    pub name: String,
1187    /// Value of a property to set
1188    pub value: String,
1189}
1190
1191/// The Windows specific settings applied to all containers.
1192/// If unspecified, the options within a container's SecurityContext will be used.
1193/// If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
1194/// Note that this field cannot be set when spec.os.name is linux.
1195#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1196pub struct ControllerConfigPodSecurityContextWindowsOptions {
1197    /// GMSACredentialSpec is where the GMSA admission webhook
1198    /// (<https://github.com/kubernetes-sigs/windows-gmsa)> inlines the contents of the
1199    /// GMSA credential spec named by the GMSACredentialSpecName field.
1200    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpec")]
1201    pub gmsa_credential_spec: Option<String>,
1202    /// GMSACredentialSpecName is the name of the GMSA credential spec to use.
1203    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpecName")]
1204    pub gmsa_credential_spec_name: Option<String>,
1205    /// HostProcess determines if a container should be run as a 'Host Process' container.
1206    /// All of a Pod's containers must have the same effective HostProcess value
1207    /// (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers).
1208    /// In addition, if HostProcess is true then HostNetwork must also be set to true.
1209    #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostProcess")]
1210    pub host_process: Option<bool>,
1211    /// The UserName in Windows to run the entrypoint of the container process.
1212    /// Defaults to the user specified in image metadata if unspecified.
1213    /// May also be set in PodSecurityContext. If set in both SecurityContext and
1214    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
1215    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUserName")]
1216    pub run_as_user_name: Option<String>,
1217}
1218
1219/// ContainerPort represents a network port in a single container.
1220#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1221pub struct ControllerConfigPorts {
1222    /// Number of port to expose on the pod's IP address.
1223    /// This must be a valid port number, 0 < x < 65536.
1224    #[serde(rename = "containerPort")]
1225    pub container_port: i32,
1226    /// What host IP to bind the external port to.
1227    #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostIP")]
1228    pub host_ip: Option<String>,
1229    /// Number of port to expose on the host.
1230    /// If specified, this must be a valid port number, 0 < x < 65536.
1231    /// If HostNetwork is specified, this must match ContainerPort.
1232    /// Most containers do not need this.
1233    #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostPort")]
1234    pub host_port: Option<i32>,
1235    /// If specified, this must be an IANA_SVC_NAME and unique within the pod. Each
1236    /// named port in a pod must have a unique name. Name for the port that can be
1237    /// referred to by services.
1238    #[serde(default, skip_serializing_if = "Option::is_none")]
1239    pub name: Option<String>,
1240    /// Protocol for port. Must be UDP, TCP, or SCTP.
1241    /// Defaults to "TCP".
1242    #[serde(default, skip_serializing_if = "Option::is_none")]
1243    pub protocol: Option<String>,
1244}
1245
1246/// Compute Resources required by this container.
1247/// Cannot be updated.
1248/// More info: <https://kubernetes.io/docs/concepts/configuration/manage-compute-resources-container/>
1249#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1250pub struct ControllerConfigResources {
1251    /// Claims lists the names of resources, defined in spec.resourceClaims,
1252    /// that are used by this container.
1253    /// 
1254    /// This is an alpha field and requires enabling the
1255    /// DynamicResourceAllocation feature gate.
1256    /// 
1257    /// This field is immutable. It can only be set for containers.
1258    #[serde(default, skip_serializing_if = "Option::is_none")]
1259    pub claims: Option<Vec<ControllerConfigResourcesClaims>>,
1260    /// Limits describes the maximum amount of compute resources allowed.
1261    /// More info: <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>
1262    #[serde(default, skip_serializing_if = "Option::is_none")]
1263    pub limits: Option<BTreeMap<String, IntOrString>>,
1264    /// Requests describes the minimum amount of compute resources required.
1265    /// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
1266    /// otherwise to an implementation-defined value. Requests cannot exceed Limits.
1267    /// More info: <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>
1268    #[serde(default, skip_serializing_if = "Option::is_none")]
1269    pub requests: Option<BTreeMap<String, IntOrString>>,
1270}
1271
1272/// ResourceClaim references one entry in PodSpec.ResourceClaims.
1273#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1274pub struct ControllerConfigResourcesClaims {
1275    /// Name must match the name of one entry in pod.spec.resourceClaims of
1276    /// the Pod where this field is used. It makes that resource available
1277    /// inside a container.
1278    pub name: String,
1279    /// Request is the name chosen for a request in the referenced claim.
1280    /// If empty, everything from the claim is made available, otherwise
1281    /// only the result of this request.
1282    #[serde(default, skip_serializing_if = "Option::is_none")]
1283    pub request: Option<String>,
1284}
1285
1286/// SecurityContext holds container-level security attributes and common container settings.
1287/// Optional: Defaults to empty.  See type description for default values of each field.
1288#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1289pub struct ControllerConfigSecurityContext {
1290    /// AllowPrivilegeEscalation controls whether a process can gain more
1291    /// privileges than its parent process. This bool directly controls if
1292    /// the no_new_privs flag will be set on the container process.
1293    /// AllowPrivilegeEscalation is true always when the container is:
1294    /// 1) run as Privileged
1295    /// 2) has CAP_SYS_ADMIN
1296    /// Note that this field cannot be set when spec.os.name is windows.
1297    #[serde(default, skip_serializing_if = "Option::is_none", rename = "allowPrivilegeEscalation")]
1298    pub allow_privilege_escalation: Option<bool>,
1299    /// appArmorProfile is the AppArmor options to use by this container. If set, this profile
1300    /// overrides the pod's appArmorProfile.
1301    /// Note that this field cannot be set when spec.os.name is windows.
1302    #[serde(default, skip_serializing_if = "Option::is_none", rename = "appArmorProfile")]
1303    pub app_armor_profile: Option<ControllerConfigSecurityContextAppArmorProfile>,
1304    /// The capabilities to add/drop when running containers.
1305    /// Defaults to the default set of capabilities granted by the container runtime.
1306    /// Note that this field cannot be set when spec.os.name is windows.
1307    #[serde(default, skip_serializing_if = "Option::is_none")]
1308    pub capabilities: Option<ControllerConfigSecurityContextCapabilities>,
1309    /// Run container in privileged mode.
1310    /// Processes in privileged containers are essentially equivalent to root on the host.
1311    /// Defaults to false.
1312    /// Note that this field cannot be set when spec.os.name is windows.
1313    #[serde(default, skip_serializing_if = "Option::is_none")]
1314    pub privileged: Option<bool>,
1315    /// procMount denotes the type of proc mount to use for the containers.
1316    /// The default value is Default which uses the container runtime defaults for
1317    /// readonly paths and masked paths.
1318    /// This requires the ProcMountType feature flag to be enabled.
1319    /// Note that this field cannot be set when spec.os.name is windows.
1320    #[serde(default, skip_serializing_if = "Option::is_none", rename = "procMount")]
1321    pub proc_mount: Option<String>,
1322    /// Whether this container has a read-only root filesystem.
1323    /// Default is false.
1324    /// Note that this field cannot be set when spec.os.name is windows.
1325    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnlyRootFilesystem")]
1326    pub read_only_root_filesystem: Option<bool>,
1327    /// The GID to run the entrypoint of the container process.
1328    /// Uses runtime default if unset.
1329    /// May also be set in PodSecurityContext.  If set in both SecurityContext and
1330    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
1331    /// Note that this field cannot be set when spec.os.name is windows.
1332    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsGroup")]
1333    pub run_as_group: Option<i64>,
1334    /// Indicates that the container must run as a non-root user.
1335    /// If true, the Kubelet will validate the image at runtime to ensure that it
1336    /// does not run as UID 0 (root) and fail to start the container if it does.
1337    /// If unset or false, no such validation will be performed.
1338    /// May also be set in PodSecurityContext.  If set in both SecurityContext and
1339    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
1340    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsNonRoot")]
1341    pub run_as_non_root: Option<bool>,
1342    /// The UID to run the entrypoint of the container process.
1343    /// Defaults to user specified in image metadata if unspecified.
1344    /// May also be set in PodSecurityContext.  If set in both SecurityContext and
1345    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
1346    /// Note that this field cannot be set when spec.os.name is windows.
1347    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUser")]
1348    pub run_as_user: Option<i64>,
1349    /// The SELinux context to be applied to the container.
1350    /// If unspecified, the container runtime will allocate a random SELinux context for each
1351    /// container.  May also be set in PodSecurityContext.  If set in both SecurityContext and
1352    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
1353    /// Note that this field cannot be set when spec.os.name is windows.
1354    #[serde(default, skip_serializing_if = "Option::is_none", rename = "seLinuxOptions")]
1355    pub se_linux_options: Option<ControllerConfigSecurityContextSeLinuxOptions>,
1356    /// The seccomp options to use by this container. If seccomp options are
1357    /// provided at both the pod & container level, the container options
1358    /// override the pod options.
1359    /// Note that this field cannot be set when spec.os.name is windows.
1360    #[serde(default, skip_serializing_if = "Option::is_none", rename = "seccompProfile")]
1361    pub seccomp_profile: Option<ControllerConfigSecurityContextSeccompProfile>,
1362    /// The Windows specific settings applied to all containers.
1363    /// If unspecified, the options from the PodSecurityContext will be used.
1364    /// If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
1365    /// Note that this field cannot be set when spec.os.name is linux.
1366    #[serde(default, skip_serializing_if = "Option::is_none", rename = "windowsOptions")]
1367    pub windows_options: Option<ControllerConfigSecurityContextWindowsOptions>,
1368}
1369
1370/// appArmorProfile is the AppArmor options to use by this container. If set, this profile
1371/// overrides the pod's appArmorProfile.
1372/// Note that this field cannot be set when spec.os.name is windows.
1373#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1374pub struct ControllerConfigSecurityContextAppArmorProfile {
1375    /// localhostProfile indicates a profile loaded on the node that should be used.
1376    /// The profile must be preconfigured on the node to work.
1377    /// Must match the loaded name of the profile.
1378    /// Must be set if and only if type is "Localhost".
1379    #[serde(default, skip_serializing_if = "Option::is_none", rename = "localhostProfile")]
1380    pub localhost_profile: Option<String>,
1381    /// type indicates which kind of AppArmor profile will be applied.
1382    /// Valid options are:
1383    ///   Localhost - a profile pre-loaded on the node.
1384    ///   RuntimeDefault - the container runtime's default profile.
1385    ///   Unconfined - no AppArmor enforcement.
1386    #[serde(rename = "type")]
1387    pub r#type: String,
1388}
1389
1390/// The capabilities to add/drop when running containers.
1391/// Defaults to the default set of capabilities granted by the container runtime.
1392/// Note that this field cannot be set when spec.os.name is windows.
1393#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1394pub struct ControllerConfigSecurityContextCapabilities {
1395    /// Added capabilities
1396    #[serde(default, skip_serializing_if = "Option::is_none")]
1397    pub add: Option<Vec<String>>,
1398    /// Removed capabilities
1399    #[serde(default, skip_serializing_if = "Option::is_none")]
1400    pub drop: Option<Vec<String>>,
1401}
1402
1403/// The SELinux context to be applied to the container.
1404/// If unspecified, the container runtime will allocate a random SELinux context for each
1405/// container.  May also be set in PodSecurityContext.  If set in both SecurityContext and
1406/// PodSecurityContext, the value specified in SecurityContext takes precedence.
1407/// Note that this field cannot be set when spec.os.name is windows.
1408#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1409pub struct ControllerConfigSecurityContextSeLinuxOptions {
1410    /// Level is SELinux level label that applies to the container.
1411    #[serde(default, skip_serializing_if = "Option::is_none")]
1412    pub level: Option<String>,
1413    /// Role is a SELinux role label that applies to the container.
1414    #[serde(default, skip_serializing_if = "Option::is_none")]
1415    pub role: Option<String>,
1416    /// Type is a SELinux type label that applies to the container.
1417    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
1418    pub r#type: Option<String>,
1419    /// User is a SELinux user label that applies to the container.
1420    #[serde(default, skip_serializing_if = "Option::is_none")]
1421    pub user: Option<String>,
1422}
1423
1424/// The seccomp options to use by this container. If seccomp options are
1425/// provided at both the pod & container level, the container options
1426/// override the pod options.
1427/// Note that this field cannot be set when spec.os.name is windows.
1428#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1429pub struct ControllerConfigSecurityContextSeccompProfile {
1430    /// localhostProfile indicates a profile defined in a file on the node should be used.
1431    /// The profile must be preconfigured on the node to work.
1432    /// Must be a descending path, relative to the kubelet's configured seccomp profile location.
1433    /// Must be set if type is "Localhost". Must NOT be set for any other type.
1434    #[serde(default, skip_serializing_if = "Option::is_none", rename = "localhostProfile")]
1435    pub localhost_profile: Option<String>,
1436    /// type indicates which kind of seccomp profile will be applied.
1437    /// Valid options are:
1438    /// 
1439    /// Localhost - a profile defined in a file on the node should be used.
1440    /// RuntimeDefault - the container runtime default profile should be used.
1441    /// Unconfined - no profile should be applied.
1442    #[serde(rename = "type")]
1443    pub r#type: String,
1444}
1445
1446/// The Windows specific settings applied to all containers.
1447/// If unspecified, the options from the PodSecurityContext will be used.
1448/// If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence.
1449/// Note that this field cannot be set when spec.os.name is linux.
1450#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1451pub struct ControllerConfigSecurityContextWindowsOptions {
1452    /// GMSACredentialSpec is where the GMSA admission webhook
1453    /// (<https://github.com/kubernetes-sigs/windows-gmsa)> inlines the contents of the
1454    /// GMSA credential spec named by the GMSACredentialSpecName field.
1455    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpec")]
1456    pub gmsa_credential_spec: Option<String>,
1457    /// GMSACredentialSpecName is the name of the GMSA credential spec to use.
1458    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gmsaCredentialSpecName")]
1459    pub gmsa_credential_spec_name: Option<String>,
1460    /// HostProcess determines if a container should be run as a 'Host Process' container.
1461    /// All of a Pod's containers must have the same effective HostProcess value
1462    /// (it is not allowed to have a mix of HostProcess containers and non-HostProcess containers).
1463    /// In addition, if HostProcess is true then HostNetwork must also be set to true.
1464    #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostProcess")]
1465    pub host_process: Option<bool>,
1466    /// The UserName in Windows to run the entrypoint of the container process.
1467    /// Defaults to the user specified in image metadata if unspecified.
1468    /// May also be set in PodSecurityContext. If set in both SecurityContext and
1469    /// PodSecurityContext, the value specified in SecurityContext takes precedence.
1470    #[serde(default, skip_serializing_if = "Option::is_none", rename = "runAsUserName")]
1471    pub run_as_user_name: Option<String>,
1472}
1473
1474/// The pod this Toleration is attached to tolerates any taint that matches
1475/// the triple <key,value,effect> using the matching operator <operator>.
1476#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1477pub struct ControllerConfigTolerations {
1478    /// Effect indicates the taint effect to match. Empty means match all taint effects.
1479    /// When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
1480    #[serde(default, skip_serializing_if = "Option::is_none")]
1481    pub effect: Option<String>,
1482    /// Key is the taint key that the toleration applies to. Empty means match all taint keys.
1483    /// If the key is empty, operator must be Exists; this combination means to match all values and all keys.
1484    #[serde(default, skip_serializing_if = "Option::is_none")]
1485    pub key: Option<String>,
1486    /// Operator represents a key's relationship to the value.
1487    /// Valid operators are Exists and Equal. Defaults to Equal.
1488    /// Exists is equivalent to wildcard for value, so that a pod can
1489    /// tolerate all taints of a particular category.
1490    #[serde(default, skip_serializing_if = "Option::is_none")]
1491    pub operator: Option<String>,
1492    /// TolerationSeconds represents the period of time the toleration (which must be
1493    /// of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default,
1494    /// it is not set, which means tolerate the taint forever (do not evict). Zero and
1495    /// negative values will be treated as 0 (evict immediately) by the system.
1496    #[serde(default, skip_serializing_if = "Option::is_none", rename = "tolerationSeconds")]
1497    pub toleration_seconds: Option<i64>,
1498    /// Value is the taint value the toleration matches to.
1499    /// If the operator is Exists, the value should be empty, otherwise just a regular string.
1500    #[serde(default, skip_serializing_if = "Option::is_none")]
1501    pub value: Option<String>,
1502}
1503
1504/// VolumeMount describes a mounting of a Volume within a container.
1505#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1506pub struct ControllerConfigVolumeMounts {
1507    /// Path within the container at which the volume should be mounted.  Must
1508    /// not contain ':'.
1509    #[serde(rename = "mountPath")]
1510    pub mount_path: String,
1511    /// mountPropagation determines how mounts are propagated from the host
1512    /// to container and the other way around.
1513    /// When not set, MountPropagationNone is used.
1514    /// This field is beta in 1.10.
1515    /// When RecursiveReadOnly is set to IfPossible or to Enabled, MountPropagation must be None or unspecified
1516    /// (which defaults to None).
1517    #[serde(default, skip_serializing_if = "Option::is_none", rename = "mountPropagation")]
1518    pub mount_propagation: Option<String>,
1519    /// This must match the Name of a Volume.
1520    pub name: String,
1521    /// Mounted read-only if true, read-write otherwise (false or unspecified).
1522    /// Defaults to false.
1523    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
1524    pub read_only: Option<bool>,
1525    /// RecursiveReadOnly specifies whether read-only mounts should be handled
1526    /// recursively.
1527    /// 
1528    /// If ReadOnly is false, this field has no meaning and must be unspecified.
1529    /// 
1530    /// If ReadOnly is true, and this field is set to Disabled, the mount is not made
1531    /// recursively read-only.  If this field is set to IfPossible, the mount is made
1532    /// recursively read-only, if it is supported by the container runtime.  If this
1533    /// field is set to Enabled, the mount is made recursively read-only if it is
1534    /// supported by the container runtime, otherwise the pod will not be started and
1535    /// an error will be generated to indicate the reason.
1536    /// 
1537    /// If this field is set to IfPossible or Enabled, MountPropagation must be set to
1538    /// None (or be unspecified, which defaults to None).
1539    /// 
1540    /// If this field is not specified, it is treated as an equivalent of Disabled.
1541    #[serde(default, skip_serializing_if = "Option::is_none", rename = "recursiveReadOnly")]
1542    pub recursive_read_only: Option<String>,
1543    /// Path within the volume from which the container's volume should be mounted.
1544    /// Defaults to "" (volume's root).
1545    #[serde(default, skip_serializing_if = "Option::is_none", rename = "subPath")]
1546    pub sub_path: Option<String>,
1547    /// Expanded path within the volume from which the container's volume should be mounted.
1548    /// Behaves similarly to SubPath but environment variable references $(VAR_NAME) are expanded using the container's environment.
1549    /// Defaults to "" (volume's root).
1550    /// SubPathExpr and SubPath are mutually exclusive.
1551    #[serde(default, skip_serializing_if = "Option::is_none", rename = "subPathExpr")]
1552    pub sub_path_expr: Option<String>,
1553}
1554
1555/// Volume represents a named volume in a pod that may be accessed by any container in the pod.
1556#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1557pub struct ControllerConfigVolumes {
1558    /// awsElasticBlockStore represents an AWS Disk resource that is attached to a
1559    /// kubelet's host machine and then exposed to the pod.
1560    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore>
1561    #[serde(default, skip_serializing_if = "Option::is_none", rename = "awsElasticBlockStore")]
1562    pub aws_elastic_block_store: Option<ControllerConfigVolumesAwsElasticBlockStore>,
1563    /// azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
1564    #[serde(default, skip_serializing_if = "Option::is_none", rename = "azureDisk")]
1565    pub azure_disk: Option<ControllerConfigVolumesAzureDisk>,
1566    /// azureFile represents an Azure File Service mount on the host and bind mount to the pod.
1567    #[serde(default, skip_serializing_if = "Option::is_none", rename = "azureFile")]
1568    pub azure_file: Option<ControllerConfigVolumesAzureFile>,
1569    /// cephFS represents a Ceph FS mount on the host that shares a pod's lifetime
1570    #[serde(default, skip_serializing_if = "Option::is_none")]
1571    pub cephfs: Option<ControllerConfigVolumesCephfs>,
1572    /// cinder represents a cinder volume attached and mounted on kubelets host machine.
1573    /// More info: <https://examples.k8s.io/mysql-cinder-pd/README.md>
1574    #[serde(default, skip_serializing_if = "Option::is_none")]
1575    pub cinder: Option<ControllerConfigVolumesCinder>,
1576    /// configMap represents a configMap that should populate this volume
1577    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
1578    pub config_map: Option<ControllerConfigVolumesConfigMap>,
1579    /// csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
1580    #[serde(default, skip_serializing_if = "Option::is_none")]
1581    pub csi: Option<ControllerConfigVolumesCsi>,
1582    /// downwardAPI represents downward API about the pod that should populate this volume
1583    #[serde(default, skip_serializing_if = "Option::is_none", rename = "downwardAPI")]
1584    pub downward_api: Option<ControllerConfigVolumesDownwardApi>,
1585    /// emptyDir represents a temporary directory that shares a pod's lifetime.
1586    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#emptydir>
1587    #[serde(default, skip_serializing_if = "Option::is_none", rename = "emptyDir")]
1588    pub empty_dir: Option<ControllerConfigVolumesEmptyDir>,
1589    /// ephemeral represents a volume that is handled by a cluster storage driver.
1590    /// The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
1591    /// and deleted when the pod is removed.
1592    /// 
1593    /// Use this if:
1594    /// a) the volume is only needed while the pod runs,
1595    /// b) features of normal volumes like restoring from snapshot or capacity
1596    ///    tracking are needed,
1597    /// c) the storage driver is specified through a storage class, and
1598    /// d) the storage driver supports dynamic volume provisioning through
1599    ///    a PersistentVolumeClaim (see EphemeralVolumeSource for more
1600    ///    information on the connection between this volume type
1601    ///    and PersistentVolumeClaim).
1602    /// 
1603    /// Use PersistentVolumeClaim or one of the vendor-specific
1604    /// APIs for volumes that persist for longer than the lifecycle
1605    /// of an individual pod.
1606    /// 
1607    /// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to
1608    /// be used that way - see the documentation of the driver for
1609    /// more information.
1610    /// 
1611    /// A pod can use both types of ephemeral volumes and
1612    /// persistent volumes at the same time.
1613    #[serde(default, skip_serializing_if = "Option::is_none")]
1614    pub ephemeral: Option<ControllerConfigVolumesEphemeral>,
1615    /// fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
1616    #[serde(default, skip_serializing_if = "Option::is_none")]
1617    pub fc: Option<ControllerConfigVolumesFc>,
1618    /// flexVolume represents a generic volume resource that is
1619    /// provisioned/attached using an exec based plugin.
1620    #[serde(default, skip_serializing_if = "Option::is_none", rename = "flexVolume")]
1621    pub flex_volume: Option<ControllerConfigVolumesFlexVolume>,
1622    /// flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
1623    #[serde(default, skip_serializing_if = "Option::is_none")]
1624    pub flocker: Option<ControllerConfigVolumesFlocker>,
1625    /// gcePersistentDisk represents a GCE Disk resource that is attached to a
1626    /// kubelet's host machine and then exposed to the pod.
1627    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk>
1628    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gcePersistentDisk")]
1629    pub gce_persistent_disk: Option<ControllerConfigVolumesGcePersistentDisk>,
1630    /// gitRepo represents a git repository at a particular revision.
1631    /// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an
1632    /// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir
1633    /// into the Pod's container.
1634    #[serde(default, skip_serializing_if = "Option::is_none", rename = "gitRepo")]
1635    pub git_repo: Option<ControllerConfigVolumesGitRepo>,
1636    /// glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
1637    /// More info: <https://examples.k8s.io/volumes/glusterfs/README.md>
1638    #[serde(default, skip_serializing_if = "Option::is_none")]
1639    pub glusterfs: Option<ControllerConfigVolumesGlusterfs>,
1640    /// hostPath represents a pre-existing file or directory on the host
1641    /// machine that is directly exposed to the container. This is generally
1642    /// used for system agents or other privileged things that are allowed
1643    /// to see the host machine. Most containers will NOT need this.
1644    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#hostpath>
1645    #[serde(default, skip_serializing_if = "Option::is_none", rename = "hostPath")]
1646    pub host_path: Option<ControllerConfigVolumesHostPath>,
1647    /// image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine.
1648    /// The volume is resolved at pod startup depending on which PullPolicy value is provided:
1649    /// 
1650    /// - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails.
1651    /// - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present.
1652    /// - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.
1653    /// 
1654    /// The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation.
1655    /// A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
1656    /// The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
1657    /// The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
1658    /// The volume will be mounted read-only (ro) and non-executable files (noexec).
1659    /// Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath).
1660    /// The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
1661    #[serde(default, skip_serializing_if = "Option::is_none")]
1662    pub image: Option<ControllerConfigVolumesImage>,
1663    /// iscsi represents an ISCSI Disk resource that is attached to a
1664    /// kubelet's host machine and then exposed to the pod.
1665    /// More info: <https://examples.k8s.io/volumes/iscsi/README.md>
1666    #[serde(default, skip_serializing_if = "Option::is_none")]
1667    pub iscsi: Option<ControllerConfigVolumesIscsi>,
1668    /// name of the volume.
1669    /// Must be a DNS_LABEL and unique within the pod.
1670    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
1671    pub name: String,
1672    /// nfs represents an NFS mount on the host that shares a pod's lifetime
1673    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#nfs>
1674    #[serde(default, skip_serializing_if = "Option::is_none")]
1675    pub nfs: Option<ControllerConfigVolumesNfs>,
1676    /// persistentVolumeClaimVolumeSource represents a reference to a
1677    /// PersistentVolumeClaim in the same namespace.
1678    /// More info: <https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims>
1679    #[serde(default, skip_serializing_if = "Option::is_none", rename = "persistentVolumeClaim")]
1680    pub persistent_volume_claim: Option<ControllerConfigVolumesPersistentVolumeClaim>,
1681    /// photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
1682    #[serde(default, skip_serializing_if = "Option::is_none", rename = "photonPersistentDisk")]
1683    pub photon_persistent_disk: Option<ControllerConfigVolumesPhotonPersistentDisk>,
1684    /// portworxVolume represents a portworx volume attached and mounted on kubelets host machine
1685    #[serde(default, skip_serializing_if = "Option::is_none", rename = "portworxVolume")]
1686    pub portworx_volume: Option<ControllerConfigVolumesPortworxVolume>,
1687    /// projected items for all in one resources secrets, configmaps, and downward API
1688    #[serde(default, skip_serializing_if = "Option::is_none")]
1689    pub projected: Option<ControllerConfigVolumesProjected>,
1690    /// quobyte represents a Quobyte mount on the host that shares a pod's lifetime
1691    #[serde(default, skip_serializing_if = "Option::is_none")]
1692    pub quobyte: Option<ControllerConfigVolumesQuobyte>,
1693    /// rbd represents a Rados Block Device mount on the host that shares a pod's lifetime.
1694    /// More info: <https://examples.k8s.io/volumes/rbd/README.md>
1695    #[serde(default, skip_serializing_if = "Option::is_none")]
1696    pub rbd: Option<ControllerConfigVolumesRbd>,
1697    /// scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
1698    #[serde(default, skip_serializing_if = "Option::is_none", rename = "scaleIO")]
1699    pub scale_io: Option<ControllerConfigVolumesScaleIo>,
1700    /// secret represents a secret that should populate this volume.
1701    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#secret>
1702    #[serde(default, skip_serializing_if = "Option::is_none")]
1703    pub secret: Option<ControllerConfigVolumesSecret>,
1704    /// storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
1705    #[serde(default, skip_serializing_if = "Option::is_none")]
1706    pub storageos: Option<ControllerConfigVolumesStorageos>,
1707    /// vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
1708    #[serde(default, skip_serializing_if = "Option::is_none", rename = "vsphereVolume")]
1709    pub vsphere_volume: Option<ControllerConfigVolumesVsphereVolume>,
1710}
1711
1712/// awsElasticBlockStore represents an AWS Disk resource that is attached to a
1713/// kubelet's host machine and then exposed to the pod.
1714/// More info: <https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore>
1715#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1716pub struct ControllerConfigVolumesAwsElasticBlockStore {
1717    /// fsType is the filesystem type of the volume that you want to mount.
1718    /// Tip: Ensure that the filesystem type is supported by the host operating system.
1719    /// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
1720    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore>
1721    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
1722    pub fs_type: Option<String>,
1723    /// partition is the partition in the volume that you want to mount.
1724    /// If omitted, the default is to mount by volume name.
1725    /// Examples: For volume /dev/sda1, you specify the partition as "1".
1726    /// Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
1727    #[serde(default, skip_serializing_if = "Option::is_none")]
1728    pub partition: Option<i32>,
1729    /// readOnly value true will force the readOnly setting in VolumeMounts.
1730    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore>
1731    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
1732    pub read_only: Option<bool>,
1733    /// volumeID is unique ID of the persistent disk resource in AWS (Amazon EBS volume).
1734    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore>
1735    #[serde(rename = "volumeID")]
1736    pub volume_id: String,
1737}
1738
1739/// azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod.
1740#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1741pub struct ControllerConfigVolumesAzureDisk {
1742    /// cachingMode is the Host Caching mode: None, Read Only, Read Write.
1743    #[serde(default, skip_serializing_if = "Option::is_none", rename = "cachingMode")]
1744    pub caching_mode: Option<String>,
1745    /// diskName is the Name of the data disk in the blob storage
1746    #[serde(rename = "diskName")]
1747    pub disk_name: String,
1748    /// diskURI is the URI of data disk in the blob storage
1749    #[serde(rename = "diskURI")]
1750    pub disk_uri: String,
1751    /// fsType is Filesystem type to mount.
1752    /// Must be a filesystem type supported by the host operating system.
1753    /// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
1754    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
1755    pub fs_type: Option<String>,
1756    /// kind expected values are Shared: multiple blob disks per storage account  Dedicated: single blob disk per storage account  Managed: azure managed data disk (only in managed availability set). defaults to shared
1757    #[serde(default, skip_serializing_if = "Option::is_none")]
1758    pub kind: Option<String>,
1759    /// readOnly Defaults to false (read/write). ReadOnly here will force
1760    /// the ReadOnly setting in VolumeMounts.
1761    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
1762    pub read_only: Option<bool>,
1763}
1764
1765/// azureFile represents an Azure File Service mount on the host and bind mount to the pod.
1766#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1767pub struct ControllerConfigVolumesAzureFile {
1768    /// readOnly defaults to false (read/write). ReadOnly here will force
1769    /// the ReadOnly setting in VolumeMounts.
1770    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
1771    pub read_only: Option<bool>,
1772    /// secretName is the  name of secret that contains Azure Storage Account Name and Key
1773    #[serde(rename = "secretName")]
1774    pub secret_name: String,
1775    /// shareName is the azure share Name
1776    #[serde(rename = "shareName")]
1777    pub share_name: String,
1778}
1779
1780/// cephFS represents a Ceph FS mount on the host that shares a pod's lifetime
1781#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1782pub struct ControllerConfigVolumesCephfs {
1783    /// monitors is Required: Monitors is a collection of Ceph monitors
1784    /// More info: <https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it>
1785    pub monitors: Vec<String>,
1786    /// path is Optional: Used as the mounted root, rather than the full Ceph tree, default is /
1787    #[serde(default, skip_serializing_if = "Option::is_none")]
1788    pub path: Option<String>,
1789    /// readOnly is Optional: Defaults to false (read/write). ReadOnly here will force
1790    /// the ReadOnly setting in VolumeMounts.
1791    /// More info: <https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it>
1792    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
1793    pub read_only: Option<bool>,
1794    /// secretFile is Optional: SecretFile is the path to key ring for User, default is /etc/ceph/user.secret
1795    /// More info: <https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it>
1796    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretFile")]
1797    pub secret_file: Option<String>,
1798    /// secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty.
1799    /// More info: <https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it>
1800    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")]
1801    pub secret_ref: Option<ControllerConfigVolumesCephfsSecretRef>,
1802    /// user is optional: User is the rados user name, default is admin
1803    /// More info: <https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it>
1804    #[serde(default, skip_serializing_if = "Option::is_none")]
1805    pub user: Option<String>,
1806}
1807
1808/// secretRef is Optional: SecretRef is reference to the authentication secret for User, default is empty.
1809/// More info: <https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it>
1810#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1811pub struct ControllerConfigVolumesCephfsSecretRef {
1812    /// Name of the referent.
1813    /// This field is effectively required, but due to backwards compatibility is
1814    /// allowed to be empty. Instances of this type with an empty value here are
1815    /// almost certainly wrong.
1816    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
1817    #[serde(default, skip_serializing_if = "Option::is_none")]
1818    pub name: Option<String>,
1819}
1820
1821/// cinder represents a cinder volume attached and mounted on kubelets host machine.
1822/// More info: <https://examples.k8s.io/mysql-cinder-pd/README.md>
1823#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1824pub struct ControllerConfigVolumesCinder {
1825    /// fsType is the filesystem type to mount.
1826    /// Must be a filesystem type supported by the host operating system.
1827    /// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
1828    /// More info: <https://examples.k8s.io/mysql-cinder-pd/README.md>
1829    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
1830    pub fs_type: Option<String>,
1831    /// readOnly defaults to false (read/write). ReadOnly here will force
1832    /// the ReadOnly setting in VolumeMounts.
1833    /// More info: <https://examples.k8s.io/mysql-cinder-pd/README.md>
1834    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
1835    pub read_only: Option<bool>,
1836    /// secretRef is optional: points to a secret object containing parameters used to connect
1837    /// to OpenStack.
1838    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")]
1839    pub secret_ref: Option<ControllerConfigVolumesCinderSecretRef>,
1840    /// volumeID used to identify the volume in cinder.
1841    /// More info: <https://examples.k8s.io/mysql-cinder-pd/README.md>
1842    #[serde(rename = "volumeID")]
1843    pub volume_id: String,
1844}
1845
1846/// secretRef is optional: points to a secret object containing parameters used to connect
1847/// to OpenStack.
1848#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1849pub struct ControllerConfigVolumesCinderSecretRef {
1850    /// Name of the referent.
1851    /// This field is effectively required, but due to backwards compatibility is
1852    /// allowed to be empty. Instances of this type with an empty value here are
1853    /// almost certainly wrong.
1854    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
1855    #[serde(default, skip_serializing_if = "Option::is_none")]
1856    pub name: Option<String>,
1857}
1858
1859/// configMap represents a configMap that should populate this volume
1860#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1861pub struct ControllerConfigVolumesConfigMap {
1862    /// defaultMode is optional: mode bits used to set permissions on created files by default.
1863    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
1864    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
1865    /// Defaults to 0644.
1866    /// Directories within the path are not affected by this setting.
1867    /// This might be in conflict with other options that affect the file
1868    /// mode, like fsGroup, and the result can be other mode bits set.
1869    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")]
1870    pub default_mode: Option<i32>,
1871    /// items if unspecified, each key-value pair in the Data field of the referenced
1872    /// ConfigMap will be projected into the volume as a file whose name is the
1873    /// key and content is the value. If specified, the listed keys will be
1874    /// projected into the specified paths, and unlisted keys will not be
1875    /// present. If a key is specified which is not present in the ConfigMap,
1876    /// the volume setup will error unless it is marked optional. Paths must be
1877    /// relative and may not contain the '..' path or start with '..'.
1878    #[serde(default, skip_serializing_if = "Option::is_none")]
1879    pub items: Option<Vec<ControllerConfigVolumesConfigMapItems>>,
1880    /// Name of the referent.
1881    /// This field is effectively required, but due to backwards compatibility is
1882    /// allowed to be empty. Instances of this type with an empty value here are
1883    /// almost certainly wrong.
1884    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
1885    #[serde(default, skip_serializing_if = "Option::is_none")]
1886    pub name: Option<String>,
1887    /// optional specify whether the ConfigMap or its keys must be defined
1888    #[serde(default, skip_serializing_if = "Option::is_none")]
1889    pub optional: Option<bool>,
1890}
1891
1892/// Maps a string key to a path within a volume.
1893#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1894pub struct ControllerConfigVolumesConfigMapItems {
1895    /// key is the key to project.
1896    pub key: String,
1897    /// mode is Optional: mode bits used to set permissions on this file.
1898    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
1899    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
1900    /// If not specified, the volume defaultMode will be used.
1901    /// This might be in conflict with other options that affect the file
1902    /// mode, like fsGroup, and the result can be other mode bits set.
1903    #[serde(default, skip_serializing_if = "Option::is_none")]
1904    pub mode: Option<i32>,
1905    /// path is the relative path of the file to map the key to.
1906    /// May not be an absolute path.
1907    /// May not contain the path element '..'.
1908    /// May not start with the string '..'.
1909    pub path: String,
1910}
1911
1912/// csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature).
1913#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1914pub struct ControllerConfigVolumesCsi {
1915    /// driver is the name of the CSI driver that handles this volume.
1916    /// Consult with your admin for the correct name as registered in the cluster.
1917    pub driver: String,
1918    /// fsType to mount. Ex. "ext4", "xfs", "ntfs".
1919    /// If not provided, the empty value is passed to the associated CSI driver
1920    /// which will determine the default filesystem to apply.
1921    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
1922    pub fs_type: Option<String>,
1923    /// nodePublishSecretRef is a reference to the secret object containing
1924    /// sensitive information to pass to the CSI driver to complete the CSI
1925    /// NodePublishVolume and NodeUnpublishVolume calls.
1926    /// This field is optional, and  may be empty if no secret is required. If the
1927    /// secret object contains more than one secret, all secret references are passed.
1928    #[serde(default, skip_serializing_if = "Option::is_none", rename = "nodePublishSecretRef")]
1929    pub node_publish_secret_ref: Option<ControllerConfigVolumesCsiNodePublishSecretRef>,
1930    /// readOnly specifies a read-only configuration for the volume.
1931    /// Defaults to false (read/write).
1932    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
1933    pub read_only: Option<bool>,
1934    /// volumeAttributes stores driver-specific properties that are passed to the CSI
1935    /// driver. Consult your driver's documentation for supported values.
1936    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeAttributes")]
1937    pub volume_attributes: Option<BTreeMap<String, String>>,
1938}
1939
1940/// nodePublishSecretRef is a reference to the secret object containing
1941/// sensitive information to pass to the CSI driver to complete the CSI
1942/// NodePublishVolume and NodeUnpublishVolume calls.
1943/// This field is optional, and  may be empty if no secret is required. If the
1944/// secret object contains more than one secret, all secret references are passed.
1945#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1946pub struct ControllerConfigVolumesCsiNodePublishSecretRef {
1947    /// Name of the referent.
1948    /// This field is effectively required, but due to backwards compatibility is
1949    /// allowed to be empty. Instances of this type with an empty value here are
1950    /// almost certainly wrong.
1951    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
1952    #[serde(default, skip_serializing_if = "Option::is_none")]
1953    pub name: Option<String>,
1954}
1955
1956/// downwardAPI represents downward API about the pod that should populate this volume
1957#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1958pub struct ControllerConfigVolumesDownwardApi {
1959    /// Optional: mode bits to use on created files by default. Must be a
1960    /// Optional: mode bits used to set permissions on created files by default.
1961    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
1962    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
1963    /// Defaults to 0644.
1964    /// Directories within the path are not affected by this setting.
1965    /// This might be in conflict with other options that affect the file
1966    /// mode, like fsGroup, and the result can be other mode bits set.
1967    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")]
1968    pub default_mode: Option<i32>,
1969    /// Items is a list of downward API volume file
1970    #[serde(default, skip_serializing_if = "Option::is_none")]
1971    pub items: Option<Vec<ControllerConfigVolumesDownwardApiItems>>,
1972}
1973
1974/// DownwardAPIVolumeFile represents information to create the file containing the pod field
1975#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1976pub struct ControllerConfigVolumesDownwardApiItems {
1977    /// Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.
1978    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
1979    pub field_ref: Option<ControllerConfigVolumesDownwardApiItemsFieldRef>,
1980    /// Optional: mode bits used to set permissions on this file, must be an octal value
1981    /// between 0000 and 0777 or a decimal value between 0 and 511.
1982    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
1983    /// If not specified, the volume defaultMode will be used.
1984    /// This might be in conflict with other options that affect the file
1985    /// mode, like fsGroup, and the result can be other mode bits set.
1986    #[serde(default, skip_serializing_if = "Option::is_none")]
1987    pub mode: Option<i32>,
1988    /// Required: Path is  the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
1989    pub path: String,
1990    /// Selects a resource of the container: only resources limits and requests
1991    /// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
1992    #[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
1993    pub resource_field_ref: Option<ControllerConfigVolumesDownwardApiItemsResourceFieldRef>,
1994}
1995
1996/// Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.
1997#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
1998pub struct ControllerConfigVolumesDownwardApiItemsFieldRef {
1999    /// Version of the schema the FieldPath is written in terms of, defaults to "v1".
2000    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
2001    pub api_version: Option<String>,
2002    /// Path of the field to select in the specified API version.
2003    #[serde(rename = "fieldPath")]
2004    pub field_path: String,
2005}
2006
2007/// Selects a resource of the container: only resources limits and requests
2008/// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
2009#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2010pub struct ControllerConfigVolumesDownwardApiItemsResourceFieldRef {
2011    /// Container name: required for volumes, optional for env vars
2012    #[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
2013    pub container_name: Option<String>,
2014    /// Specifies the output format of the exposed resources, defaults to "1"
2015    #[serde(default, skip_serializing_if = "Option::is_none")]
2016    pub divisor: Option<IntOrString>,
2017    /// Required: resource to select
2018    pub resource: String,
2019}
2020
2021/// emptyDir represents a temporary directory that shares a pod's lifetime.
2022/// More info: <https://kubernetes.io/docs/concepts/storage/volumes#emptydir>
2023#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2024pub struct ControllerConfigVolumesEmptyDir {
2025    /// medium represents what type of storage medium should back this directory.
2026    /// The default is "" which means to use the node's default medium.
2027    /// Must be an empty string (default) or Memory.
2028    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#emptydir>
2029    #[serde(default, skip_serializing_if = "Option::is_none")]
2030    pub medium: Option<String>,
2031    /// sizeLimit is the total amount of local storage required for this EmptyDir volume.
2032    /// The size limit is also applicable for memory medium.
2033    /// The maximum usage on memory medium EmptyDir would be the minimum value between
2034    /// the SizeLimit specified here and the sum of memory limits of all containers in a pod.
2035    /// The default is nil which means that the limit is undefined.
2036    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#emptydir>
2037    #[serde(default, skip_serializing_if = "Option::is_none", rename = "sizeLimit")]
2038    pub size_limit: Option<IntOrString>,
2039}
2040
2041/// ephemeral represents a volume that is handled by a cluster storage driver.
2042/// The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts,
2043/// and deleted when the pod is removed.
2044/// 
2045/// Use this if:
2046/// a) the volume is only needed while the pod runs,
2047/// b) features of normal volumes like restoring from snapshot or capacity
2048///    tracking are needed,
2049/// c) the storage driver is specified through a storage class, and
2050/// d) the storage driver supports dynamic volume provisioning through
2051///    a PersistentVolumeClaim (see EphemeralVolumeSource for more
2052///    information on the connection between this volume type
2053///    and PersistentVolumeClaim).
2054/// 
2055/// Use PersistentVolumeClaim or one of the vendor-specific
2056/// APIs for volumes that persist for longer than the lifecycle
2057/// of an individual pod.
2058/// 
2059/// Use CSI for light-weight local ephemeral volumes if the CSI driver is meant to
2060/// be used that way - see the documentation of the driver for
2061/// more information.
2062/// 
2063/// A pod can use both types of ephemeral volumes and
2064/// persistent volumes at the same time.
2065#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2066pub struct ControllerConfigVolumesEphemeral {
2067    /// Will be used to create a stand-alone PVC to provision the volume.
2068    /// The pod in which this EphemeralVolumeSource is embedded will be the
2069    /// owner of the PVC, i.e. the PVC will be deleted together with the
2070    /// pod.  The name of the PVC will be `<pod name>-<volume name>` where
2071    /// `<volume name>` is the name from the `PodSpec.Volumes` array
2072    /// entry. Pod validation will reject the pod if the concatenated name
2073    /// is not valid for a PVC (for example, too long).
2074    /// 
2075    /// An existing PVC with that name that is not owned by the pod
2076    /// will *not* be used for the pod to avoid using an unrelated
2077    /// volume by mistake. Starting the pod is then blocked until
2078    /// the unrelated PVC is removed. If such a pre-created PVC is
2079    /// meant to be used by the pod, the PVC has to updated with an
2080    /// owner reference to the pod once the pod exists. Normally
2081    /// this should not be necessary, but it may be useful when
2082    /// manually reconstructing a broken cluster.
2083    /// 
2084    /// This field is read-only and no changes will be made by Kubernetes
2085    /// to the PVC after it has been created.
2086    /// 
2087    /// Required, must not be nil.
2088    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeClaimTemplate")]
2089    pub volume_claim_template: Option<ControllerConfigVolumesEphemeralVolumeClaimTemplate>,
2090}
2091
2092/// Will be used to create a stand-alone PVC to provision the volume.
2093/// The pod in which this EphemeralVolumeSource is embedded will be the
2094/// owner of the PVC, i.e. the PVC will be deleted together with the
2095/// pod.  The name of the PVC will be `<pod name>-<volume name>` where
2096/// `<volume name>` is the name from the `PodSpec.Volumes` array
2097/// entry. Pod validation will reject the pod if the concatenated name
2098/// is not valid for a PVC (for example, too long).
2099/// 
2100/// An existing PVC with that name that is not owned by the pod
2101/// will *not* be used for the pod to avoid using an unrelated
2102/// volume by mistake. Starting the pod is then blocked until
2103/// the unrelated PVC is removed. If such a pre-created PVC is
2104/// meant to be used by the pod, the PVC has to updated with an
2105/// owner reference to the pod once the pod exists. Normally
2106/// this should not be necessary, but it may be useful when
2107/// manually reconstructing a broken cluster.
2108/// 
2109/// This field is read-only and no changes will be made by Kubernetes
2110/// to the PVC after it has been created.
2111/// 
2112/// Required, must not be nil.
2113#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2114pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplate {
2115    /// May contain labels and annotations that will be copied into the PVC
2116    /// when creating it. No other fields are allowed and will be rejected during
2117    /// validation.
2118    #[serde(default, skip_serializing_if = "Option::is_none")]
2119    pub metadata: Option<ControllerConfigVolumesEphemeralVolumeClaimTemplateMetadata>,
2120    /// The specification for the PersistentVolumeClaim. The entire content is
2121    /// copied unchanged into the PVC that gets created from this
2122    /// template. The same fields as in a PersistentVolumeClaim
2123    /// are also valid here.
2124    pub spec: ControllerConfigVolumesEphemeralVolumeClaimTemplateSpec,
2125}
2126
2127/// May contain labels and annotations that will be copied into the PVC
2128/// when creating it. No other fields are allowed and will be rejected during
2129/// validation.
2130#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2131pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplateMetadata {
2132    #[serde(default, skip_serializing_if = "Option::is_none")]
2133    pub annotations: Option<BTreeMap<String, String>>,
2134    #[serde(default, skip_serializing_if = "Option::is_none")]
2135    pub finalizers: Option<Vec<String>>,
2136    #[serde(default, skip_serializing_if = "Option::is_none")]
2137    pub labels: Option<BTreeMap<String, String>>,
2138    #[serde(default, skip_serializing_if = "Option::is_none")]
2139    pub name: Option<String>,
2140    #[serde(default, skip_serializing_if = "Option::is_none")]
2141    pub namespace: Option<String>,
2142}
2143
2144/// The specification for the PersistentVolumeClaim. The entire content is
2145/// copied unchanged into the PVC that gets created from this
2146/// template. The same fields as in a PersistentVolumeClaim
2147/// are also valid here.
2148#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2149pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplateSpec {
2150    /// accessModes contains the desired access modes the volume should have.
2151    /// More info: <https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1>
2152    #[serde(default, skip_serializing_if = "Option::is_none", rename = "accessModes")]
2153    pub access_modes: Option<Vec<String>>,
2154    /// dataSource field can be used to specify either:
2155    /// * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
2156    /// * An existing PVC (PersistentVolumeClaim)
2157    /// If the provisioner or an external controller can support the specified data source,
2158    /// it will create a new volume based on the contents of the specified data source.
2159    /// When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef,
2160    /// and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified.
2161    /// If the namespace is specified, then dataSourceRef will not be copied to dataSource.
2162    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dataSource")]
2163    pub data_source: Option<ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecDataSource>,
2164    /// dataSourceRef specifies the object from which to populate the volume with data, if a non-empty
2165    /// volume is desired. This may be any object from a non-empty API group (non
2166    /// core object) or a PersistentVolumeClaim object.
2167    /// When this field is specified, volume binding will only succeed if the type of
2168    /// the specified object matches some installed volume populator or dynamic
2169    /// provisioner.
2170    /// This field will replace the functionality of the dataSource field and as such
2171    /// if both fields are non-empty, they must have the same value. For backwards
2172    /// compatibility, when namespace isn't specified in dataSourceRef,
2173    /// both fields (dataSource and dataSourceRef) will be set to the same
2174    /// value automatically if one of them is empty and the other is non-empty.
2175    /// When namespace is specified in dataSourceRef,
2176    /// dataSource isn't set to the same value and must be empty.
2177    /// There are three important differences between dataSource and dataSourceRef:
2178    /// * While dataSource only allows two specific types of objects, dataSourceRef
2179    ///   allows any non-core object, as well as PersistentVolumeClaim objects.
2180    /// * While dataSource ignores disallowed values (dropping them), dataSourceRef
2181    ///   preserves all values, and generates an error if a disallowed value is
2182    ///   specified.
2183    /// * While dataSource only allows local objects, dataSourceRef allows objects
2184    ///   in any namespaces.
2185    /// (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
2186    /// (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
2187    #[serde(default, skip_serializing_if = "Option::is_none", rename = "dataSourceRef")]
2188    pub data_source_ref: Option<ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecDataSourceRef>,
2189    /// resources represents the minimum resources the volume should have.
2190    /// If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
2191    /// that are lower than previous value but must still be higher than capacity recorded in the
2192    /// status field of the claim.
2193    /// More info: <https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources>
2194    #[serde(default, skip_serializing_if = "Option::is_none")]
2195    pub resources: Option<ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecResources>,
2196    /// selector is a label query over volumes to consider for binding.
2197    #[serde(default, skip_serializing_if = "Option::is_none")]
2198    pub selector: Option<ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecSelector>,
2199    /// storageClassName is the name of the StorageClass required by the claim.
2200    /// More info: <https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1>
2201    #[serde(default, skip_serializing_if = "Option::is_none", rename = "storageClassName")]
2202    pub storage_class_name: Option<String>,
2203    /// volumeAttributesClassName may be used to set the VolumeAttributesClass used by this claim.
2204    /// If specified, the CSI driver will create or update the volume with the attributes defined
2205    /// in the corresponding VolumeAttributesClass. This has a different purpose than storageClassName,
2206    /// it can be changed after the claim is created. An empty string value means that no VolumeAttributesClass
2207    /// will be applied to the claim but it's not allowed to reset this field to empty string once it is set.
2208    /// If unspecified and the PersistentVolumeClaim is unbound, the default VolumeAttributesClass
2209    /// will be set by the persistentvolume controller if it exists.
2210    /// If the resource referred to by volumeAttributesClass does not exist, this PersistentVolumeClaim will be
2211    /// set to a Pending state, as reflected by the modifyVolumeStatus field, until such as a resource
2212    /// exists.
2213    /// More info: <https://kubernetes.io/docs/concepts/storage/volume-attributes-classes/>
2214    /// (Beta) Using this field requires the VolumeAttributesClass feature gate to be enabled (off by default).
2215    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeAttributesClassName")]
2216    pub volume_attributes_class_name: Option<String>,
2217    /// volumeMode defines what type of volume is required by the claim.
2218    /// Value of Filesystem is implied when not included in claim spec.
2219    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeMode")]
2220    pub volume_mode: Option<String>,
2221    /// volumeName is the binding reference to the PersistentVolume backing this claim.
2222    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeName")]
2223    pub volume_name: Option<String>,
2224}
2225
2226/// dataSource field can be used to specify either:
2227/// * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot)
2228/// * An existing PVC (PersistentVolumeClaim)
2229/// If the provisioner or an external controller can support the specified data source,
2230/// it will create a new volume based on the contents of the specified data source.
2231/// When the AnyVolumeDataSource feature gate is enabled, dataSource contents will be copied to dataSourceRef,
2232/// and dataSourceRef contents will be copied to dataSource when dataSourceRef.namespace is not specified.
2233/// If the namespace is specified, then dataSourceRef will not be copied to dataSource.
2234#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2235pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecDataSource {
2236    /// APIGroup is the group for the resource being referenced.
2237    /// If APIGroup is not specified, the specified Kind must be in the core API group.
2238    /// For any other third-party types, APIGroup is required.
2239    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiGroup")]
2240    pub api_group: Option<String>,
2241    /// Kind is the type of resource being referenced
2242    pub kind: String,
2243    /// Name is the name of resource being referenced
2244    pub name: String,
2245}
2246
2247/// dataSourceRef specifies the object from which to populate the volume with data, if a non-empty
2248/// volume is desired. This may be any object from a non-empty API group (non
2249/// core object) or a PersistentVolumeClaim object.
2250/// When this field is specified, volume binding will only succeed if the type of
2251/// the specified object matches some installed volume populator or dynamic
2252/// provisioner.
2253/// This field will replace the functionality of the dataSource field and as such
2254/// if both fields are non-empty, they must have the same value. For backwards
2255/// compatibility, when namespace isn't specified in dataSourceRef,
2256/// both fields (dataSource and dataSourceRef) will be set to the same
2257/// value automatically if one of them is empty and the other is non-empty.
2258/// When namespace is specified in dataSourceRef,
2259/// dataSource isn't set to the same value and must be empty.
2260/// There are three important differences between dataSource and dataSourceRef:
2261/// * While dataSource only allows two specific types of objects, dataSourceRef
2262///   allows any non-core object, as well as PersistentVolumeClaim objects.
2263/// * While dataSource ignores disallowed values (dropping them), dataSourceRef
2264///   preserves all values, and generates an error if a disallowed value is
2265///   specified.
2266/// * While dataSource only allows local objects, dataSourceRef allows objects
2267///   in any namespaces.
2268/// (Beta) Using this field requires the AnyVolumeDataSource feature gate to be enabled.
2269/// (Alpha) Using the namespace field of dataSourceRef requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
2270#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2271pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecDataSourceRef {
2272    /// APIGroup is the group for the resource being referenced.
2273    /// If APIGroup is not specified, the specified Kind must be in the core API group.
2274    /// For any other third-party types, APIGroup is required.
2275    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiGroup")]
2276    pub api_group: Option<String>,
2277    /// Kind is the type of resource being referenced
2278    pub kind: String,
2279    /// Name is the name of resource being referenced
2280    pub name: String,
2281    /// Namespace is the namespace of resource being referenced
2282    /// Note that when a namespace is specified, a gateway.networking.k8s.io/ReferenceGrant object is required in the referent namespace to allow that namespace's owner to accept the reference. See the ReferenceGrant documentation for details.
2283    /// (Alpha) This field requires the CrossNamespaceVolumeDataSource feature gate to be enabled.
2284    #[serde(default, skip_serializing_if = "Option::is_none")]
2285    pub namespace: Option<String>,
2286}
2287
2288/// resources represents the minimum resources the volume should have.
2289/// If RecoverVolumeExpansionFailure feature is enabled users are allowed to specify resource requirements
2290/// that are lower than previous value but must still be higher than capacity recorded in the
2291/// status field of the claim.
2292/// More info: <https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources>
2293#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2294pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecResources {
2295    /// Limits describes the maximum amount of compute resources allowed.
2296    /// More info: <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>
2297    #[serde(default, skip_serializing_if = "Option::is_none")]
2298    pub limits: Option<BTreeMap<String, IntOrString>>,
2299    /// Requests describes the minimum amount of compute resources required.
2300    /// If Requests is omitted for a container, it defaults to Limits if that is explicitly specified,
2301    /// otherwise to an implementation-defined value. Requests cannot exceed Limits.
2302    /// More info: <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>
2303    #[serde(default, skip_serializing_if = "Option::is_none")]
2304    pub requests: Option<BTreeMap<String, IntOrString>>,
2305}
2306
2307/// selector is a label query over volumes to consider for binding.
2308#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2309pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecSelector {
2310    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
2311    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2312    pub match_expressions: Option<Vec<ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecSelectorMatchExpressions>>,
2313    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
2314    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
2315    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
2316    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
2317    pub match_labels: Option<BTreeMap<String, String>>,
2318}
2319
2320/// A label selector requirement is a selector that contains values, a key, and an operator that
2321/// relates the key and values.
2322#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2323pub struct ControllerConfigVolumesEphemeralVolumeClaimTemplateSpecSelectorMatchExpressions {
2324    /// key is the label key that the selector applies to.
2325    pub key: String,
2326    /// operator represents a key's relationship to a set of values.
2327    /// Valid operators are In, NotIn, Exists and DoesNotExist.
2328    pub operator: String,
2329    /// values is an array of string values. If the operator is In or NotIn,
2330    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2331    /// the values array must be empty. This array is replaced during a strategic
2332    /// merge patch.
2333    #[serde(default, skip_serializing_if = "Option::is_none")]
2334    pub values: Option<Vec<String>>,
2335}
2336
2337/// fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod.
2338#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2339pub struct ControllerConfigVolumesFc {
2340    /// fsType is the filesystem type to mount.
2341    /// Must be a filesystem type supported by the host operating system.
2342    /// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
2343    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
2344    pub fs_type: Option<String>,
2345    /// lun is Optional: FC target lun number
2346    #[serde(default, skip_serializing_if = "Option::is_none")]
2347    pub lun: Option<i32>,
2348    /// readOnly is Optional: Defaults to false (read/write). ReadOnly here will force
2349    /// the ReadOnly setting in VolumeMounts.
2350    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2351    pub read_only: Option<bool>,
2352    /// targetWWNs is Optional: FC target worldwide names (WWNs)
2353    #[serde(default, skip_serializing_if = "Option::is_none", rename = "targetWWNs")]
2354    pub target_ww_ns: Option<Vec<String>>,
2355    /// wwids Optional: FC volume world wide identifiers (wwids)
2356    /// Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.
2357    #[serde(default, skip_serializing_if = "Option::is_none")]
2358    pub wwids: Option<Vec<String>>,
2359}
2360
2361/// flexVolume represents a generic volume resource that is
2362/// provisioned/attached using an exec based plugin.
2363#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2364pub struct ControllerConfigVolumesFlexVolume {
2365    /// driver is the name of the driver to use for this volume.
2366    pub driver: String,
2367    /// fsType is the filesystem type to mount.
2368    /// Must be a filesystem type supported by the host operating system.
2369    /// Ex. "ext4", "xfs", "ntfs". The default filesystem depends on FlexVolume script.
2370    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
2371    pub fs_type: Option<String>,
2372    /// options is Optional: this field holds extra command options if any.
2373    #[serde(default, skip_serializing_if = "Option::is_none")]
2374    pub options: Option<BTreeMap<String, String>>,
2375    /// readOnly is Optional: defaults to false (read/write). ReadOnly here will force
2376    /// the ReadOnly setting in VolumeMounts.
2377    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2378    pub read_only: Option<bool>,
2379    /// secretRef is Optional: secretRef is reference to the secret object containing
2380    /// sensitive information to pass to the plugin scripts. This may be
2381    /// empty if no secret object is specified. If the secret object
2382    /// contains more than one secret, all secrets are passed to the plugin
2383    /// scripts.
2384    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")]
2385    pub secret_ref: Option<ControllerConfigVolumesFlexVolumeSecretRef>,
2386}
2387
2388/// secretRef is Optional: secretRef is reference to the secret object containing
2389/// sensitive information to pass to the plugin scripts. This may be
2390/// empty if no secret object is specified. If the secret object
2391/// contains more than one secret, all secrets are passed to the plugin
2392/// scripts.
2393#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2394pub struct ControllerConfigVolumesFlexVolumeSecretRef {
2395    /// Name of the referent.
2396    /// This field is effectively required, but due to backwards compatibility is
2397    /// allowed to be empty. Instances of this type with an empty value here are
2398    /// almost certainly wrong.
2399    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
2400    #[serde(default, skip_serializing_if = "Option::is_none")]
2401    pub name: Option<String>,
2402}
2403
2404/// flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running
2405#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2406pub struct ControllerConfigVolumesFlocker {
2407    /// datasetName is Name of the dataset stored as metadata -> name on the dataset for Flocker
2408    /// should be considered as deprecated
2409    #[serde(default, skip_serializing_if = "Option::is_none", rename = "datasetName")]
2410    pub dataset_name: Option<String>,
2411    /// datasetUUID is the UUID of the dataset. This is unique identifier of a Flocker dataset
2412    #[serde(default, skip_serializing_if = "Option::is_none", rename = "datasetUUID")]
2413    pub dataset_uuid: Option<String>,
2414}
2415
2416/// gcePersistentDisk represents a GCE Disk resource that is attached to a
2417/// kubelet's host machine and then exposed to the pod.
2418/// More info: <https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk>
2419#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2420pub struct ControllerConfigVolumesGcePersistentDisk {
2421    /// fsType is filesystem type of the volume that you want to mount.
2422    /// Tip: Ensure that the filesystem type is supported by the host operating system.
2423    /// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
2424    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk>
2425    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
2426    pub fs_type: Option<String>,
2427    /// partition is the partition in the volume that you want to mount.
2428    /// If omitted, the default is to mount by volume name.
2429    /// Examples: For volume /dev/sda1, you specify the partition as "1".
2430    /// Similarly, the volume partition for /dev/sda is "0" (or you can leave the property empty).
2431    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk>
2432    #[serde(default, skip_serializing_if = "Option::is_none")]
2433    pub partition: Option<i32>,
2434    /// pdName is unique name of the PD resource in GCE. Used to identify the disk in GCE.
2435    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk>
2436    #[serde(rename = "pdName")]
2437    pub pd_name: String,
2438    /// readOnly here will force the ReadOnly setting in VolumeMounts.
2439    /// Defaults to false.
2440    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk>
2441    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2442    pub read_only: Option<bool>,
2443}
2444
2445/// gitRepo represents a git repository at a particular revision.
2446/// DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an
2447/// EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir
2448/// into the Pod's container.
2449#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2450pub struct ControllerConfigVolumesGitRepo {
2451    /// directory is the target directory name.
2452    /// Must not contain or start with '..'.  If '.' is supplied, the volume directory will be the
2453    /// git repository.  Otherwise, if specified, the volume will contain the git repository in
2454    /// the subdirectory with the given name.
2455    #[serde(default, skip_serializing_if = "Option::is_none")]
2456    pub directory: Option<String>,
2457    /// repository is the URL
2458    pub repository: String,
2459    /// revision is the commit hash for the specified revision.
2460    #[serde(default, skip_serializing_if = "Option::is_none")]
2461    pub revision: Option<String>,
2462}
2463
2464/// glusterfs represents a Glusterfs mount on the host that shares a pod's lifetime.
2465/// More info: <https://examples.k8s.io/volumes/glusterfs/README.md>
2466#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2467pub struct ControllerConfigVolumesGlusterfs {
2468    /// endpoints is the endpoint name that details Glusterfs topology.
2469    /// More info: <https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod>
2470    pub endpoints: String,
2471    /// path is the Glusterfs volume path.
2472    /// More info: <https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod>
2473    pub path: String,
2474    /// readOnly here will force the Glusterfs volume to be mounted with read-only permissions.
2475    /// Defaults to false.
2476    /// More info: <https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod>
2477    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2478    pub read_only: Option<bool>,
2479}
2480
2481/// hostPath represents a pre-existing file or directory on the host
2482/// machine that is directly exposed to the container. This is generally
2483/// used for system agents or other privileged things that are allowed
2484/// to see the host machine. Most containers will NOT need this.
2485/// More info: <https://kubernetes.io/docs/concepts/storage/volumes#hostpath>
2486#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2487pub struct ControllerConfigVolumesHostPath {
2488    /// path of the directory on the host.
2489    /// If the path is a symlink, it will follow the link to the real path.
2490    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#hostpath>
2491    pub path: String,
2492    /// type for HostPath Volume
2493    /// Defaults to ""
2494    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#hostpath>
2495    #[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
2496    pub r#type: Option<String>,
2497}
2498
2499/// image represents an OCI object (a container image or artifact) pulled and mounted on the kubelet's host machine.
2500/// The volume is resolved at pod startup depending on which PullPolicy value is provided:
2501/// 
2502/// - Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails.
2503/// - Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present.
2504/// - IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.
2505/// 
2506/// The volume gets re-resolved if the pod gets deleted and recreated, which means that new remote content will become available on pod recreation.
2507/// A failure to resolve or pull the image during pod startup will block containers from starting and may add significant latency. Failures will be retried using normal volume backoff and will be reported on the pod reason and message.
2508/// The types of objects that may be mounted by this volume are defined by the container runtime implementation on a host machine and at minimum must include all valid types supported by the container image field.
2509/// The OCI object gets mounted in a single directory (spec.containers[*].volumeMounts.mountPath) by merging the manifest layers in the same way as for container images.
2510/// The volume will be mounted read-only (ro) and non-executable files (noexec).
2511/// Sub path mounts for containers are not supported (spec.containers[*].volumeMounts.subpath).
2512/// The field spec.securityContext.fsGroupChangePolicy has no effect on this volume type.
2513#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2514pub struct ControllerConfigVolumesImage {
2515    /// Policy for pulling OCI objects. Possible values are:
2516    /// Always: the kubelet always attempts to pull the reference. Container creation will fail If the pull fails.
2517    /// Never: the kubelet never pulls the reference and only uses a local image or artifact. Container creation will fail if the reference isn't present.
2518    /// IfNotPresent: the kubelet pulls if the reference isn't already present on disk. Container creation will fail if the reference isn't present and the pull fails.
2519    /// Defaults to Always if :latest tag is specified, or IfNotPresent otherwise.
2520    #[serde(default, skip_serializing_if = "Option::is_none", rename = "pullPolicy")]
2521    pub pull_policy: Option<String>,
2522    /// Required: Image or artifact reference to be used.
2523    /// Behaves in the same way as pod.spec.containers[*].image.
2524    /// Pull secrets will be assembled in the same way as for the container image by looking up node credentials, SA image pull secrets, and pod spec image pull secrets.
2525    /// More info: <https://kubernetes.io/docs/concepts/containers/images>
2526    /// This field is optional to allow higher level config management to default or override
2527    /// container images in workload controllers like Deployments and StatefulSets.
2528    #[serde(default, skip_serializing_if = "Option::is_none")]
2529    pub reference: Option<String>,
2530}
2531
2532/// iscsi represents an ISCSI Disk resource that is attached to a
2533/// kubelet's host machine and then exposed to the pod.
2534/// More info: <https://examples.k8s.io/volumes/iscsi/README.md>
2535#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2536pub struct ControllerConfigVolumesIscsi {
2537    /// chapAuthDiscovery defines whether support iSCSI Discovery CHAP authentication
2538    #[serde(default, skip_serializing_if = "Option::is_none", rename = "chapAuthDiscovery")]
2539    pub chap_auth_discovery: Option<bool>,
2540    /// chapAuthSession defines whether support iSCSI Session CHAP authentication
2541    #[serde(default, skip_serializing_if = "Option::is_none", rename = "chapAuthSession")]
2542    pub chap_auth_session: Option<bool>,
2543    /// fsType is the filesystem type of the volume that you want to mount.
2544    /// Tip: Ensure that the filesystem type is supported by the host operating system.
2545    /// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
2546    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#iscsi>
2547    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
2548    pub fs_type: Option<String>,
2549    /// initiatorName is the custom iSCSI Initiator Name.
2550    /// If initiatorName is specified with iscsiInterface simultaneously, new iSCSI interface
2551    /// <target portal>:<volume name> will be created for the connection.
2552    #[serde(default, skip_serializing_if = "Option::is_none", rename = "initiatorName")]
2553    pub initiator_name: Option<String>,
2554    /// iqn is the target iSCSI Qualified Name.
2555    pub iqn: String,
2556    /// iscsiInterface is the interface Name that uses an iSCSI transport.
2557    /// Defaults to 'default' (tcp).
2558    #[serde(default, skip_serializing_if = "Option::is_none", rename = "iscsiInterface")]
2559    pub iscsi_interface: Option<String>,
2560    /// lun represents iSCSI Target Lun number.
2561    pub lun: i32,
2562    /// portals is the iSCSI Target Portal List. The portal is either an IP or ip_addr:port if the port
2563    /// is other than default (typically TCP ports 860 and 3260).
2564    #[serde(default, skip_serializing_if = "Option::is_none")]
2565    pub portals: Option<Vec<String>>,
2566    /// readOnly here will force the ReadOnly setting in VolumeMounts.
2567    /// Defaults to false.
2568    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2569    pub read_only: Option<bool>,
2570    /// secretRef is the CHAP Secret for iSCSI target and initiator authentication
2571    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")]
2572    pub secret_ref: Option<ControllerConfigVolumesIscsiSecretRef>,
2573    /// targetPortal is iSCSI Target Portal. The Portal is either an IP or ip_addr:port if the port
2574    /// is other than default (typically TCP ports 860 and 3260).
2575    #[serde(rename = "targetPortal")]
2576    pub target_portal: String,
2577}
2578
2579/// secretRef is the CHAP Secret for iSCSI target and initiator authentication
2580#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2581pub struct ControllerConfigVolumesIscsiSecretRef {
2582    /// Name of the referent.
2583    /// This field is effectively required, but due to backwards compatibility is
2584    /// allowed to be empty. Instances of this type with an empty value here are
2585    /// almost certainly wrong.
2586    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
2587    #[serde(default, skip_serializing_if = "Option::is_none")]
2588    pub name: Option<String>,
2589}
2590
2591/// nfs represents an NFS mount on the host that shares a pod's lifetime
2592/// More info: <https://kubernetes.io/docs/concepts/storage/volumes#nfs>
2593#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2594pub struct ControllerConfigVolumesNfs {
2595    /// path that is exported by the NFS server.
2596    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#nfs>
2597    pub path: String,
2598    /// readOnly here will force the NFS export to be mounted with read-only permissions.
2599    /// Defaults to false.
2600    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#nfs>
2601    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2602    pub read_only: Option<bool>,
2603    /// server is the hostname or IP address of the NFS server.
2604    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#nfs>
2605    pub server: String,
2606}
2607
2608/// persistentVolumeClaimVolumeSource represents a reference to a
2609/// PersistentVolumeClaim in the same namespace.
2610/// More info: <https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims>
2611#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2612pub struct ControllerConfigVolumesPersistentVolumeClaim {
2613    /// claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume.
2614    /// More info: <https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims>
2615    #[serde(rename = "claimName")]
2616    pub claim_name: String,
2617    /// readOnly Will force the ReadOnly setting in VolumeMounts.
2618    /// Default false.
2619    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2620    pub read_only: Option<bool>,
2621}
2622
2623/// photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine
2624#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2625pub struct ControllerConfigVolumesPhotonPersistentDisk {
2626    /// fsType is the filesystem type to mount.
2627    /// Must be a filesystem type supported by the host operating system.
2628    /// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
2629    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
2630    pub fs_type: Option<String>,
2631    /// pdID is the ID that identifies Photon Controller persistent disk
2632    #[serde(rename = "pdID")]
2633    pub pd_id: String,
2634}
2635
2636/// portworxVolume represents a portworx volume attached and mounted on kubelets host machine
2637#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2638pub struct ControllerConfigVolumesPortworxVolume {
2639    /// fSType represents the filesystem type to mount
2640    /// Must be a filesystem type supported by the host operating system.
2641    /// Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified.
2642    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
2643    pub fs_type: Option<String>,
2644    /// readOnly defaults to false (read/write). ReadOnly here will force
2645    /// the ReadOnly setting in VolumeMounts.
2646    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2647    pub read_only: Option<bool>,
2648    /// volumeID uniquely identifies a Portworx volume
2649    #[serde(rename = "volumeID")]
2650    pub volume_id: String,
2651}
2652
2653/// projected items for all in one resources secrets, configmaps, and downward API
2654#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2655pub struct ControllerConfigVolumesProjected {
2656    /// defaultMode are the mode bits used to set permissions on created files by default.
2657    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
2658    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
2659    /// Directories within the path are not affected by this setting.
2660    /// This might be in conflict with other options that affect the file
2661    /// mode, like fsGroup, and the result can be other mode bits set.
2662    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")]
2663    pub default_mode: Option<i32>,
2664    /// sources is the list of volume projections. Each entry in this list
2665    /// handles one source.
2666    #[serde(default, skip_serializing_if = "Option::is_none")]
2667    pub sources: Option<Vec<ControllerConfigVolumesProjectedSources>>,
2668}
2669
2670/// Projection that may be projected along with other supported volume types.
2671/// Exactly one of these fields must be set.
2672#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2673pub struct ControllerConfigVolumesProjectedSources {
2674    /// ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field
2675    /// of ClusterTrustBundle objects in an auto-updating file.
2676    /// 
2677    /// Alpha, gated by the ClusterTrustBundleProjection feature gate.
2678    /// 
2679    /// ClusterTrustBundle objects can either be selected by name, or by the
2680    /// combination of signer name and a label selector.
2681    /// 
2682    /// Kubelet performs aggressive normalization of the PEM contents written
2683    /// into the pod filesystem.  Esoteric PEM features such as inter-block
2684    /// comments and block headers are stripped.  Certificates are deduplicated.
2685    /// The ordering of certificates within the file is arbitrary, and Kubelet
2686    /// may change the order over time.
2687    #[serde(default, skip_serializing_if = "Option::is_none", rename = "clusterTrustBundle")]
2688    pub cluster_trust_bundle: Option<ControllerConfigVolumesProjectedSourcesClusterTrustBundle>,
2689    /// configMap information about the configMap data to project
2690    #[serde(default, skip_serializing_if = "Option::is_none", rename = "configMap")]
2691    pub config_map: Option<ControllerConfigVolumesProjectedSourcesConfigMap>,
2692    /// downwardAPI information about the downwardAPI data to project
2693    #[serde(default, skip_serializing_if = "Option::is_none", rename = "downwardAPI")]
2694    pub downward_api: Option<ControllerConfigVolumesProjectedSourcesDownwardApi>,
2695    /// secret information about the secret data to project
2696    #[serde(default, skip_serializing_if = "Option::is_none")]
2697    pub secret: Option<ControllerConfigVolumesProjectedSourcesSecret>,
2698    /// serviceAccountToken is information about the serviceAccountToken data to project
2699    #[serde(default, skip_serializing_if = "Option::is_none", rename = "serviceAccountToken")]
2700    pub service_account_token: Option<ControllerConfigVolumesProjectedSourcesServiceAccountToken>,
2701}
2702
2703/// ClusterTrustBundle allows a pod to access the `.spec.trustBundle` field
2704/// of ClusterTrustBundle objects in an auto-updating file.
2705/// 
2706/// Alpha, gated by the ClusterTrustBundleProjection feature gate.
2707/// 
2708/// ClusterTrustBundle objects can either be selected by name, or by the
2709/// combination of signer name and a label selector.
2710/// 
2711/// Kubelet performs aggressive normalization of the PEM contents written
2712/// into the pod filesystem.  Esoteric PEM features such as inter-block
2713/// comments and block headers are stripped.  Certificates are deduplicated.
2714/// The ordering of certificates within the file is arbitrary, and Kubelet
2715/// may change the order over time.
2716#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2717pub struct ControllerConfigVolumesProjectedSourcesClusterTrustBundle {
2718    /// Select all ClusterTrustBundles that match this label selector.  Only has
2719    /// effect if signerName is set.  Mutually-exclusive with name.  If unset,
2720    /// interpreted as "match nothing".  If set but empty, interpreted as "match
2721    /// everything".
2722    #[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
2723    pub label_selector: Option<ControllerConfigVolumesProjectedSourcesClusterTrustBundleLabelSelector>,
2724    /// Select a single ClusterTrustBundle by object name.  Mutually-exclusive
2725    /// with signerName and labelSelector.
2726    #[serde(default, skip_serializing_if = "Option::is_none")]
2727    pub name: Option<String>,
2728    /// If true, don't block pod startup if the referenced ClusterTrustBundle(s)
2729    /// aren't available.  If using name, then the named ClusterTrustBundle is
2730    /// allowed not to exist.  If using signerName, then the combination of
2731    /// signerName and labelSelector is allowed to match zero
2732    /// ClusterTrustBundles.
2733    #[serde(default, skip_serializing_if = "Option::is_none")]
2734    pub optional: Option<bool>,
2735    /// Relative path from the volume root to write the bundle.
2736    pub path: String,
2737    /// Select all ClusterTrustBundles that match this signer name.
2738    /// Mutually-exclusive with name.  The contents of all selected
2739    /// ClusterTrustBundles will be unified and deduplicated.
2740    #[serde(default, skip_serializing_if = "Option::is_none", rename = "signerName")]
2741    pub signer_name: Option<String>,
2742}
2743
2744/// Select all ClusterTrustBundles that match this label selector.  Only has
2745/// effect if signerName is set.  Mutually-exclusive with name.  If unset,
2746/// interpreted as "match nothing".  If set but empty, interpreted as "match
2747/// everything".
2748#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2749pub struct ControllerConfigVolumesProjectedSourcesClusterTrustBundleLabelSelector {
2750    /// matchExpressions is a list of label selector requirements. The requirements are ANDed.
2751    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
2752    pub match_expressions: Option<Vec<ControllerConfigVolumesProjectedSourcesClusterTrustBundleLabelSelectorMatchExpressions>>,
2753    /// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels
2754    /// map is equivalent to an element of matchExpressions, whose key field is "key", the
2755    /// operator is "In", and the values array contains only "value". The requirements are ANDed.
2756    #[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
2757    pub match_labels: Option<BTreeMap<String, String>>,
2758}
2759
2760/// A label selector requirement is a selector that contains values, a key, and an operator that
2761/// relates the key and values.
2762#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2763pub struct ControllerConfigVolumesProjectedSourcesClusterTrustBundleLabelSelectorMatchExpressions {
2764    /// key is the label key that the selector applies to.
2765    pub key: String,
2766    /// operator represents a key's relationship to a set of values.
2767    /// Valid operators are In, NotIn, Exists and DoesNotExist.
2768    pub operator: String,
2769    /// values is an array of string values. If the operator is In or NotIn,
2770    /// the values array must be non-empty. If the operator is Exists or DoesNotExist,
2771    /// the values array must be empty. This array is replaced during a strategic
2772    /// merge patch.
2773    #[serde(default, skip_serializing_if = "Option::is_none")]
2774    pub values: Option<Vec<String>>,
2775}
2776
2777/// configMap information about the configMap data to project
2778#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2779pub struct ControllerConfigVolumesProjectedSourcesConfigMap {
2780    /// items if unspecified, each key-value pair in the Data field of the referenced
2781    /// ConfigMap will be projected into the volume as a file whose name is the
2782    /// key and content is the value. If specified, the listed keys will be
2783    /// projected into the specified paths, and unlisted keys will not be
2784    /// present. If a key is specified which is not present in the ConfigMap,
2785    /// the volume setup will error unless it is marked optional. Paths must be
2786    /// relative and may not contain the '..' path or start with '..'.
2787    #[serde(default, skip_serializing_if = "Option::is_none")]
2788    pub items: Option<Vec<ControllerConfigVolumesProjectedSourcesConfigMapItems>>,
2789    /// Name of the referent.
2790    /// This field is effectively required, but due to backwards compatibility is
2791    /// allowed to be empty. Instances of this type with an empty value here are
2792    /// almost certainly wrong.
2793    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
2794    #[serde(default, skip_serializing_if = "Option::is_none")]
2795    pub name: Option<String>,
2796    /// optional specify whether the ConfigMap or its keys must be defined
2797    #[serde(default, skip_serializing_if = "Option::is_none")]
2798    pub optional: Option<bool>,
2799}
2800
2801/// Maps a string key to a path within a volume.
2802#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2803pub struct ControllerConfigVolumesProjectedSourcesConfigMapItems {
2804    /// key is the key to project.
2805    pub key: String,
2806    /// mode is Optional: mode bits used to set permissions on this file.
2807    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
2808    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
2809    /// If not specified, the volume defaultMode will be used.
2810    /// This might be in conflict with other options that affect the file
2811    /// mode, like fsGroup, and the result can be other mode bits set.
2812    #[serde(default, skip_serializing_if = "Option::is_none")]
2813    pub mode: Option<i32>,
2814    /// path is the relative path of the file to map the key to.
2815    /// May not be an absolute path.
2816    /// May not contain the path element '..'.
2817    /// May not start with the string '..'.
2818    pub path: String,
2819}
2820
2821/// downwardAPI information about the downwardAPI data to project
2822#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2823pub struct ControllerConfigVolumesProjectedSourcesDownwardApi {
2824    /// Items is a list of DownwardAPIVolume file
2825    #[serde(default, skip_serializing_if = "Option::is_none")]
2826    pub items: Option<Vec<ControllerConfigVolumesProjectedSourcesDownwardApiItems>>,
2827}
2828
2829/// DownwardAPIVolumeFile represents information to create the file containing the pod field
2830#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2831pub struct ControllerConfigVolumesProjectedSourcesDownwardApiItems {
2832    /// Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.
2833    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fieldRef")]
2834    pub field_ref: Option<ControllerConfigVolumesProjectedSourcesDownwardApiItemsFieldRef>,
2835    /// Optional: mode bits used to set permissions on this file, must be an octal value
2836    /// between 0000 and 0777 or a decimal value between 0 and 511.
2837    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
2838    /// If not specified, the volume defaultMode will be used.
2839    /// This might be in conflict with other options that affect the file
2840    /// mode, like fsGroup, and the result can be other mode bits set.
2841    #[serde(default, skip_serializing_if = "Option::is_none")]
2842    pub mode: Option<i32>,
2843    /// Required: Path is  the relative path name of the file to be created. Must not be absolute or contain the '..' path. Must be utf-8 encoded. The first item of the relative path must not start with '..'
2844    pub path: String,
2845    /// Selects a resource of the container: only resources limits and requests
2846    /// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
2847    #[serde(default, skip_serializing_if = "Option::is_none", rename = "resourceFieldRef")]
2848    pub resource_field_ref: Option<ControllerConfigVolumesProjectedSourcesDownwardApiItemsResourceFieldRef>,
2849}
2850
2851/// Required: Selects a field of the pod: only annotations, labels, name, namespace and uid are supported.
2852#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2853pub struct ControllerConfigVolumesProjectedSourcesDownwardApiItemsFieldRef {
2854    /// Version of the schema the FieldPath is written in terms of, defaults to "v1".
2855    #[serde(default, skip_serializing_if = "Option::is_none", rename = "apiVersion")]
2856    pub api_version: Option<String>,
2857    /// Path of the field to select in the specified API version.
2858    #[serde(rename = "fieldPath")]
2859    pub field_path: String,
2860}
2861
2862/// Selects a resource of the container: only resources limits and requests
2863/// (limits.cpu, limits.memory, requests.cpu and requests.memory) are currently supported.
2864#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2865pub struct ControllerConfigVolumesProjectedSourcesDownwardApiItemsResourceFieldRef {
2866    /// Container name: required for volumes, optional for env vars
2867    #[serde(default, skip_serializing_if = "Option::is_none", rename = "containerName")]
2868    pub container_name: Option<String>,
2869    /// Specifies the output format of the exposed resources, defaults to "1"
2870    #[serde(default, skip_serializing_if = "Option::is_none")]
2871    pub divisor: Option<IntOrString>,
2872    /// Required: resource to select
2873    pub resource: String,
2874}
2875
2876/// secret information about the secret data to project
2877#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2878pub struct ControllerConfigVolumesProjectedSourcesSecret {
2879    /// items if unspecified, each key-value pair in the Data field of the referenced
2880    /// Secret will be projected into the volume as a file whose name is the
2881    /// key and content is the value. If specified, the listed keys will be
2882    /// projected into the specified paths, and unlisted keys will not be
2883    /// present. If a key is specified which is not present in the Secret,
2884    /// the volume setup will error unless it is marked optional. Paths must be
2885    /// relative and may not contain the '..' path or start with '..'.
2886    #[serde(default, skip_serializing_if = "Option::is_none")]
2887    pub items: Option<Vec<ControllerConfigVolumesProjectedSourcesSecretItems>>,
2888    /// Name of the referent.
2889    /// This field is effectively required, but due to backwards compatibility is
2890    /// allowed to be empty. Instances of this type with an empty value here are
2891    /// almost certainly wrong.
2892    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
2893    #[serde(default, skip_serializing_if = "Option::is_none")]
2894    pub name: Option<String>,
2895    /// optional field specify whether the Secret or its key must be defined
2896    #[serde(default, skip_serializing_if = "Option::is_none")]
2897    pub optional: Option<bool>,
2898}
2899
2900/// Maps a string key to a path within a volume.
2901#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2902pub struct ControllerConfigVolumesProjectedSourcesSecretItems {
2903    /// key is the key to project.
2904    pub key: String,
2905    /// mode is Optional: mode bits used to set permissions on this file.
2906    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
2907    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
2908    /// If not specified, the volume defaultMode will be used.
2909    /// This might be in conflict with other options that affect the file
2910    /// mode, like fsGroup, and the result can be other mode bits set.
2911    #[serde(default, skip_serializing_if = "Option::is_none")]
2912    pub mode: Option<i32>,
2913    /// path is the relative path of the file to map the key to.
2914    /// May not be an absolute path.
2915    /// May not contain the path element '..'.
2916    /// May not start with the string '..'.
2917    pub path: String,
2918}
2919
2920/// serviceAccountToken is information about the serviceAccountToken data to project
2921#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2922pub struct ControllerConfigVolumesProjectedSourcesServiceAccountToken {
2923    /// audience is the intended audience of the token. A recipient of a token
2924    /// must identify itself with an identifier specified in the audience of the
2925    /// token, and otherwise should reject the token. The audience defaults to the
2926    /// identifier of the apiserver.
2927    #[serde(default, skip_serializing_if = "Option::is_none")]
2928    pub audience: Option<String>,
2929    /// expirationSeconds is the requested duration of validity of the service
2930    /// account token. As the token approaches expiration, the kubelet volume
2931    /// plugin will proactively rotate the service account token. The kubelet will
2932    /// start trying to rotate the token if the token is older than 80 percent of
2933    /// its time to live or if the token is older than 24 hours.Defaults to 1 hour
2934    /// and must be at least 10 minutes.
2935    #[serde(default, skip_serializing_if = "Option::is_none", rename = "expirationSeconds")]
2936    pub expiration_seconds: Option<i64>,
2937    /// path is the path relative to the mount point of the file to project the
2938    /// token into.
2939    pub path: String,
2940}
2941
2942/// quobyte represents a Quobyte mount on the host that shares a pod's lifetime
2943#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2944pub struct ControllerConfigVolumesQuobyte {
2945    /// group to map volume access to
2946    /// Default is no group
2947    #[serde(default, skip_serializing_if = "Option::is_none")]
2948    pub group: Option<String>,
2949    /// readOnly here will force the Quobyte volume to be mounted with read-only permissions.
2950    /// Defaults to false.
2951    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2952    pub read_only: Option<bool>,
2953    /// registry represents a single or multiple Quobyte Registry services
2954    /// specified as a string as host:port pair (multiple entries are separated with commas)
2955    /// which acts as the central registry for volumes
2956    pub registry: String,
2957    /// tenant owning the given Quobyte volume in the Backend
2958    /// Used with dynamically provisioned Quobyte volumes, value is set by the plugin
2959    #[serde(default, skip_serializing_if = "Option::is_none")]
2960    pub tenant: Option<String>,
2961    /// user to map volume access to
2962    /// Defaults to serivceaccount user
2963    #[serde(default, skip_serializing_if = "Option::is_none")]
2964    pub user: Option<String>,
2965    /// volume is a string that references an already created Quobyte volume by name.
2966    pub volume: String,
2967}
2968
2969/// rbd represents a Rados Block Device mount on the host that shares a pod's lifetime.
2970/// More info: <https://examples.k8s.io/volumes/rbd/README.md>
2971#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
2972pub struct ControllerConfigVolumesRbd {
2973    /// fsType is the filesystem type of the volume that you want to mount.
2974    /// Tip: Ensure that the filesystem type is supported by the host operating system.
2975    /// Examples: "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
2976    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#rbd>
2977    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
2978    pub fs_type: Option<String>,
2979    /// image is the rados image name.
2980    /// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
2981    pub image: String,
2982    /// keyring is the path to key ring for RBDUser.
2983    /// Default is /etc/ceph/keyring.
2984    /// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
2985    #[serde(default, skip_serializing_if = "Option::is_none")]
2986    pub keyring: Option<String>,
2987    /// monitors is a collection of Ceph monitors.
2988    /// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
2989    pub monitors: Vec<String>,
2990    /// pool is the rados pool name.
2991    /// Default is rbd.
2992    /// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
2993    #[serde(default, skip_serializing_if = "Option::is_none")]
2994    pub pool: Option<String>,
2995    /// readOnly here will force the ReadOnly setting in VolumeMounts.
2996    /// Defaults to false.
2997    /// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
2998    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
2999    pub read_only: Option<bool>,
3000    /// secretRef is name of the authentication secret for RBDUser. If provided
3001    /// overrides keyring.
3002    /// Default is nil.
3003    /// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
3004    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")]
3005    pub secret_ref: Option<ControllerConfigVolumesRbdSecretRef>,
3006    /// user is the rados user name.
3007    /// Default is admin.
3008    /// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
3009    #[serde(default, skip_serializing_if = "Option::is_none")]
3010    pub user: Option<String>,
3011}
3012
3013/// secretRef is name of the authentication secret for RBDUser. If provided
3014/// overrides keyring.
3015/// Default is nil.
3016/// More info: <https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it>
3017#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3018pub struct ControllerConfigVolumesRbdSecretRef {
3019    /// Name of the referent.
3020    /// This field is effectively required, but due to backwards compatibility is
3021    /// allowed to be empty. Instances of this type with an empty value here are
3022    /// almost certainly wrong.
3023    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
3024    #[serde(default, skip_serializing_if = "Option::is_none")]
3025    pub name: Option<String>,
3026}
3027
3028/// scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes.
3029#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3030pub struct ControllerConfigVolumesScaleIo {
3031    /// fsType is the filesystem type to mount.
3032    /// Must be a filesystem type supported by the host operating system.
3033    /// Ex. "ext4", "xfs", "ntfs".
3034    /// Default is "xfs".
3035    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
3036    pub fs_type: Option<String>,
3037    /// gateway is the host address of the ScaleIO API Gateway.
3038    pub gateway: String,
3039    /// protectionDomain is the name of the ScaleIO Protection Domain for the configured storage.
3040    #[serde(default, skip_serializing_if = "Option::is_none", rename = "protectionDomain")]
3041    pub protection_domain: Option<String>,
3042    /// readOnly Defaults to false (read/write). ReadOnly here will force
3043    /// the ReadOnly setting in VolumeMounts.
3044    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
3045    pub read_only: Option<bool>,
3046    /// secretRef references to the secret for ScaleIO user and other
3047    /// sensitive information. If this is not provided, Login operation will fail.
3048    #[serde(rename = "secretRef")]
3049    pub secret_ref: ControllerConfigVolumesScaleIoSecretRef,
3050    /// sslEnabled Flag enable/disable SSL communication with Gateway, default false
3051    #[serde(default, skip_serializing_if = "Option::is_none", rename = "sslEnabled")]
3052    pub ssl_enabled: Option<bool>,
3053    /// storageMode indicates whether the storage for a volume should be ThickProvisioned or ThinProvisioned.
3054    /// Default is ThinProvisioned.
3055    #[serde(default, skip_serializing_if = "Option::is_none", rename = "storageMode")]
3056    pub storage_mode: Option<String>,
3057    /// storagePool is the ScaleIO Storage Pool associated with the protection domain.
3058    #[serde(default, skip_serializing_if = "Option::is_none", rename = "storagePool")]
3059    pub storage_pool: Option<String>,
3060    /// system is the name of the storage system as configured in ScaleIO.
3061    pub system: String,
3062    /// volumeName is the name of a volume already created in the ScaleIO system
3063    /// that is associated with this volume source.
3064    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeName")]
3065    pub volume_name: Option<String>,
3066}
3067
3068/// secretRef references to the secret for ScaleIO user and other
3069/// sensitive information. If this is not provided, Login operation will fail.
3070#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3071pub struct ControllerConfigVolumesScaleIoSecretRef {
3072    /// Name of the referent.
3073    /// This field is effectively required, but due to backwards compatibility is
3074    /// allowed to be empty. Instances of this type with an empty value here are
3075    /// almost certainly wrong.
3076    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
3077    #[serde(default, skip_serializing_if = "Option::is_none")]
3078    pub name: Option<String>,
3079}
3080
3081/// secret represents a secret that should populate this volume.
3082/// More info: <https://kubernetes.io/docs/concepts/storage/volumes#secret>
3083#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3084pub struct ControllerConfigVolumesSecret {
3085    /// defaultMode is Optional: mode bits used to set permissions on created files by default.
3086    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
3087    /// YAML accepts both octal and decimal values, JSON requires decimal values
3088    /// for mode bits. Defaults to 0644.
3089    /// Directories within the path are not affected by this setting.
3090    /// This might be in conflict with other options that affect the file
3091    /// mode, like fsGroup, and the result can be other mode bits set.
3092    #[serde(default, skip_serializing_if = "Option::is_none", rename = "defaultMode")]
3093    pub default_mode: Option<i32>,
3094    /// items If unspecified, each key-value pair in the Data field of the referenced
3095    /// Secret will be projected into the volume as a file whose name is the
3096    /// key and content is the value. If specified, the listed keys will be
3097    /// projected into the specified paths, and unlisted keys will not be
3098    /// present. If a key is specified which is not present in the Secret,
3099    /// the volume setup will error unless it is marked optional. Paths must be
3100    /// relative and may not contain the '..' path or start with '..'.
3101    #[serde(default, skip_serializing_if = "Option::is_none")]
3102    pub items: Option<Vec<ControllerConfigVolumesSecretItems>>,
3103    /// optional field specify whether the Secret or its keys must be defined
3104    #[serde(default, skip_serializing_if = "Option::is_none")]
3105    pub optional: Option<bool>,
3106    /// secretName is the name of the secret in the pod's namespace to use.
3107    /// More info: <https://kubernetes.io/docs/concepts/storage/volumes#secret>
3108    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretName")]
3109    pub secret_name: Option<String>,
3110}
3111
3112/// Maps a string key to a path within a volume.
3113#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3114pub struct ControllerConfigVolumesSecretItems {
3115    /// key is the key to project.
3116    pub key: String,
3117    /// mode is Optional: mode bits used to set permissions on this file.
3118    /// Must be an octal value between 0000 and 0777 or a decimal value between 0 and 511.
3119    /// YAML accepts both octal and decimal values, JSON requires decimal values for mode bits.
3120    /// If not specified, the volume defaultMode will be used.
3121    /// This might be in conflict with other options that affect the file
3122    /// mode, like fsGroup, and the result can be other mode bits set.
3123    #[serde(default, skip_serializing_if = "Option::is_none")]
3124    pub mode: Option<i32>,
3125    /// path is the relative path of the file to map the key to.
3126    /// May not be an absolute path.
3127    /// May not contain the path element '..'.
3128    /// May not start with the string '..'.
3129    pub path: String,
3130}
3131
3132/// storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes.
3133#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3134pub struct ControllerConfigVolumesStorageos {
3135    /// fsType is the filesystem type to mount.
3136    /// Must be a filesystem type supported by the host operating system.
3137    /// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
3138    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
3139    pub fs_type: Option<String>,
3140    /// readOnly defaults to false (read/write). ReadOnly here will force
3141    /// the ReadOnly setting in VolumeMounts.
3142    #[serde(default, skip_serializing_if = "Option::is_none", rename = "readOnly")]
3143    pub read_only: Option<bool>,
3144    /// secretRef specifies the secret to use for obtaining the StorageOS API
3145    /// credentials.  If not specified, default values will be attempted.
3146    #[serde(default, skip_serializing_if = "Option::is_none", rename = "secretRef")]
3147    pub secret_ref: Option<ControllerConfigVolumesStorageosSecretRef>,
3148    /// volumeName is the human-readable name of the StorageOS volume.  Volume
3149    /// names are only unique within a namespace.
3150    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeName")]
3151    pub volume_name: Option<String>,
3152    /// volumeNamespace specifies the scope of the volume within StorageOS.  If no
3153    /// namespace is specified then the Pod's namespace will be used.  This allows the
3154    /// Kubernetes name scoping to be mirrored within StorageOS for tighter integration.
3155    /// Set VolumeName to any name to override the default behaviour.
3156    /// Set to "default" if you are not using namespaces within StorageOS.
3157    /// Namespaces that do not pre-exist within StorageOS will be created.
3158    #[serde(default, skip_serializing_if = "Option::is_none", rename = "volumeNamespace")]
3159    pub volume_namespace: Option<String>,
3160}
3161
3162/// secretRef specifies the secret to use for obtaining the StorageOS API
3163/// credentials.  If not specified, default values will be attempted.
3164#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3165pub struct ControllerConfigVolumesStorageosSecretRef {
3166    /// Name of the referent.
3167    /// This field is effectively required, but due to backwards compatibility is
3168    /// allowed to be empty. Instances of this type with an empty value here are
3169    /// almost certainly wrong.
3170    /// More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names>
3171    #[serde(default, skip_serializing_if = "Option::is_none")]
3172    pub name: Option<String>,
3173}
3174
3175/// vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine
3176#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
3177pub struct ControllerConfigVolumesVsphereVolume {
3178    /// fsType is filesystem type to mount.
3179    /// Must be a filesystem type supported by the host operating system.
3180    /// Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified.
3181    #[serde(default, skip_serializing_if = "Option::is_none", rename = "fsType")]
3182    pub fs_type: Option<String>,
3183    /// storagePolicyID is the storage Policy Based Management (SPBM) profile ID associated with the StoragePolicyName.
3184    #[serde(default, skip_serializing_if = "Option::is_none", rename = "storagePolicyID")]
3185    pub storage_policy_id: Option<String>,
3186    /// storagePolicyName is the storage Policy Based Management (SPBM) profile name.
3187    #[serde(default, skip_serializing_if = "Option::is_none", rename = "storagePolicyName")]
3188    pub storage_policy_name: Option<String>,
3189    /// volumePath is the path that identifies vSphere volume vmdk
3190    #[serde(rename = "volumePath")]
3191    pub volume_path: String,
3192}
3193