From 85aa23af78e4e95a766f40b030204b585e0e348d Mon Sep 17 00:00:00 2001 From: Antoine Labarussias Date: Sat, 1 Apr 2023 01:41:57 +0200 Subject: [PATCH] element-web: use autoscaling/v2 when possible --- charts/element-web/templates/hpa.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/charts/element-web/templates/hpa.yaml b/charts/element-web/templates/hpa.yaml index 8e7c198..9b17562 100644 --- a/charts/element-web/templates/hpa.yaml +++ b/charts/element-web/templates/hpa.yaml @@ -1,5 +1,9 @@ {{- if .Values.autoscaling.enabled }} +{{- if .Capabilities.APIVersions.Has "autoscaling/v2" }} +apiVersion: autoscaling/v2 +{{- else }} apiVersion: autoscaling/v2beta1 +{{- end }} kind: HorizontalPodAutoscaler metadata: name: {{ include "element-web.fullname" . }}