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

26 lines
870 B
YAML

{{- if .Values.vmselect.horizontalPodAutoscaler.enabled }}
{{- if .Capabilities.APIVersions.Has "autoscaling/v2" -}}
apiVersion: autoscaling/v2
{{- else}}
apiVersion: autoscaling/v2beta2
{{- end}}
kind: HorizontalPodAutoscaler
metadata:
labels:
{{- include "victoria-metrics.vmselect.labels" . | nindent 4 }}
{{- with .Values.vmselect.extraLabels }}
{{ toYaml . | indent 4 }}
{{- end }}
name: {{ template "victoria-metrics.vmselect.fullname" . }}
namespace: {{ .Release.Namespace }}
spec:
maxReplicas: {{ .Values.vmselect.horizontalPodAutoscaler.maxReplicas }}
minReplicas: {{ .Values.vmselect.horizontalPodAutoscaler.minReplicas }}
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ template "victoria-metrics.vmselect.fullname" . }}
metrics:
{{ toYaml .Values.vmselect.horizontalPodAutoscaler.metrics | indent 4 }}
{{- end -}}