NodeSelectorRequirement¶
- pydantic model controller.models.domain.kubernetes.NodeSelectorRequirement¶
Individual match rule for nodes.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "NodeSelectorRequirement", "description": "Individual match rule for nodes.", "type": "object", "properties": { "key": { "description": "Label key to match", "title": "Key", "type": "string" }, "operator": { "$ref": "#/$defs/NodeSelectorOperator", "description": "Match operation to use", "title": "Operator" }, "values": { "default": [], "description": "For ``In`` and ``NotIn``, matches any value in this list. For ``Gt`` or ``Lt``, must contain a single member interpreted as an integer. For ``Exists`` or ``DoesNotExist``, must be empty.", "items": { "type": "string" }, "title": "Matching values", "type": "array" } }, "$defs": { "NodeSelectorOperator": { "description": "Match operations for node selectors.", "enum": [ "In", "NotIn", "Exists", "DoesNotExist", "Gt", "Lt" ], "title": "NodeSelectorOperator", "type": "string" } }, "additionalProperties": false, "required": [ "key", "operator" ] }
- Fields:
- Validators:
_validate
»all fields
- field key: Annotated[str, Field(title='Key', description='Label key to match')] [Required]¶
Label key to match
- Validated by:
_validate
- field operator: Annotated[NodeSelectorOperator, Field(title='Operator', description='Match operation to use')] [Required]¶
Match operation to use
- Validated by:
_validate
-
field values: Annotated[list[str], Field(title='Matching values', description='For
In
andNotIn
, matches any value in this list. ForGt
orLt
, must contain a single member interpreted as an integer. ForExists
orDoesNotExist
, must be empty.')] = []¶ For
In
andNotIn
, matches any value in this list. ForGt
orLt
, must contain a single member interpreted as an integer. ForExists
orDoesNotExist
, must be empty.- Validated by:
_validate
- to_kubernetes()¶
Convert to the corresponding Kubernetes model.
- Return type:
V1NodeSelectorRequirement