diff --git a/deploy/helm/templates/api-service/hpa.yaml b/deploy/helm/templates/api-service/hpa.yaml index 37e315596..85af9e728 100644 --- a/deploy/helm/templates/api-service/hpa.yaml +++ b/deploy/helm/templates/api-service/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.apiService.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "lowcoder.fullname" . }}-api-service @@ -17,12 +17,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.apiService.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.apiService.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.apiService.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.apiService.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.apiService.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/deploy/helm/templates/frontend/hpa.yaml b/deploy/helm/templates/frontend/hpa.yaml index b0c2ee026..2122773ed 100644 --- a/deploy/helm/templates/frontend/hpa.yaml +++ b/deploy/helm/templates/frontend/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.frontend.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "lowcoder.fullname" . }}-frontend @@ -17,12 +17,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.frontend.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.frontend.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.frontend.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.frontend.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.frontend.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/deploy/helm/templates/node-service/hpa.yaml b/deploy/helm/templates/node-service/hpa.yaml index 6871942eb..c7cc49f12 100644 --- a/deploy/helm/templates/node-service/hpa.yaml +++ b/deploy/helm/templates/node-service/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.nodeService.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "lowcoder.fullname" . }}-node-service @@ -17,12 +17,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.nodeService.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.nodeService.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.nodeService.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.nodeService.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.nodeService.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}