OS
Schema Hub

ExternalMetricSource

ExternalMetricSource indicates how to scale on a metric not associated with any Kubernetes object (for example length of queue in cloud messaging service, or QPS from loadbalancer running outside of cluster).

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

Resource Structure

metricobjectRequired
metric identifies the target metric by name and selector
targetobjectRequired
target specifies the target value for the given metric