From 05830c9609e47861388af7cbd0e07b8d51cd91a0 Mon Sep 17 00:00:00 2001 From: Julien Francoz Date: Mon, 9 Sep 2024 15:06:26 +0200 Subject: [PATCH] fix autoscaler/v2 (#567) --- helm/api-platform/templates/hpa.yaml | 8 ++++++-- helm/api-platform/templates/pwa-hpa.yaml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/helm/api-platform/templates/hpa.yaml b/helm/api-platform/templates/hpa.yaml index a8120171..55725a19 100644 --- a/helm/api-platform/templates/hpa.yaml +++ b/helm/api-platform/templates/hpa.yaml @@ -17,12 +17,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + type: Utilization {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + type: Utilization {{- end }} {{- end }} diff --git a/helm/api-platform/templates/pwa-hpa.yaml b/helm/api-platform/templates/pwa-hpa.yaml index 2780a592..4ccc99ae 100644 --- a/helm/api-platform/templates/pwa-hpa.yaml +++ b/helm/api-platform/templates/pwa-hpa.yaml @@ -17,12 +17,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + type: Utilization {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + type: Utilization {{- end }} {{- end }}