12345678910111213141516171819202122232425 |
- {{- if .Values.autoscaling.enabled }}
- apiVersion: autoscaling/v2beta1
- kind: HorizontalPodAutoscaler
- metadata:
- name: {{ template "grafana.fullname" . }}
- namespace: {{ template "grafana.namespace" . }}
- labels:
- app.kubernetes.io/name: {{ template "grafana.name" . }}
- helm.sh/chart: {{ template "grafana.chart" . }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- spec:
- scaleTargetRef:
- apiVersion: apps/v1
- {{- if eq .Values.persistence.type "statefulset" }}
- kind: StatefulSet
- {{- else }}
- kind: Deployment
- {{- end }}
- name: {{ template "grafana.fullname" . }}
- minReplicas: {{ .Values.autoscaling.minReplicas }}
- maxReplicas: {{ .Values.autoscaling.maxReplicas }}
- metrics:
- {{ toYaml .Values.autoscaling.metrics | indent 4 }}
- {{- end }}
|