chore(argo-events): use policy/v1 for poddisruptionbudgets, when available (#1710)

* Use policy/v1 for poddisruptionbudgets, when available

Signed-off-by: Vadim Grek <vadimprog@gmail.com>
This commit is contained in:
Vadim Grek 2022-12-15 10:33:36 +02:00 committed by GitHub
parent ed24a95467
commit 9e523b0538
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

View file

@ -125,3 +125,14 @@ Return the default Argo Events app version
{{- define "argo-events.defaultTag" -}}
{{- default .Chart.AppVersion .Values.global.image.tag }}
{{- end -}}
{{/*
Define Pdb apiVersion
*/}}
{{- define "argo-events.pdb.apiVersion" -}}
{{- if .Capabilities.APIVersions.Has "policy/v1" }}
{{- printf "policy/v1" -}}
{{- else }}
{{- printf "policy/v1beta1" -}}
{{- end }}
{{- end }}