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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddmatchLabelKeysItem
(String matchLabelKeysItem) Add an item to the matchLabelKeys property in a chainable fashion.addmismatchLabelKeysItem
(String mismatchLabelKeysItem) Add an item to the mismatchLabelKeys property in a chainable fashion.addnamespacesItem
(String namespacesItem) Add an item to the namespaces property in a chainable fashion.boolean
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration.namespaces specifies a static list of namespace names that the term applies to.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.int
hashCode()
labelSelector
(V1LabelSelector labelSelector) Set labelSelector in a chainable fashion.matchLabelKeys
(List<@NotNull String> matchLabelKeys) Set matchLabelKeys in a chainable fashion.mismatchLabelKeys
(List<@NotNull String> mismatchLabelKeys) Set mismatchLabelKeys in a chainable fashion.namespaces
(List<@NotNull String> namespaces) Set namespaces in a chainable fashion.namespaceSelector
(V1LabelSelector namespaceSelector) Set namespaceSelector in a chainable fashion.void
setLabelSelector
(V1LabelSelector labelSelector) Set the labelSelector property valuevoid
setMatchLabelKeys
(List<@NotNull String> matchLabelKeys) Set the matchLabelKeys property valuevoid
setMismatchLabelKeys
(List<@NotNull String> mismatchLabelKeys) Set the mismatchLabelKeys property valuevoid
setNamespaces
(List<@NotNull String> namespaces) Set the namespaces property valuevoid
setNamespaceSelector
(V1LabelSelector namespaceSelector) Set the namespaceSelector property valuevoid
setTopologyKey
(String topologyKey) Set the topologyKey property valuetopologyKey
(String topologyKey) Set topologyKey in a chainable fashion.toString()
-
Field Details
-
JSON_PROPERTY_TOPOLOGY_KEY
- See Also:
-
JSON_PROPERTY_LABEL_SELECTOR
- See Also:
-
JSON_PROPERTY_MATCH_LABEL_KEYS
- See Also:
-
JSON_PROPERTY_MISMATCH_LABEL_KEYS
- See Also:
-
JSON_PROPERTY_NAMESPACE_SELECTOR
- See Also:
-
JSON_PROPERTY_NAMESPACES
- See Also:
-
-
Constructor Details
-
V1PodAffinityTerm
-
-
Method Details
-
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
Set the topologyKey property value- Parameters:
topologyKey
- property value to set
-
topologyKey
Set topologyKey in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
getLabelSelector
- Returns:
- the labelSelector property value
-
setLabelSelector
Set the labelSelector property value- Parameters:
labelSelector
- property value to set
-
labelSelector
Set labelSelector in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
getMatchLabelKeys
MatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key in (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both matchLabelKeys and labelSelector. Also, matchLabelKeys cannot be set when labelSelector isn't set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).- Returns:
- the matchLabelKeys property value
-
setMatchLabelKeys
Set the matchLabelKeys property value- Parameters:
matchLabelKeys
- property value to set
-
matchLabelKeys
Set matchLabelKeys in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
addmatchLabelKeysItem
Add an item to the matchLabelKeys property in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
getMismatchLabelKeys
MismatchLabelKeys is a set of pod label keys to select which pods will be taken into consideration. The keys are used to lookup values from the incoming pod labels, those key-value labels are merged with `labelSelector` as `key notin (value)` to select the group of existing pods which pods will be taken into consideration for the incoming pod's pod (anti) affinity. Keys that don't exist in the incoming pod labels will be ignored. The default value is empty. The same key is forbidden to exist in both mismatchLabelKeys and labelSelector. Also, mismatchLabelKeys cannot be set when labelSelector isn't set. This is a beta field and requires enabling MatchLabelKeysInPodAffinity feature gate (enabled by default).- Returns:
- the mismatchLabelKeys property value
-
setMismatchLabelKeys
Set the mismatchLabelKeys property value- Parameters:
mismatchLabelKeys
- property value to set
-
mismatchLabelKeys
Set mismatchLabelKeys in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
addmismatchLabelKeysItem
Add an item to the mismatchLabelKeys property in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
getNamespaceSelector
- Returns:
- the namespaceSelector property value
-
setNamespaceSelector
Set the namespaceSelector property value- Parameters:
namespaceSelector
- property value to set
-
namespaceSelector
Set namespaceSelector in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
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
Set the namespaces property value- Parameters:
namespaces
- property value to set
-
namespaces
Set namespaces in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
addnamespacesItem
Add an item to the namespaces property in a chainable fashion.- Returns:
- The same instance of V1PodAffinityTerm for chaining.
-
equals
-
hashCode
public int hashCode() -
toString
-