From de13551ecbd880461ecf899c0414fc445aaff52b Mon Sep 17 00:00:00 2001 From: Yaron Idan Date: Wed, 3 Jun 2020 18:18:20 +0300 Subject: [PATCH] Reverse HPA metrics order (#22626) * Reverse HPA metrics order Closes #22620 Signed-off-by: Yaron Idan * Bump chart version Signed-off-by: Yaron Idan --- stable/nginx-ingress/Chart.yaml | 2 +- stable/nginx-ingress/templates/controller-hpa.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/stable/nginx-ingress/Chart.yaml b/stable/nginx-ingress/Chart.yaml index 78f602de86..cb7a44cdf9 100644 --- a/stable/nginx-ingress/Chart.yaml +++ b/stable/nginx-ingress/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 name: nginx-ingress -version: 1.39.0 +version: 1.39.1 appVersion: 0.32.0 home: https://github.com/kubernetes/ingress-nginx description: An nginx Ingress controller that uses ConfigMap to store the nginx configuration. diff --git a/stable/nginx-ingress/templates/controller-hpa.yaml b/stable/nginx-ingress/templates/controller-hpa.yaml index 77d353389b..dd37ffdba5 100644 --- a/stable/nginx-ingress/templates/controller-hpa.yaml +++ b/stable/nginx-ingress/templates/controller-hpa.yaml @@ -18,17 +18,17 @@ spec: minReplicas: {{ .Values.controller.autoscaling.minReplicas }} maxReplicas: {{ .Values.controller.autoscaling.maxReplicas }} metrics: -{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ . }} -{{- end }} {{- with .Values.controller.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory targetAverageUtilization: {{ . }} {{- end }} +{{- with .Values.controller.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ . }} +{{- end }} {{- end }} {{- end }}