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": {
         "allOf": [
            {
               "$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: str [Required]

Label key to match

Validated by:
  • _validate

field operator: NodeSelectorOperator [Required]

Match operation to use

Validated by:
  • _validate

field values: list[str] = []

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.

Validated by:
  • _validate

to_kubernetes()

Convert to the corresponding Kubernetes model.

Return type:

V1NodeSelectorRequirement