Package kubevirt.io

Class V1PodAffinityTerm

java.lang.Object
kubevirt.io.V1PodAffinityTerm

@Generated(value="io.swagger.codegen.languages.JavaClientCodegen", date="2019-11-10T14:44:51.030+02:00") 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()
  • Method Details

    • labelSelector

      public V1PodAffinityTerm labelSelector(V1LabelSelector labelSelector)
    • getLabelSelector

      public V1LabelSelector getLabelSelector()
      A label query over a set of resources, in this case pods.
      Returns:
      labelSelector
    • setLabelSelector

      public void setLabelSelector(V1LabelSelector labelSelector)
    • namespaces

      public V1PodAffinityTerm namespaces(List<String> namespaces)
    • addNamespacesItem

      public V1PodAffinityTerm addNamespacesItem(String namespacesItem)
    • getNamespaces

      public List<String> getNamespaces()
      namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means \"this pod's namespace\"
      Returns:
      namespaces
    • setNamespaces

      public void setNamespaces(List<String> namespaces)
    • topologyKey

      public V1PodAffinityTerm topologyKey(String topologyKey)
    • 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:
      topologyKey
    • setTopologyKey

      public void setTopologyKey(String topologyKey)
    • 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
    • toIndentedString

      private String toIndentedString(Object o)
      Convert the given object to string with each line indented by 4 spaces (except the first line).