Struct controller::cloudnativepg::clusters::ClusterAffinity
source · pub struct ClusterAffinity {
pub additional_pod_affinity: Option<ClusterAffinityAdditionalPodAffinity>,
pub additional_pod_anti_affinity: Option<ClusterAffinityAdditionalPodAntiAffinity>,
pub enable_pod_anti_affinity: Option<bool>,
pub node_affinity: Option<ClusterAffinityNodeAffinity>,
pub node_selector: Option<BTreeMap<String, String>>,
pub pod_anti_affinity_type: Option<String>,
pub tolerations: Option<Vec<ClusterAffinityTolerations>>,
pub topology_key: Option<String>,
}Expand description
Affinity/Anti-affinity rules for Pods
Fields§
§additional_pod_affinity: Option<ClusterAffinityAdditionalPodAffinity>AdditionalPodAffinity allows to specify pod affinity terms to be passed to all the cluster’s pods.
additional_pod_anti_affinity: Option<ClusterAffinityAdditionalPodAntiAffinity>AdditionalPodAntiAffinity allows to specify pod anti-affinity terms to be added to the ones generated by the operator if EnablePodAntiAffinity is set to true (default) or to be used exclusively if set to false.
enable_pod_anti_affinity: Option<bool>Activates anti-affinity for the pods. The operator will define pods anti-affinity unless this field is explicitly set to false
node_affinity: Option<ClusterAffinityNodeAffinity>NodeAffinity describes node affinity scheduling rules for the pod. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#node-affinity
node_selector: Option<BTreeMap<String, String>>NodeSelector is map of key-value pairs used to define the nodes on which the pods can run. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/
pod_anti_affinity_type: Option<String>PodAntiAffinityType allows the user to decide whether pod anti-affinity between cluster instance has to be considered a strong requirement during scheduling or not. Allowed values are: “preferred” (default if empty) or “required”. Setting it to “required”, could lead to instances remaining pending until new kubernetes nodes are added if all the existing nodes don’t match the required pod anti-affinity rule. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/#inter-pod-affinity-and-anti-affinity
tolerations: Option<Vec<ClusterAffinityTolerations>>Tolerations is a list of Tolerations that should be set for all the pods, in order to allow them to run on tainted nodes. More info: https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/
topology_key: Option<String>TopologyKey to use for anti-affinity configuration. See k8s documentation for more info on that
Trait Implementations§
source§impl Clone for ClusterAffinity
impl Clone for ClusterAffinity
source§fn clone(&self) -> ClusterAffinity
fn clone(&self) -> ClusterAffinity
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for ClusterAffinity
impl Debug for ClusterAffinity
source§impl Default for ClusterAffinity
impl Default for ClusterAffinity
source§fn default() -> ClusterAffinity
fn default() -> ClusterAffinity
source§impl<'de> Deserialize<'de> for ClusterAffinity
impl<'de> Deserialize<'de> for ClusterAffinity
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl JsonSchema for ClusterAffinity
impl JsonSchema for ClusterAffinity
source§fn schema_name() -> String
fn schema_name() -> String
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreAuto Trait Implementations§
impl Freeze for ClusterAffinity
impl RefUnwindSafe for ClusterAffinity
impl Send for ClusterAffinity
impl Sync for ClusterAffinity
impl Unpin for ClusterAffinity
impl UnwindSafe for ClusterAffinity
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more