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 f563a4f600
commit 228d154286

View file

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