WeightedPodAffinityTerm

pydantic model controller.models.domain.kubernetes.WeightedPodAffinityTerm

Pod matching term for pod affinity with an associated weight.

Parameters:

data (Any)

Show JSON schema
{
   "title": "WeightedPodAffinityTerm",
   "description": "Pod matching term for pod affinity with an associated weight.",
   "type": "object",
   "properties": {
      "podAffinityTerm": {
         "$ref": "#/$defs/PodAffinityTerm",
         "description": "Pod affinity matching term",
         "title": "Matching term"
      },
      "weight": {
         "description": "Weight to associate with pods matching this term",
         "maximum": 100,
         "minimum": 1,
         "title": "Associated weight",
         "type": "integer"
      }
   },
   "$defs": {
      "LabelSelector": {
         "additionalProperties": false,
         "description": "Rule for matching labels of pods or namespaces.\n\nAll provided expressions must match. (In other words, they are combined\nwith and.)",
         "properties": {
            "matchExpressions": {
               "default": [],
               "description": "Rules for matching labels",
               "items": {
                  "$ref": "#/$defs/LabelSelectorRequirement"
               },
               "title": "Label match expressions",
               "type": "array"
            },
            "matchLabels": {
               "additionalProperties": {
                  "type": "string"
               },
               "default": {},
               "description": "Label keys and values that must be set",
               "title": "Exact label matches",
               "type": "object"
            }
         },
         "title": "LabelSelector",
         "type": "object"
      },
      "LabelSelectorOperator": {
         "description": "Match operations for label selectors.",
         "enum": [
            "In",
            "NotIn",
            "Exists",
            "DoesNotExist"
         ],
         "title": "LabelSelectorOperator",
         "type": "string"
      },
      "LabelSelectorRequirement": {
         "additionalProperties": false,
         "description": "Single rule for label matching.",
         "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"
            }
         },
         "required": [
            "key",
            "operator"
         ],
         "title": "LabelSelectorRequirement",
         "type": "object"
      },
      "PodAffinityTerm": {
         "additionalProperties": false,
         "description": "Pod matching term for pod affinity.",
         "properties": {
            "labelSelector": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/LabelSelector"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Match rules for pod labels",
               "title": "Pod label match"
            },
            "namespaceSelector": {
               "anyOf": [
                  {
                     "$ref": "#/$defs/LabelSelector"
                  },
                  {
                     "type": "null"
                  }
               ],
               "default": null,
               "description": "Match rules for namespace labels",
               "title": "Namespace label match"
            },
            "namespaces": {
               "default": [],
               "description": "List of namespaces to which this term applies. The term will apply to the union of this list of namespaces and any namespaces that match ``namespaceSelector``, if given. If both are empty, only the pod's namespace is matched.",
               "items": {
                  "type": "string"
               },
               "title": "Matching namespaces",
               "type": "array"
            },
            "topologyKey": {
               "description": "Name of the node label that should match between nodes to consider two pods to be scheduled on adjacent nodes, which in turn is the definition of an affinity (and the opposite of an anti-affinity).",
               "title": "Node topology label",
               "type": "string"
            }
         },
         "required": [
            "topologyKey"
         ],
         "title": "PodAffinityTerm",
         "type": "object"
      }
   },
   "additionalProperties": false,
   "required": [
      "podAffinityTerm",
      "weight"
   ]
}

Fields:
field podAffinityTerm: PodAffinityTerm [Required] (name 'pod_affinity_term')

Pod affinity matching term

field weight: int [Required]

Weight to associate with pods matching this term

Constraints:
  • ge = 1

  • le = 100

to_kubernetes()

Convert to the corresponding Kubernetes model.

Return type:

V1WeightedPodAffinityTerm