chore(argo-cd): Remove legacy API versions for PDBs (#1740)

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
Petr Drastil 2022-12-29 16:47:29 +01:00 committed by GitHub
parent fbc8cb263c
commit f6c884a096
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 10 additions and 26 deletions

View file

@ -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
*/}}

View file

@ -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" . }}

View file

@ -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" . }}

View file

@ -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

View file

@ -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" . }}

View file

@ -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" . }}

View file

@ -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" . }}

View file

@ -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" . }}

View file

@ -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" . }}