fix(argo-workflows): Add missing argo-workflows.apiVersion.autoscaling helper function for HPA configuration (#2001)

fix: Add missing argo-workflows.apiVersion.autoscaling helper function for HPA configuration

Signed-off-by: jmeridth <jmeridth@gmail.com>
This commit is contained in:
Jason Meridth 2023-05-05 09:13:41 -05:00 committed by GitHub
parent bb4d3154e6
commit 513df3df8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 3 deletions

View file

@ -153,3 +153,16 @@ Return full image name including or excluding registry based on existence
{{ .image.repository }}
{{- end -}}
{{- end -}}
{{/*
Return the appropriate apiVersion for autoscaling
*/}}
{{- define "argo-workflows.apiVersion.autoscaling" -}}
{{- if .Values.apiVersionOverrides.autoscaling -}}
{{- print .Values.apiVersionOverrides.autoscaling -}}
{{- else if semverCompare "<1.23-0" (include "argo-cd.kubeVersion" .) -}}
{{- print "autoscaling/v2beta1" -}}
{{- else -}}
{{- print "autoscaling/v2" -}}
{{- end -}}
{{- end -}}