pub struct PodAffinityTerm {
pub label_selector: Option<LabelSelector>,
pub namespace_selector: Option<LabelSelector>,
pub namespaces: Option<Vec<String>>,
pub topology_key: Option<String>,
}Expand description
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
Fields§
§label_selector: Option<LabelSelector>§namespace_selector: Option<LabelSelector>§namespaces: Option<Vec<String>>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" +optional
topology_key: Option<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.
Implementations§
Source§impl PodAffinityTerm
impl PodAffinityTerm
pub fn new() -> PodAffinityTerm
Trait Implementations§
Source§impl Clone for PodAffinityTerm
impl Clone for PodAffinityTerm
Source§fn clone(&self) -> PodAffinityTerm
fn clone(&self) -> PodAffinityTerm
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PodAffinityTerm
impl Debug for PodAffinityTerm
Source§impl<'de> Deserialize<'de> for PodAffinityTerm
impl<'de> Deserialize<'de> for PodAffinityTerm
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 FromStr for PodAffinityTerm
Converts Query Parameters representation (style=form, explode=false) to a PodAffinityTerm value
as specified in https://swagger.io/docs/specification/serialization/
Should be implemented in a serde deserializer
impl FromStr for PodAffinityTerm
Converts Query Parameters representation (style=form, explode=false) to a PodAffinityTerm value as specified in https://swagger.io/docs/specification/serialization/ Should be implemented in a serde deserializer
Source§impl PartialEq for PodAffinityTerm
impl PartialEq for PodAffinityTerm
Source§impl Serialize for PodAffinityTerm
impl Serialize for PodAffinityTerm
Source§impl ToString for PodAffinityTerm
Converts the PodAffinityTerm value to the Query Parameters representation (style=form, explode=false)
specified in https://swagger.io/docs/specification/serialization/
Should be implemented in a serde serializer
impl ToString for PodAffinityTerm
Converts the PodAffinityTerm value to the Query Parameters representation (style=form, explode=false) specified in https://swagger.io/docs/specification/serialization/ Should be implemented in a serde serializer