From 27b040b55f5094501851e5539ca5b0c7b828120f Mon Sep 17 00:00:00 2001 From: jlasut Date: Tue, 27 Aug 2024 13:36:12 +0200 Subject: [PATCH] Create missing hpa resource --- charts/komoplane/templates/hpa.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 charts/komoplane/templates/hpa.yaml diff --git a/charts/komoplane/templates/hpa.yaml b/charts/komoplane/templates/hpa.yaml new file mode 100644 index 0000000..93e783f --- /dev/null +++ b/charts/komoplane/templates/hpa.yaml @@ -0,0 +1,24 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "app.fullname" . }} + labels: + {{- include "app.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "app.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- with .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ . }} + {{- end }} +{{- end }}