From 2f566d7882a9a5cd6fe1546cefbc2aa57f5595df Mon Sep 17 00:00:00 2001 From: Andrei Kostylev Date: Thu, 30 Nov 2023 14:53:02 +0300 Subject: [PATCH] fix: hpa --- charts/ton-grpc/templates/hpa.yaml | 16 ++-------------- charts/ton-grpc/values.yaml | 1 - charts/tvm-grpc/templates/hpa.yaml | 16 ++-------------- charts/tvm-grpc/values.yaml | 1 - 4 files changed, 4 insertions(+), 30 deletions(-) diff --git a/charts/ton-grpc/templates/hpa.yaml b/charts/ton-grpc/templates/hpa.yaml index 45391779..0837573c 100644 --- a/charts/ton-grpc/templates/hpa.yaml +++ b/charts/ton-grpc/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: {{ include "ton-grpc.fullname" . }} @@ -12,17 +12,5 @@ spec: name: {{ include "ton-grpc.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} + targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} diff --git a/charts/ton-grpc/values.yaml b/charts/ton-grpc/values.yaml index 71a9b5c8..8c781065 100644 --- a/charts/ton-grpc/values.yaml +++ b/charts/ton-grpc/values.yaml @@ -80,7 +80,6 @@ autoscaling: minReplicas: 1 maxReplicas: 100 targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 nodeSelector: {} diff --git a/charts/tvm-grpc/templates/hpa.yaml b/charts/tvm-grpc/templates/hpa.yaml index f8a2a2de..d37820d6 100644 --- a/charts/tvm-grpc/templates/hpa.yaml +++ b/charts/tvm-grpc/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v1 kind: HorizontalPodAutoscaler metadata: name: {{ include "tvm-grpc.fullname" . }} @@ -12,17 +12,5 @@ spec: name: {{ include "tvm-grpc.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} - metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} + targetCPUUtilizationPercentage: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} diff --git a/charts/tvm-grpc/values.yaml b/charts/tvm-grpc/values.yaml index 85ba5c6d..30b2b7d1 100644 --- a/charts/tvm-grpc/values.yaml +++ b/charts/tvm-grpc/values.yaml @@ -74,7 +74,6 @@ autoscaling: minReplicas: 1 maxReplicas: 100 targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 nodeSelector: {}