Package kubevirt.io

Class V1PodAffinityTerm


  • @Generated(value="io.swagger.codegen.languages.JavaClientCodegen",
               date="2019-11-10T14:44:51.030+02:00")
    public class V1PodAffinityTerm
    extends java.lang.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 Detail

      • namespaces

        private java.util.List<java.lang.String> namespaces
      • topologyKey

        private java.lang.String topologyKey
    • Constructor Detail

      • V1PodAffinityTerm

        public V1PodAffinityTerm()
    • Method Detail

      • 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​(java.util.List<java.lang.String> namespaces)
      • addNamespacesItem

        public V1PodAffinityTerm addNamespacesItem​(java.lang.String namespacesItem)
      • getNamespaces

        public java.util.List<java.lang.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​(java.util.List<java.lang.String> namespaces)
      • topologyKey

        public V1PodAffinityTerm topologyKey​(java.lang.String topologyKey)
      • getTopologyKey

        public java.lang.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​(java.lang.String topologyKey)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toIndentedString

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