Class V1PodAffinityTerm

java.lang.Object
io.micronaut.kubernetes.client.openapi.model.V1PodAffinityTerm

@Generated("io.micronaut.openapi.generator.JavaMicronautClientCodegen") public class V1PodAffinityTerm extends Object
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
  • Field Details

  • Constructor Details

    • V1PodAffinityTerm

      public V1PodAffinityTerm(String topologyKey)
  • Method Details

    • getTopologyKey

      public String getTopologyKey()
      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.
      Returns:
      the topologyKey property value
    • setTopologyKey

      public void setTopologyKey(String topologyKey)
      Set the topologyKey property value
      Parameters:
      topologyKey - property value to set
    • topologyKey

      public V1PodAffinityTerm topologyKey(String topologyKey)
      Set topologyKey in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • getLabelSelector

      public V1LabelSelector getLabelSelector()
      Returns:
      the labelSelector property value
    • setLabelSelector

      public void setLabelSelector(V1LabelSelector labelSelector)
      Set the labelSelector property value
      Parameters:
      labelSelector - property value to set
    • labelSelector

      public V1PodAffinityTerm labelSelector(V1LabelSelector labelSelector)
      Set labelSelector in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • getMatchLabelKeys

      public List<@NotNull String> getMatchLabelKeys()
      MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
      Returns:
      the matchLabelKeys property value
    • setMatchLabelKeys

      public void setMatchLabelKeys(List<@NotNull String> matchLabelKeys)
      Set the matchLabelKeys property value
      Parameters:
      matchLabelKeys - property value to set
    • matchLabelKeys

      public V1PodAffinityTerm matchLabelKeys(List<@NotNull String> matchLabelKeys)
      Set matchLabelKeys in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • addmatchLabelKeysItem

      public V1PodAffinityTerm addmatchLabelKeysItem(String matchLabelKeysItem)
      Add an item to the matchLabelKeys property in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • getMismatchLabelKeys

      public List<@NotNull String> getMismatchLabelKeys()
      MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).
      Returns:
      the mismatchLabelKeys property value
    • setMismatchLabelKeys

      public void setMismatchLabelKeys(List<@NotNull String> mismatchLabelKeys)
      Set the mismatchLabelKeys property value
      Parameters:
      mismatchLabelKeys - property value to set
    • mismatchLabelKeys

      public V1PodAffinityTerm mismatchLabelKeys(List<@NotNull String> mismatchLabelKeys)
      Set mismatchLabelKeys in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • addmismatchLabelKeysItem

      public V1PodAffinityTerm addmismatchLabelKeysItem(String mismatchLabelKeysItem)
      Add an item to the mismatchLabelKeys property in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • getNamespaceSelector

      public V1LabelSelector getNamespaceSelector()
      Returns:
      the namespaceSelector property value
    • setNamespaceSelector

      public void setNamespaceSelector(V1LabelSelector namespaceSelector)
      Set the namespaceSelector property value
      Parameters:
      namespaceSelector - property value to set
    • namespaceSelector

      public V1PodAffinityTerm namespaceSelector(V1LabelSelector namespaceSelector)
      Set namespaceSelector in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • getNamespaces

      public List<@NotNull String> getNamespaces()
      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\".
      Returns:
      the namespaces property value
    • setNamespaces

      public void setNamespaces(List<@NotNull String> namespaces)
      Set the namespaces property value
      Parameters:
      namespaces - property value to set
    • namespaces

      public V1PodAffinityTerm namespaces(List<@NotNull String> namespaces)
      Set namespaces in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • addnamespacesItem

      public V1PodAffinityTerm addnamespacesItem(String namespacesItem)
      Add an item to the namespaces property in a chainable fashion.
      Returns:
      The same instance of V1PodAffinityTerm for chaining.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object