Differentiate between autoscaling v1beta1 and v1beta2 (#10331)

Signed-off-by: Miguel A. Cabrera Minagorri <devgorri@gmail.com>
This commit is contained in:
Miguel Ángel Cabrera Miñagorri
2022-05-20 17:23:14 +02:00
committed by GitHub
parent ec1526accf
commit 16d8a4ee73
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -20,4 +20,4 @@ sources:
- https://github.com/bitnami/charts
- https://www.bitnami.com/
type: library
version: 1.14.0
version: 1.14.1
+5 -1
View File
@@ -130,9 +130,13 @@ Return the appropriate apiVersion for APIService.
Return the appropriate apiVersion for Horizontal Pod Autoscaler.
*/}}
{{- define "common.capabilities.hpa.apiVersion" -}}
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .) -}}
{{- if semverCompare "<1.23-0" (include "common.capabilities.kubeVersion" .context) -}}
{{- if .beta2 -}}
{{- print "autoscaling/v2beta2" -}}
{{- else -}}
{{- print "autoscaling/v2beta1" -}}
{{- end -}}
{{- else -}}
{{- print "autoscaling/v2" -}}
{{- end -}}
{{- end -}}