kubernetes.client.models.v1_topology_spread_constraint module

Kubernetes

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

The version of the OpenAPI document: release-1.36 Generated by OpenAPI Generator (https://openapi-generator.tech)

Do not edit the class manually.

class kubernetes.client.models.v1_topology_spread_constraint.V1TopologySpreadConstraint(*, label_selector: V1LabelSelector | None = None, match_label_keys: List[Annotated[str, Strict(strict=True)]] | None = None, max_skew: Annotated[int, Strict(strict=True)], min_domains: Annotated[int, Strict(strict=True)] | None = None, node_affinity_policy: Annotated[str, Strict(strict=True)] | None = None, node_taints_policy: Annotated[str, Strict(strict=True)] | None = None, topology_key: Annotated[str, Strict(strict=True)], when_unsatisfiable: Annotated[str, Strict(strict=True)])

Bases: BaseModel

TopologySpreadConstraint specifies how to spread matching pods among the given topology.

Attributes:
openapi_types (dict): The key is attribute name

and the value is attribute type.

attribute_map (dict): The key is attribute name

and the value is json key in definition.

attribute_map: ClassVar[Dict[str, str]] = {'label_selector': 'labelSelector', 'match_label_keys': 'matchLabelKeys', 'max_skew': 'maxSkew', 'min_domains': 'minDomains', 'node_affinity_policy': 'nodeAffinityPolicy', 'node_taints_policy': 'nodeTaintsPolicy', 'topology_key': 'topologyKey', 'when_unsatisfiable': 'whenUnsatisfiable'}
classmethod from_dict(obj: Dict[str, Any] | None) Self | None

Create an instance of V1TopologySpreadConstraint from a dict

classmethod from_json(json_str: str) Self | None

Create an instance of V1TopologySpreadConstraint from a JSON string

label_selector: V1LabelSelector | None
match_label_keys: List[StrictStr] | None
max_skew: StrictInt
min_domains: StrictInt | None
model_config = {'extra': 'forbid', 'protected_namespaces': (), 'validate_assignment': True, 'validate_by_alias': True, 'validate_by_name': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

node_affinity_policy: StrictStr | None
node_taints_policy: StrictStr | None
openapi_types: ClassVar[Dict[str, str]] = {'label_selector': 'V1LabelSelector', 'match_label_keys': 'List[str]', 'max_skew': 'int', 'min_domains': 'int', 'node_affinity_policy': 'str', 'node_taints_policy': 'str', 'topology_key': 'str', 'when_unsatisfiable': 'str'}
to_dict(serialize: bool = False) Dict[str, Any]

Return all declared model fields using public or wire names.

to_json() str

Returns the JSON representation of the model using alias

to_str() str

Returns the string representation of the model

topology_key: StrictStr
when_unsatisfiable: StrictStr