| {{- if or (eq .Values.role "Aggregator") (eq .Values.role "Stateless-Aggregator") -}} |
| {{- if .Values.autoscaling.enabled }} |
| apiVersion: {{ template "autoscaling.apiVersion" . }} |
| kind: HorizontalPodAutoscaler |
| name: {{ include "vector.fullname" . }} |
| {{- include "vector.labels" . | nindent 4 }} |
| {{- toYaml .Values.autoscaling.annotations | nindent 4 }} |
| {{- if (eq .Values.role "Aggregator") }} |
| {{- else if (eq .Values.role "Stateless-Aggregator") }} |
| name: {{ include "vector.fullname" . }} |
| minReplicas: {{ .Values.autoscaling.minReplicas }} |
| maxReplicas: {{ .Values.autoscaling.maxReplicas }} |
| {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} |
| averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} |
| {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} |
| averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} |
| {{- with .Values.autoscaling.customMetric -}} |
| {{ toYaml . | nindent 4 }} |
| {{- with .Values.autoscaling.behavior }} |
| {{- toYaml . | nindent 4 }} |