Class PodAffinityTerm.Builder
- java.lang.Object
-
- com.marcnuri.yakc.model.io.k8s.api.core.v1.PodAffinityTerm.Builder
-
- Enclosing class:
- PodAffinityTerm
public static class PodAffinityTerm.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PodAffinityTerm.Builder
addToNamespaces(java.lang.String addToNamespaces)
PodAffinityTerm
build()
PodAffinityTerm.Builder
clearNamespaces()
PodAffinityTerm.Builder
labelSelector(LabelSelector labelSelector)
PodAffinityTerm.Builder
namespaces(java.util.Collection<? extends java.lang.String> namespaces)
PodAffinityTerm.Builder
topologyKey(@NonNull java.lang.String 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.java.lang.String
toString()
-
-
-
Method Detail
-
labelSelector
public PodAffinityTerm.Builder labelSelector(LabelSelector labelSelector)
-
addToNamespaces
public PodAffinityTerm.Builder addToNamespaces(java.lang.String addToNamespaces)
-
namespaces
public PodAffinityTerm.Builder namespaces(java.util.Collection<? extends java.lang.String> namespaces)
-
clearNamespaces
public PodAffinityTerm.Builder clearNamespaces()
-
topologyKey
public PodAffinityTerm.Builder topologyKey(@NonNull @NonNull java.lang.String 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.- Returns:
this
.
-
build
public PodAffinityTerm build()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-