fix(template): hpa context and path to hpa settings (#30843)

Signed-off-by: Simon Leonard <git-1001af4@sinux.sh>
This commit is contained in:
Simon Leonard
2024-12-12 14:06:37 +01:00
committed by GitHub
parent b6067b1641
commit ec253b2fcb
+3 -3
View File
@@ -4,7 +4,7 @@ SPDX-License-Identifier: APACHE-2.0
*/}}
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.enabled }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" . }}
apiVersion: {{ include "common.capabilities.hpa.apiVersion" ( dict "context" $ ) }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "common.names.fullname" . }}
@@ -31,7 +31,7 @@ spec:
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.worker.autoscaling.hpa.targetMemory }}
averageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetMemory }}
{{- end }}
{{- end }}
{{- if .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetCPU }}
@@ -43,7 +43,7 @@ spec:
{{- else }}
target:
type: Utilization
averageUtilization: {{ .Values.worker.autoscaling.hpa.targetCPU }}
averageUtilization: {{ .Values.%%MAIN_OBJECT_BLOCK%%.autoscaling.hpa.targetCPU }}
{{- end }}
{{- end }}
{{- end }}