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:
parent
ed24a95467
commit
9e523b0538
4 changed files with 15 additions and 6 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.controller.pdb.enabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-events.controller.fullname" . }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if and .Values.webhook.enabled .Values.webhook.pdb.enabled (not .Values.controller.rbac.namespaced) }}
|
||||
apiVersion: policy/v1beta1
|
||||
apiVersion: {{ template "argo-events.pdb.apiVersion" . }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ template "argo-events.webhook.fullname" . }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue