kubernetes_asyncio.client.models.v1_pod_affinity_term module
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.34.3 Generated by: https://openapi-generator.tech
- class kubernetes_asyncio.client.models.v1_pod_affinity_term.V1PodAffinityTerm(label_selector=None, match_label_keys=None, mismatch_label_keys=None, namespace_selector=None, namespaces=None, topology_key=None, local_vars_configuration=None)
Bases:
objectNOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech
Do not edit the class manually.
- attribute_map = {'label_selector': 'labelSelector', 'match_label_keys': 'matchLabelKeys', 'mismatch_label_keys': 'mismatchLabelKeys', 'namespace_selector': 'namespaceSelector', 'namespaces': 'namespaces', 'topology_key': 'topologyKey'}
- property label_selector
Gets the label_selector of this V1PodAffinityTerm. # noqa: E501
- Returns:
The label_selector of this V1PodAffinityTerm. # noqa: E501
- Return type:
- property match_label_keys
Gets the match_label_keys of this V1PodAffinityTerm. # noqa: E501
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. # noqa: E501
- Returns:
The match_label_keys of this V1PodAffinityTerm. # noqa: E501
- Return type:
list[str]
- property mismatch_label_keys
Gets the mismatch_label_keys of this V1PodAffinityTerm. # noqa: E501
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. # noqa: E501
- Returns:
The mismatch_label_keys of this V1PodAffinityTerm. # noqa: E501
- Return type:
list[str]
- property namespace_selector
Gets the namespace_selector of this V1PodAffinityTerm. # noqa: E501
- Returns:
The namespace_selector of this V1PodAffinityTerm. # noqa: E501
- Return type:
- property namespaces
Gets the namespaces of this V1PodAffinityTerm. # noqa: E501
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”. # noqa: E501
- Returns:
The namespaces of this V1PodAffinityTerm. # noqa: E501
- Return type:
list[str]
- openapi_types = {'label_selector': 'V1LabelSelector', 'match_label_keys': 'list[str]', 'mismatch_label_keys': 'list[str]', 'namespace_selector': 'V1LabelSelector', 'namespaces': 'list[str]', 'topology_key': 'str'}
- to_dict(serialize=False)
Returns the model properties as a dict
- to_str()
Returns the string representation of the model
- property topology_key
Gets the topology_key of this V1PodAffinityTerm. # noqa: E501
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. # noqa: E501
- Returns:
The topology_key of this V1PodAffinityTerm. # noqa: E501
- Return type:
str