autoscaler api version based on k8s release

This commit is contained in:
felix 2023-09-04 11:06:21 +00:00
parent b19c0d464f
commit 03847114c4
No known key found for this signature in database

View file

@ -1,5 +1,9 @@
{{- if .Values.autoscaling.enabled }} {{- if .Values.autoscaling.enabled }}
{{- if semverCompare ">=1.23-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: autoscaling/v2
{{- else -}}
apiVersion: autoscaling/v2beta1 apiVersion: autoscaling/v2beta1
{{- end }}
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
metadata: metadata:
name: {{ include "matrix-media-repo.fullname" . }} name: {{ include "matrix-media-repo.fullname" . }}