LabelSelectorRequirement¶
- pydantic model controller.models.domain.kubernetes.LabelSelectorRequirement¶
Single rule for label matching.
- Parameters:
data (
Any
)
Show JSON schema
{ "title": "LabelSelectorRequirement", "description": "Single rule for label matching.", "type": "object", "properties": { "key": { "description": "Label key to match", "title": "Key", "type": "string" }, "operator": { "$ref": "#/$defs/LabelSelectorOperator", "description": "Label match operator", "title": "Operator" }, "values": { "default": [], "description": "For ``In`` and ``NotIn``, matches any value in this list. For ``Exists`` or ``DoesNotExist``, must be empty.", "items": { "type": "string" }, "title": "Matching values", "type": "array" } }, "$defs": { "LabelSelectorOperator": { "description": "Match operations for label selectors.", "enum": [ "In", "NotIn", "Exists", "DoesNotExist" ], "title": "LabelSelectorOperator", "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[LabelSelectorOperator, Field(title='Operator', description='Label match operator')] [Required]¶
Label match operator
- Validated by:
_validate
-
field values: Annotated[list[str], Field(title='Matching values', description='For
In
andNotIn
, matches any value in this list. ForExists
orDoesNotExist
, must be empty.')] = []¶ For
In
andNotIn
, matches any value in this list. ForExists
orDoesNotExist
, must be empty.- Validated by:
_validate
- to_kubernetes()¶
Convert to the corresponding Kubernetes model.
- Return type:
V1LabelSelectorRequirement