From 5bcbb81779e6436c53f444ae66838ed0f27e0372 Mon Sep 17 00:00:00 2001 From: longwuyuan Date: Mon, 5 Jun 2023 17:08:20 +0530 Subject: [PATCH] ensured hpa mem spec before cpu spec --- charts/ingress-nginx/templates/controller-hpa.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/ingress-nginx/templates/controller-hpa.yaml b/charts/ingress-nginx/templates/controller-hpa.yaml index 96a91f5332..f212bc4f53 100644 --- a/charts/ingress-nginx/templates/controller-hpa.yaml +++ b/charts/ingress-nginx/templates/controller-hpa.yaml @@ -21,18 +21,18 @@ spec: minReplicas: {{ .Values.controller.autoscaling.minReplicas }} maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }} metrics: - {{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }} + {{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: - name: cpu + name: memory target: type: Utilization averageUtilization: {{ . }} {{- end }} - {{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} + {{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }} - type: Resource resource: - name: memory + name: cpu target: type: Utilization averageUtilization: {{ . }}