Skip to content

Commit

Permalink
chore(argo-cd): Remove legacy API versions for PDBs (argoproj#1740)
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Drastil <[email protected]>
  • Loading branch information
pdrastil authored Dec 29, 2022
1 parent fbc8cb2 commit f6c884a
Show file tree
Hide file tree
Showing 12 changed files with 10 additions and 26 deletions.
4 changes: 2 additions & 2 deletions charts/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appVersion: v2.5.5
kubeVersion: ">=1.22.0-0"
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 5.16.11
version: 5.16.12
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources:
Expand All @@ -23,4 +23,4 @@ dependencies:
condition: redis-ha.enabled
annotations:
artifacthub.io/changes: |
- "[Added]: Added HostAliases to ApplicationSet Deployment"
- "[Removed]: API override for PDB"
1 change: 0 additions & 1 deletion charts/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,6 @@ NAME: my-release
| apiVersionOverrides.certmanager | string | `""` | String to override apiVersion of cert-manager resources rendered by this helm chart |
| apiVersionOverrides.cloudgoogle | string | `""` | String to override apiVersion of GKE resources rendered by this helm chart |
| apiVersionOverrides.ingress | string | `""` | String to override apiVersion of ingresses rendered by this helm chart |
| apiVersionOverrides.pdb | string | `""` | String to override apiVersion of pod disruption budgets rendered by this helm chart |
| crds.annotations | object | `{}` | Annotations to be added to all CRDs |
| crds.install | bool | `true` | Install and upgrade CRDs |
| crds.keep | bool | `true` | Keep CRDs on chart uninstall |
Expand Down
13 changes: 0 additions & 13 deletions charts/argo-cd/templates/_versions.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/}}
Expand Down
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-applicationset/pdb.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-notifications/pdb.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-repo-server/pdb.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-server/pdb.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/dex/pdb.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/redis/pdb.yaml
Original file line number Diff line number Diff line change
@@ -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" . }}
Expand Down
2 changes: 0 additions & 2 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ apiVersionOverrides:
autoscaling: "" # autoscaling/v2
# -- String to override apiVersion of ingresses rendered by this helm chart
ingress: "" # networking.k8s.io/v1beta1
# -- String to override apiVersion of pod disruption budgets rendered by this helm chart
pdb: "" # policy/v1

# -- Create clusterroles that extend existing clusterroles to interact with argo-cd crds
## Ref: https://kubernetes.io/docs/reference/access-authn-authz/rbac/#aggregated-clusterroles
Expand Down

0 comments on commit f6c884a

Please sign in to comment.