// WARNING: generated by kopium - manual changes will be overwritten
// kopium command: kopium --docs --derive=Default --derive=PartialEq --smart-derive-elision --filename crd-catalog/hazelcast/hazelcast-platform-operator/hazelcast.com/v1alpha1/managementcenters.yaml
// kopium version: 0.22.5
#[allow(unused_imports)]
mod prelude {
pub use kube::CustomResource;
pub use serde::{Serialize, Deserialize};
pub use std::collections::BTreeMap;
pub use k8s_openapi::apimachinery::pkg::util::intstr::IntOrString;
}
use self::prelude::*;
/// Initial values will be filled with its fields' default values.
#[derive(CustomResource, Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
#[kube(group = "hazelcast.com", version = "v1alpha1", kind = "ManagementCenter", plural = "managementcenters")]
#[kube(namespaced)]
#[kube(status = "ManagementCenterStatus")]
#[kube(schema = "disabled")]
#[kube(derive="Default")]
#[kube(derive="PartialEq")]
pub struct ManagementCenterSpec {
/// ManagementCenter Kubernetes resource annotations
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Configuration to expose Management Center to outside.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "externalConnectivity")]
pub external_connectivity: Option<ManagementCenterExternalConnectivity>,
/// Connection configuration for the Hazelcast clusters that Management Center will monitor.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "hazelcastClusters")]
pub hazelcast_clusters: Option<Vec<ManagementCenterHazelcastClusters>>,
/// Pull policy for the Management Center image
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullPolicy")]
pub image_pull_policy: Option<String>,
/// Image pull secrets for the Management Center image
#[serde(default, skip_serializing_if = "Option::is_none", rename = "imagePullSecrets")]
pub image_pull_secrets: Option<Vec<ManagementCenterImagePullSecrets>>,
/// ManagementCenter JVM configuration
#[serde(default, skip_serializing_if = "Option::is_none")]
pub jvm: Option<ManagementCenterJvm>,
/// ManagementCenter Kubernetes resource labels
#[serde(default, skip_serializing_if = "Option::is_none")]
pub labels: Option<BTreeMap<String, String>>,
/// licenseKeySecret is a deprecated alias for licenseKeySecretName.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "licenseKeySecret")]
pub license_key_secret: Option<String>,
/// Name of the secret with Hazelcast Enterprise License Key.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "licenseKeySecretName")]
pub license_key_secret_name: Option<String>,
/// Configuration for Management Center persistence.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub persistence: Option<ManagementCenterPersistence>,
/// Repository to pull the Management Center image from.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub repository: Option<String>,
/// Compute Resources required by the MC container.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub resources: Option<ManagementCenterResources>,
/// Scheduling details
#[serde(default, skip_serializing_if = "Option::is_none")]
pub scheduling: Option<ManagementCenterScheduling>,
/// SecurityProviders to authenticate users in Management Center
#[serde(default, skip_serializing_if = "Option::is_none", rename = "securityProvider")]
pub security_provider: Option<ManagementCenterSecurityProvider>,
/// Version of Management Center.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
}
/// Configuration to expose Management Center to outside.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterExternalConnectivity {
/// Ingress configuration of Management Center
#[serde(default, skip_serializing_if = "Option::is_none")]
pub ingress: Option<ManagementCenterExternalConnectivityIngress>,
/// OpenShift Route configuration of Management Center
#[serde(default, skip_serializing_if = "Option::is_none")]
pub route: Option<ManagementCenterExternalConnectivityRoute>,
/// How Management Center is exposed. Valid values are: - "ClusterIP" - "NodePort" - "LoadBalancer" (default)
#[serde(default, skip_serializing_if = "Option::is_none", rename = "type")]
pub r#type: Option<ManagementCenterExternalConnectivityType>,
}
/// Ingress configuration of Management Center
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterExternalConnectivityIngress {
/// Annotations added to the ingress object.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub annotations: Option<BTreeMap<String, String>>,
/// Hostname of Management Center exposed by Ingress. Ingress controller will use this hostname to route inbound traffic.
pub hostname: String,
/// IngressClassName of the ingress object.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "ingressClassName")]
pub ingress_class_name: Option<String>,
/// Path of the ingress rule.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub path: Option<String>,
}
/// OpenShift Route configuration of Management Center
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterExternalConnectivityRoute {
/// Hostname of Management Center exposed by route. Openshift routers will use this hostname to route inbound traffic.
pub hostname: String,
}
/// Configuration to expose Management Center to outside.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum ManagementCenterExternalConnectivityType {
#[serde(rename = "ClusterIP")]
ClusterIp,
NodePort,
LoadBalancer,
}
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterHazelcastClusters {
/// IP address or DNS name of the Hazelcast cluster. If the cluster is exposed with a service name in a different namespace, use the following syntax "<service-name>.<service-namespace>".
pub address: String,
/// Name of the Hazelcast cluster that Management Center will connect to, default is dev.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
/// TLS client configuration.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tls: Option<ManagementCenterHazelcastClustersTls>,
}
/// TLS client configuration.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterHazelcastClustersTls {
/// Mutual authentication configuration. It’s None by default which means the client side of connection is not authenticated.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "mutualAuthentication")]
pub mutual_authentication: Option<ManagementCenterHazelcastClustersTlsMutualAuthentication>,
/// Name of the secret with TLS certificate and key.
#[serde(rename = "secretName")]
pub secret_name: String,
}
/// TLS client configuration.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum ManagementCenterHazelcastClustersTlsMutualAuthentication {
None,
Required,
Optional,
}
/// LocalObjectReference contains enough information to let you locate the referenced object inside the same namespace.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterImagePullSecrets {
/// Name of the referent. More info: <https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names> TODO: Add other useful fields. apiVersion, kind, uid?
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
/// ManagementCenter JVM configuration
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterJvm {
/// Args is for arbitrary JVM arguments
#[serde(default, skip_serializing_if = "Option::is_none")]
pub args: Option<Vec<String>>,
}
/// Configuration for Management Center persistence.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterPersistence {
/// When true, MC will use a PersistentVolumeClaim to store data.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
/// Name of the PersistentVolumeClaim MC will use for persistence. If not empty, MC will use the existing claim instead of creating a new one.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "existingVolumeClaimName")]
pub existing_volume_claim_name: Option<String>,
/// Size of the created PersistentVolumeClaim.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub size: Option<IntOrString>,
/// StorageClass from which PersistentVolumeClaim will be created.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "storageClass")]
pub storage_class: Option<String>,
}
/// Compute Resources required by the MC container.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterResources {
/// Claims lists the names of resources, defined in spec.resourceClaims, that are used by this container.
/// This is an alpha field and requires enabling the DynamicResourceAllocation feature gate.
/// This field is immutable. It can only be set for containers.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub claims: Option<Vec<ManagementCenterResourcesClaims>>,
/// Limits describes the maximum amount of compute resources allowed. More info: <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub limits: Option<BTreeMap<String, IntOrString>>,
/// Requests describes the minimum amount of compute resources required. If Requests is omitted for a container, it defaults to Limits if that is explicitly specified, otherwise to an implementation-defined value. Requests cannot exceed Limits. More info: <https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/>
#[serde(default, skip_serializing_if = "Option::is_none")]
pub requests: Option<BTreeMap<String, IntOrString>>,
}
/// ResourceClaim references one entry in PodSpec.ResourceClaims.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterResourcesClaims {
/// Name must match the name of one entry in pod.spec.resourceClaims of the Pod where this field is used. It makes that resource available inside a container.
pub name: String,
}
/// Scheduling details
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterScheduling {
/// Affinity
#[serde(default, skip_serializing_if = "Option::is_none")]
pub affinity: Option<ManagementCenterSchedulingAffinity>,
/// NodeSelector
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeSelector")]
pub node_selector: Option<BTreeMap<String, String>>,
/// Tolerations
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tolerations: Option<Vec<ManagementCenterSchedulingTolerations>>,
/// TopologySpreadConstraints
#[serde(default, skip_serializing_if = "Option::is_none", rename = "topologySpreadConstraints")]
pub topology_spread_constraints: Option<Vec<ManagementCenterSchedulingTopologySpreadConstraints>>,
}
/// Affinity
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinity {
/// Describes node affinity scheduling rules for the pod.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinity")]
pub node_affinity: Option<ManagementCenterSchedulingAffinityNodeAffinity>,
/// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAffinity")]
pub pod_affinity: Option<ManagementCenterSchedulingAffinityPodAffinity>,
/// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
#[serde(default, skip_serializing_if = "Option::is_none", rename = "podAntiAffinity")]
pub pod_anti_affinity: Option<ManagementCenterSchedulingAffinityPodAntiAffinity>,
}
/// Describes node affinity scheduling rules for the pod.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinity {
/// The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node matches the corresponding matchExpressions; the node(s) with the highest sum are the most preferred.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
/// If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
pub required_during_scheduling_ignored_during_execution: Option<ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution>,
}
/// An empty preferred scheduling term matches all objects with implicit weight 0 (i.e. it's a no-op). A null preferred scheduling term matches no objects (i.e. is also a no-op).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecution {
/// A node selector term, associated with the corresponding weight.
pub preference: ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference,
/// Weight associated with matching the corresponding nodeSelectorTerm, in the range 1-100.
pub weight: i32,
}
/// A node selector term, associated with the corresponding weight.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreference {
/// A list of node selector requirements by node's labels.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions>>,
/// A list of node selector requirements by node's fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
pub match_fields: Option<Vec<ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields>>,
}
/// A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchExpressions {
/// The label key that the selector applies to.
pub key: String,
/// Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
pub operator: String,
/// An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityPreferredDuringSchedulingIgnoredDuringExecutionPreferenceMatchFields {
/// The label key that the selector applies to.
pub key: String,
/// Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
pub operator: String,
/// An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to an update), the system may or may not try to eventually evict the pod from its node.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecution {
/// Required. A list of node selector terms. The terms are ORed.
#[serde(rename = "nodeSelectorTerms")]
pub node_selector_terms: Vec<ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms>,
}
/// A null or empty node selector term matches no objects. The requirements of them are ANDed. The TopologySelectorTerm type implements a subset of the NodeSelectorTerm.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTerms {
/// A list of node selector requirements by node's labels.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions>>,
/// A list of node selector requirements by node's fields.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchFields")]
pub match_fields: Option<Vec<ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields>>,
}
/// A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchExpressions {
/// The label key that the selector applies to.
pub key: String,
/// Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
pub operator: String,
/// An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// A node selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityNodeAffinityRequiredDuringSchedulingIgnoredDuringExecutionNodeSelectorTermsMatchFields {
/// The label key that the selector applies to.
pub key: String,
/// Represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists, DoesNotExist. Gt, and Lt.
pub operator: String,
/// An array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. If the operator is Gt or Lt, the values array must have a single element, which will be interpreted as an integer. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// Describes pod affinity scheduling rules (e.g. co-locate this pod in the same node, zone, etc. as some other pod(s)).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinity {
/// The scheduler will prefer to schedule pods to nodes that satisfy the affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
/// If the affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
pub required_during_scheduling_ignored_during_execution: Option<Vec<ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
}
/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecution {
/// Required. A pod affinity term, associated with the corresponding weight.
#[serde(rename = "podAffinityTerm")]
pub pod_affinity_term: ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
/// weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
pub weight: i32,
}
/// Required. A pod affinity term, associated with the corresponding weight.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
/// A label query over a set of resources, in this case pods.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
pub label_selector: Option<ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
pub namespace_selector: Option<ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
/// namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub namespaces: Option<Vec<String>>,
/// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
#[serde(rename = "topologyKey")]
pub topology_key: String,
}
/// A label query over a set of resources, in this case pods.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecution {
/// A label query over a set of resources, in this case pods.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
pub label_selector: Option<ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
pub namespace_selector: Option<ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
/// namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub namespaces: Option<Vec<String>>,
/// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
#[serde(rename = "topologyKey")]
pub topology_key: String,
}
/// A label query over a set of resources, in this case pods.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// Describes pod anti-affinity scheduling rules (e.g. avoid putting this pod in the same node, zone, etc. as some other pod(s)).
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinity {
/// The scheduler will prefer to schedule pods to nodes that satisfy the anti-affinity expressions specified by this field, but it may choose a node that violates one or more of the expressions. The node that is most preferred is the one with the greatest sum of weights, i.e. for each node that meets all of the scheduling requirements (resource request, requiredDuringScheduling anti-affinity expressions, etc.), compute a sum by iterating through the elements of this field and adding "weight" to the sum if the node has pods which matches the corresponding podAffinityTerm; the node(s) with the highest sum are the most preferred.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "preferredDuringSchedulingIgnoredDuringExecution")]
pub preferred_during_scheduling_ignored_during_execution: Option<Vec<ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution>>,
/// If the anti-affinity requirements specified by this field are not met at scheduling time, the pod will not be scheduled onto the node. If the anti-affinity requirements specified by this field cease to be met at some point during pod execution (e.g. due to a pod label update), the system may or may not try to eventually evict the pod from its node. When there are multiple elements, the lists of nodes corresponding to each podAffinityTerm are intersected, i.e. all terms must be satisfied.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "requiredDuringSchedulingIgnoredDuringExecution")]
pub required_during_scheduling_ignored_during_execution: Option<Vec<ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution>>,
}
/// The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecution {
/// Required. A pod affinity term, associated with the corresponding weight.
#[serde(rename = "podAffinityTerm")]
pub pod_affinity_term: ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm,
/// weight associated with matching the corresponding podAffinityTerm, in the range 1-100.
pub weight: i32,
}
/// Required. A pod affinity term, associated with the corresponding weight.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTerm {
/// A label query over a set of resources, in this case pods.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
pub label_selector: Option<ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector>,
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
pub namespace_selector: Option<ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector>,
/// namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub namespaces: Option<Vec<String>>,
/// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
#[serde(rename = "topologyKey")]
pub topology_key: String,
}
/// A label query over a set of resources, in this case pods.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermLabelSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityPreferredDuringSchedulingIgnoredDuringExecutionPodAffinityTermNamespaceSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// Defines a set of pods (namely those matching the labelSelector relative to the given namespace(s)) that this pod should be co-located (affinity) or not co-located (anti-affinity) with, where co-located is defined as running on a node whose value of the label with key <topologyKey> matches that of any node on which a pod of the set of pods is running
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecution {
/// A label query over a set of resources, in this case pods.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
pub label_selector: Option<ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector>,
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "namespaceSelector")]
pub namespace_selector: Option<ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector>,
/// namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace".
#[serde(default, skip_serializing_if = "Option::is_none")]
pub namespaces: Option<Vec<String>>,
/// This pod should be co-located (affinity) or not co-located (anti-affinity) with the pods matching the labelSelector in the specified namespaces, where co-located is defined as running on a node whose value of the label with key topologyKey matches that of any node on which any of the selected pods is running. Empty topologyKey is not allowed.
#[serde(rename = "topologyKey")]
pub topology_key: String,
}
/// A label query over a set of resources, in this case pods.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionLabelSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingAffinityPodAntiAffinityRequiredDuringSchedulingIgnoredDuringExecutionNamespaceSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// The pod this Toleration is attached to tolerates any taint that matches the triple <key,value,effect> using the matching operator <operator>.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingTolerations {
/// Effect indicates the taint effect to match. Empty means match all taint effects. When specified, allowed values are NoSchedule, PreferNoSchedule and NoExecute.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub effect: Option<String>,
/// Key is the taint key that the toleration applies to. Empty means match all taint keys. If the key is empty, operator must be Exists; this combination means to match all values and all keys.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub key: Option<String>,
/// Operator represents a key's relationship to the value. Valid operators are Exists and Equal. Defaults to Equal. Exists is equivalent to wildcard for value, so that a pod can tolerate all taints of a particular category.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub operator: Option<String>,
/// TolerationSeconds represents the period of time the toleration (which must be of effect NoExecute, otherwise this field is ignored) tolerates the taint. By default, it is not set, which means tolerate the taint forever (do not evict). Zero and negative values will be treated as 0 (evict immediately) by the system.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "tolerationSeconds")]
pub toleration_seconds: Option<i64>,
/// Value is the taint value the toleration matches to. If the operator is Exists, the value should be empty, otherwise just a regular string.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub value: Option<String>,
}
/// TopologySpreadConstraint specifies how to spread matching pods among the given topology.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingTopologySpreadConstraints {
/// LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "labelSelector")]
pub label_selector: Option<ManagementCenterSchedulingTopologySpreadConstraintsLabelSelector>,
/// MatchLabelKeys is a set of pod label keys to select the pods over which spreading will be calculated. The keys are used to lookup values from the incoming pod labels, those key-value labels are ANDed with labelSelector to select the group of existing pods over which spreading will be calculated for the incoming pod. The same key is forbidden to exist in both MatchLabelKeys and LabelSelector. MatchLabelKeys cannot be set when LabelSelector isn't set. Keys that don't exist in the incoming pod labels will be ignored. A null or empty list means only match against labelSelector.
/// This is a beta field and requires the MatchLabelKeysInPodTopologySpread feature gate to be enabled (enabled by default).
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabelKeys")]
pub match_label_keys: Option<Vec<String>>,
/// MaxSkew describes the degree to which pods may be unevenly distributed. When `whenUnsatisfiable=DoNotSchedule`, it is the maximum permitted difference between the number of matching pods in the target topology and the global minimum. The global minimum is the minimum number of matching pods in an eligible domain or zero if the number of eligible domains is less than MinDomains. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 2/2/1: In this case, the global minimum is 1. | zone1 | zone2 | zone3 | | P P | P P | P | - if MaxSkew is 1, incoming pod can only be scheduled to zone3 to become 2/2/2; scheduling it onto zone1(zone2) would make the ActualSkew(3-1) on zone1(zone2) violate MaxSkew(1). - if MaxSkew is 2, incoming pod can be scheduled onto any zone. When `whenUnsatisfiable=ScheduleAnyway`, it is used to give higher precedence to topologies that satisfy it. It's a required field. Default value is 1 and 0 is not allowed.
#[serde(rename = "maxSkew")]
pub max_skew: i32,
/// MinDomains indicates a minimum number of eligible domains. When the number of eligible domains with matching topology keys is less than minDomains, Pod Topology Spread treats "global minimum" as 0, and then the calculation of Skew is performed. And when the number of eligible domains with matching topology keys equals or greater than minDomains, this value has no effect on scheduling. As a result, when the number of eligible domains is less than minDomains, scheduler won't schedule more than maxSkew Pods to those domains. If value is nil, the constraint behaves as if MinDomains is equal to 1. Valid values are integers greater than 0. When value is not nil, WhenUnsatisfiable must be DoNotSchedule.
/// For example, in a 3-zone cluster, MaxSkew is set to 2, MinDomains is set to 5 and pods with the same labelSelector spread as 2/2/2: | zone1 | zone2 | zone3 | | P P | P P | P P | The number of domains is less than 5(MinDomains), so "global minimum" is treated as 0. In this situation, new pod with the same labelSelector cannot be scheduled, because computed skew will be 3(3 - 0) if new Pod is scheduled to any of the three zones, it will violate MaxSkew.
/// This is a beta field and requires the MinDomainsInPodTopologySpread feature gate to be enabled (enabled by default).
#[serde(default, skip_serializing_if = "Option::is_none", rename = "minDomains")]
pub min_domains: Option<i32>,
/// NodeAffinityPolicy indicates how we will treat Pod's nodeAffinity/nodeSelector when calculating pod topology spread skew. Options are: - Honor: only nodes matching nodeAffinity/nodeSelector are included in the calculations. - Ignore: nodeAffinity/nodeSelector are ignored. All nodes are included in the calculations.
/// If this value is nil, the behavior is equivalent to the Honor policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeAffinityPolicy")]
pub node_affinity_policy: Option<String>,
/// NodeTaintsPolicy indicates how we will treat node taints when calculating pod topology spread skew. Options are: - Honor: nodes without taints, along with tainted nodes for which the incoming pod has a toleration, are included. - Ignore: node taints are ignored. All nodes are included.
/// If this value is nil, the behavior is equivalent to the Ignore policy. This is a beta-level feature default enabled by the NodeInclusionPolicyInPodTopologySpread feature flag.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "nodeTaintsPolicy")]
pub node_taints_policy: Option<String>,
/// TopologyKey is the key of node labels. Nodes that have a label with this key and identical values are considered to be in the same topology. We consider each <key, value> as a "bucket", and try to put balanced number of pods into each bucket. We define a domain as a particular instance of a topology. Also, we define an eligible domain as a domain whose nodes meet the requirements of nodeAffinityPolicy and nodeTaintsPolicy. e.g. If TopologyKey is "kubernetes.io/hostname", each Node is a domain of that topology. And, if TopologyKey is "topology.kubernetes.io/zone", each zone is a domain of that topology. It's a required field.
#[serde(rename = "topologyKey")]
pub topology_key: String,
/// WhenUnsatisfiable indicates how to deal with a pod if it doesn't satisfy the spread constraint. - DoNotSchedule (default) tells the scheduler not to schedule it. - ScheduleAnyway tells the scheduler to schedule the pod in any location, but giving higher precedence to topologies that would help reduce the skew. A constraint is considered "Unsatisfiable" for an incoming pod if and only if every possible node assignment for that pod would violate "MaxSkew" on some topology. For example, in a 3-zone cluster, MaxSkew is set to 1, and pods with the same labelSelector spread as 3/1/1: | zone1 | zone2 | zone3 | | P P P | P | P | If WhenUnsatisfiable is set to DoNotSchedule, incoming pod can only be scheduled to zone2(zone3) to become 3/2/1(3/1/2) as ActualSkew(2-1) on zone2(zone3) satisfies MaxSkew(1). In other words, the cluster can still be imbalanced, but scheduler won't make it *more* imbalanced. It's a required field.
#[serde(rename = "whenUnsatisfiable")]
pub when_unsatisfiable: String,
}
/// LabelSelector is used to find matching pods. Pods that match this label selector are counted to determine the number of pods in their corresponding topology domain.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingTopologySpreadConstraintsLabelSelector {
/// matchExpressions is a list of label selector requirements. The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchExpressions")]
pub match_expressions: Option<Vec<ManagementCenterSchedulingTopologySpreadConstraintsLabelSelectorMatchExpressions>>,
/// matchLabels is a map of {key,value} pairs. A single {key,value} in the matchLabels map is equivalent to an element of matchExpressions, whose key field is "key", the operator is "In", and the values array contains only "value". The requirements are ANDed.
#[serde(default, skip_serializing_if = "Option::is_none", rename = "matchLabels")]
pub match_labels: Option<BTreeMap<String, String>>,
}
/// A label selector requirement is a selector that contains values, a key, and an operator that relates the key and values.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSchedulingTopologySpreadConstraintsLabelSelectorMatchExpressions {
/// key is the label key that the selector applies to.
pub key: String,
/// operator represents a key's relationship to a set of values. Valid operators are In, NotIn, Exists and DoesNotExist.
pub operator: String,
/// values is an array of string values. If the operator is In or NotIn, the values array must be non-empty. If the operator is Exists or DoesNotExist, the values array must be empty. This array is replaced during a strategic merge patch.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub values: Option<Vec<String>>,
}
/// SecurityProviders to authenticate users in Management Center
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSecurityProvider {
/// LDAP security provider
#[serde(default, skip_serializing_if = "Option::is_none")]
pub ldap: Option<ManagementCenterSecurityProviderLdap>,
}
/// LDAP security provider
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterSecurityProviderLdap {
/// Members of these groups and its nested groups have admin privileges on the Management Center.
#[serde(rename = "adminGroups")]
pub admin_groups: Vec<String>,
/// CredentialsSecretName is the name of the secret that contains username and password of a user that has admin privileges on the LDAP server. The username must be the DN of the user. It is used to connect to the server when authenticating users.
#[serde(rename = "credentialsSecretName")]
pub credentials_secret_name: String,
/// DN to be used for searching groups.
#[serde(rename = "groupDN")]
pub group_dn: String,
/// LDAP search filter expression to search for the groups. For example, uniquemember={0} searches for a group that matches with the uniquemember attribute.
#[serde(rename = "groupSearchFilter")]
pub group_search_filter: String,
/// Members of these groups and its nested groups have the privilege to see only the metrics on the Management Center.
#[serde(rename = "metricsOnlyGroups")]
pub metrics_only_groups: Vec<String>,
/// NestedGroupSearch enables searching for nested LDAP groups.
#[serde(rename = "nestedGroupSearch")]
pub nested_group_search: bool,
/// Members of these groups and its nested groups have only read privilege on the Management Center.
#[serde(rename = "readonlyUserGroups")]
pub readonly_user_groups: Vec<String>,
/// URL of your LDAP server, including schema (ldap://) and port.
pub url: String,
/// DN to be used for searching users.
#[serde(rename = "userDN")]
pub user_dn: String,
/// Members of these groups and its nested groups have read and write privileges on the Management Center.
#[serde(rename = "userGroups")]
pub user_groups: Vec<String>,
/// LDAP search filter expression to search for the users. For example, uid={0} searches for a username that matches with the uid attribute.
#[serde(rename = "userSearchFilter")]
pub user_search_filter: String,
}
/// ManagementCenterStatus defines the observed state of ManagementCenter.
#[derive(Serialize, Deserialize, Clone, Debug, Default, PartialEq)]
pub struct ManagementCenterStatus {
/// Configured is a flag that indicates if the configuration step has successfully passed
#[serde(default, skip_serializing_if = "Option::is_none")]
pub configured: Option<bool>,
/// External addresses of the Management Center instance
#[serde(default, skip_serializing_if = "Option::is_none", rename = "externalAddresses")]
pub external_addresses: Option<String>,
/// Message about the Management Center state
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
/// Phase of the Management Center
#[serde(default, skip_serializing_if = "Option::is_none")]
pub phase: Option<ManagementCenterStatusPhase>,
}
/// ManagementCenterStatus defines the observed state of ManagementCenter.
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq)]
pub enum ManagementCenterStatusPhase {
Running,
Failed,
Pending,
Configuring,
Terminating,
}