From a9251a8c8a689d60f396796e55081bdfa36826c2 Mon Sep 17 00:00:00 2001 From: rjshrjndrn Date: Mon, 8 Jul 2024 12:17:09 +0200 Subject: [PATCH] chore(hlem): hpa change to v2 --- .../openreplay/charts/alerts/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/assets/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/assist-stats/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/assist/templates/hpa.yaml | 10 +++++++--- .../charts/canvas-handler/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/chalice/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/connector/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/db/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/ender/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/frontend/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/heuristics/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/http/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/imagestorage/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/integrations/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/peers/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/quickwit/templates/hpa.yaml | 11 ++++++++--- .../openreplay/charts/sink/templates/hpa.yaml | 10 +++++++--- .../charts/sourcemapreader/templates/hpa.yaml | 10 +++++++--- .../openreplay/charts/storage/templates/hpa.yaml | 10 +++++++--- 19 files changed, 134 insertions(+), 57 deletions(-) diff --git a/scripts/helmcharts/openreplay/charts/alerts/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/alerts/templates/hpa.yaml index 75729660f..c3201a019 100644 --- a/scripts/helmcharts/openreplay/charts/alerts/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/alerts/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "alerts.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/assets/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/assets/templates/hpa.yaml index 43779c270..d00dfb455 100644 --- a/scripts/helmcharts/openreplay/charts/assets/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/assets/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "assets.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/assist-stats/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/assist-stats/templates/hpa.yaml index 08eae695d..d995876f9 100644 --- a/scripts/helmcharts/openreplay/charts/assist-stats/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/assist-stats/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "assist-stats.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/assist/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/assist/templates/hpa.yaml index 9419258e8..d40585667 100644 --- a/scripts/helmcharts/openreplay/charts/assist/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/assist/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "assist.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/canvas-handler/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/canvas-handler/templates/hpa.yaml index 6ead7769e..6fa784aec 100644 --- a/scripts/helmcharts/openreplay/charts/canvas-handler/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/canvas-handler/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "canvas-handler.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/chalice/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/chalice/templates/hpa.yaml index 8a2e193fb..f01222acc 100644 --- a/scripts/helmcharts/openreplay/charts/chalice/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/chalice/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "chalice.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/connector/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/connector/templates/hpa.yaml index 13c90c6a1..940409dd1 100644 --- a/scripts/helmcharts/openreplay/charts/connector/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/connector/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "connector.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/db/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/db/templates/hpa.yaml index 4fd1e9e15..dc532784b 100644 --- a/scripts/helmcharts/openreplay/charts/db/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/db/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "db.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/ender/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/ender/templates/hpa.yaml index ba09a028b..8c4e8ed13 100644 --- a/scripts/helmcharts/openreplay/charts/ender/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/ender/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "ender.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/frontend/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/frontend/templates/hpa.yaml index f897d6382..4b4153f6c 100644 --- a/scripts/helmcharts/openreplay/charts/frontend/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/frontend/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "frontend.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/heuristics/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/heuristics/templates/hpa.yaml index e4514835e..3b376610f 100644 --- a/scripts/helmcharts/openreplay/charts/heuristics/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/heuristics/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "heuristics.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/http/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/http/templates/hpa.yaml index 2ceeb047e..24314a480 100644 --- a/scripts/helmcharts/openreplay/charts/http/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/http/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "http.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/imagestorage/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/imagestorage/templates/hpa.yaml index 173118010..62b4d3919 100644 --- a/scripts/helmcharts/openreplay/charts/imagestorage/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/imagestorage/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "imagestorage.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/integrations/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/integrations/templates/hpa.yaml index a4fac85e4..4d63763e1 100644 --- a/scripts/helmcharts/openreplay/charts/integrations/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/integrations/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "integrations.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/peers/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/peers/templates/hpa.yaml index 814a60b98..534968594 100644 --- a/scripts/helmcharts/openreplay/charts/peers/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/peers/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "peers.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/quickwit/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/quickwit/templates/hpa.yaml index 48479c138..88bf91a71 100644 --- a/scripts/helmcharts/openreplay/charts/quickwit/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/quickwit/templates/hpa.yaml @@ -1,8 +1,9 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "quickwit.fullname" . }} + namespace: {{ .Release.Namespace }} labels: {{- include "quickwit.labels" . | nindent 4 }} spec: @@ -17,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/sink/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/sink/templates/hpa.yaml index 25a0d6071..02bd1b67f 100644 --- a/scripts/helmcharts/openreplay/charts/sink/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/sink/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "sink.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/hpa.yaml index 85d6f30ac..79b10e552 100644 --- a/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/sourcemapreader/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "sourcemapreader.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }} diff --git a/scripts/helmcharts/openreplay/charts/storage/templates/hpa.yaml b/scripts/helmcharts/openreplay/charts/storage/templates/hpa.yaml index f3c2b8829..e69800a49 100644 --- a/scripts/helmcharts/openreplay/charts/storage/templates/hpa.yaml +++ b/scripts/helmcharts/openreplay/charts/storage/templates/hpa.yaml @@ -1,5 +1,5 @@ {{- if .Values.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 +apiVersion: autoscaling/v2 kind: HorizontalPodAutoscaler metadata: name: {{ include "storage.fullname" . }} @@ -18,12 +18,16 @@ spec: - type: Resource resource: name: cpu - targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} {{- end }} {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - type: Resource resource: name: memory - targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} {{- end }} {{- end }}