chore(argo-cd): Remove legacy API versions for PDBs (#1740)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
fbc8cb263c
commit
f6c884a096
12 changed files with 10 additions and 26 deletions
|
|
@ -34,19 +34,6 @@ Return the appropriate apiVersion for ingress
|
|||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for pod disruption budget
|
||||
*/}}
|
||||
{{- define "argo-cd.apiVersion.pdb" -}}
|
||||
{{- if .Values.apiVersionOverrides.pdb -}}
|
||||
{{- print .Values.apiVersionOverrides.pdb -}}
|
||||
{{- else if semverCompare "<1.21-0" (include "argo-cd.kubeVersion" .) -}}
|
||||
{{- print "policy/v1beta1" -}}
|
||||
{{- else -}}
|
||||
{{- print "policy/v1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the appropriate apiVersion for cert-manager
|
||||
*/}}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.controller.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.controller.fullname" . }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if and .Values.applicationSet.enabled .Values.applicationSet.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.applicationSet.fullname" . }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if and .Values.notifications.enabled .Values.notifications.bots.slack.enabled .Values.notifications.bots.slack.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.notifications.fullname" . }}-bot
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if and .Values.notifications.enabled .Values.notifications.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.notifications.fullname" . }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.repoServer.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.repoServer.fullname" . }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if .Values.server.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.server.fullname" . }}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{{- if and .Values.dex.enabled .Values.dex.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.dex.fullname" . }}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{{- $redisHa := index .Values "redis-ha" -}}
|
||||
{{- if and .Values.redis.enabled (not $redisHa.enabled) .Values.redis.pdb.enabled }}
|
||||
apiVersion: {{ include "argo-cd.apiVersion.pdb" . }}
|
||||
apiVersion: policy/v1
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: {{ include "argo-cd.redis.fullname" . }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue