OS
Schema Hub

WeightedPodAffinityTerm

The weights of all of the matched WeightedPodAffinityTerm fields are added per-node to find the most preferred node(s)

Schema URL
https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/core.api.k8s.io/WeightedPodAffinityTerm_v1.json
Usage examples
VS Code / yaml-language-server
# yaml-language-server: $schema=https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/core.api.k8s.io/WeightedPodAffinityTerm_v1.json
kubeconform
kubeconform -schema-location 'https://raw.githubusercontent.com/nlamirault/schema-hub/main/schemas/{{ .Group }}/{{ .ResourceKind }}_{{ .ResourceAPIVersion }}.json' manifest.yaml

Resource Structure

podAffinityTermobjectRequired
Required. A pod affinity term, associated with the corresponding weight.
weightintegerRequired
weight associated with matching the corresponding podAffinityTerm, in the range 1-100.