github.com/verrazzano/verrazzano@v1.7.0/platform-operator/thirdparty/charts/thanos/templates/receive/hpa.yaml (about) 1 {{- if and .Values.receive.enabled .Values.receive.autoscaling.enabled }} 2 apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }} 3 kind: HorizontalPodAutoscaler 4 metadata: 5 name: {{ include "common.names.fullname" . }}-receive 6 namespace: {{ .Release.Namespace | quote }} 7 labels: {{- include "common.labels.standard" . | nindent 4 }} 8 app.kubernetes.io/component: receive 9 {{- if .Values.commonLabels }} 10 {{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }} 11 {{- end }} 12 {{- if .Values.commonAnnotations }} 13 annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }} 14 {{- end }} 15 spec: 16 scaleTargetRef: 17 apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }} 18 kind: StatefulSet 19 name: {{ include "common.names.fullname" . }}-receive 20 minReplicas: {{ .Values.receive.autoscaling.minReplicas }} 21 maxReplicas: {{ .Values.receive.autoscaling.maxReplicas }} 22 metrics: 23 {{- if .Values.receive.autoscaling.targetMemory }} 24 - type: Resource 25 resource: 26 name: memory 27 {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} 28 targetAverageUtilization: {{ .Values.receive.autoscaling.targetMemory }} 29 {{- else }} 30 target: 31 type: Utilization 32 averageUtilization: {{ .Values.receive.autoscaling.targetMemory }} 33 {{- end }} 34 {{- end }} 35 {{- if .Values.receive.autoscaling.targetCPU }} 36 - type: Resource 37 resource: 38 name: cpu 39 {{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) }} 40 targetAverageUtilization: {{ .Values.receive.autoscaling.targetCPU }} 41 {{- else }} 42 target: 43 type: Utilization 44 averageUtilization: {{ .Values.receive.autoscaling.targetCPU }} 45 {{- end }} 46 {{- end }} 47 {{- end }}