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.
    • 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