PodAffinityTerm

case class PodAffinityTerm(labelSelector: Optional[LabelSelector], namespaces: Optional[Vector[String]], topologyKey: String)

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 matches that of any node on which a pod of the set of pods is running

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 matches that of any node on which a pod of the set of pods is running

Value Params
namespaces

namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace"

topologyKey

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.

Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

Gets labelSelector.

Gets labelSelector.

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getNamespaces: IO[K8sFailure, Vector[String]]

namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace"

namespaces specifies which namespaces the labelSelector applies to (matches against); null or empty list means "this pod's namespace"

If the field is not present, fails with com.coralogix.zio.k8s.client.UndefinedField.

def getTopologyKey: IO[K8sFailure, 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.

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.

This effect always succeeds, it is safe to use the field topologyKey directly.

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product