ensured hpa mem spec before cpu spec (#10043)

This commit is contained in:
Long Wu Yuan 2023-06-05 20:37:27 +05:30 committed by GitHub
parent 1503695b30
commit 7d27f39953
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -21,14 +21,6 @@ spec:
minReplicas: {{ .Values.controller.autoscaling.minReplicas }}
maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }}
metrics:
{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
@ -37,6 +29,14 @@ spec:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
target:
type: Utilization
averageUtilization: {{ . }}
{{- end }}
{{- with .Values.controller.autoscalingTemplate }}
{{- toYaml . | nindent 2 }}
{{- end }}