Files
devops-infra-helm-charts-gcp/helm-templates/victoria-metrics-agent-latest/templates/hpa.yaml
T
2026-08-26 03:39:42 +05:30

26 lines
787 B
YAML

{{- $hpa := .Values.horizontalPodAutoscaling }}
{{- if $hpa.enabled }}
{{- $ctx := dict "helm" . }}
{{- $fullname := include "vm.plain.fullname" $ctx }}
{{- $ns := include "vm.namespace" $ctx }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
metadata:
{{- $_ := set $ctx "extraLabels" .Values.extraLabels }}
labels: {{ include "vm.labels" $ctx | nindent 4 }}
{{- $_ := unset $ctx "extraLabels" }}
name: {{ $fullname }}
namespace: {{ $ns }}
spec:
maxReplicas: {{ $hpa.maxReplicas }}
minReplicas: {{ $hpa.minReplicas }}
scaleTargetRef:
apiVersion: apps/v1
kind: {{ title .Values.mode }}
name: {{ $fullname }}
metrics: {{ toYaml $hpa.metrics | nindent 4 }}
{{- with $hpa.behavior }}
behavior: {{ toYaml . | nindent 4 }}
{{- end -}}
{{- end -}}