diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 157ba164..deeecdb6 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 appVersion: 2.1.3 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.25.3 +version: 3.26.0 home: https://github.com/argoproj/argo-helm icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png keywords: @@ -21,4 +21,4 @@ dependencies: condition: redis-ha.enabled annotations: artifacthub.io/changes: | - - "[Added]: Chart testing for HA setups" + - "[Added]: Ability to add finalizers to AppProject" diff --git a/charts/argo-cd/templates/argocd-configs/projects.yaml b/charts/argo-cd/templates/argocd-configs/projects.yaml index 6b85889d..d51a19b6 100644 --- a/charts/argo-cd/templates/argocd-configs/projects.yaml +++ b/charts/argo-cd/templates/argocd-configs/projects.yaml @@ -2,53 +2,57 @@ apiVersion: v1 kind: List items: -{{- range .Values.server.additionalProjects }} + {{- range .Values.server.additionalProjects }} - apiVersion: argoproj.io/v1alpha1 kind: AppProject metadata: - {{- if .additionalAnnotations }} + {{- with .additionalAnnotations }} annotations: - {{- range $key, $value := .additionalAnnotations }} + {{- range $key, $value := . }} {{ $key }}: {{ $value | quote }} + {{- end }} {{- end }} - {{- end }} - {{- if .additionalLabels }} + {{- with .additionalLabels }} labels: -{{- toYaml .additionalLabels | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} name: {{ .name }} - {{- if .namespace }} - namespace: {{ .namespace }} + {{- with .namespace }} + namespace: {{ . }} + {{- end }} + {{- with .finalizers }} + finalizers: + {{- toYaml . | nindent 8 }} {{- end }} spec: description: {{ .description }} sourceRepos: -{{- toYaml .sourceRepos | nindent 8 }} + {{- toYaml .sourceRepos | nindent 8 }} destinations: -{{- toYaml .destinations | nindent 8 }} - {{- if .clusterResourceWhitelist }} + {{- toYaml .destinations | nindent 8 }} + {{- with .clusterResourceWhitelist }} clusterResourceWhitelist: -{{- toYaml .clusterResourceWhitelist | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .namespaceResourceBlacklist }} + {{- with .namespaceResourceBlacklist }} namespaceResourceBlacklist: -{{- toYaml .namespaceResourceBlacklist | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .namespaceResourceWhitelist }} + {{- with .namespaceResourceWhitelist }} namespaceResourceWhitelist: -{{- toYaml .namespaceResourceWhitelist | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .orphanedResources }} + {{- with .orphanedResources }} orphanedResources: -{{- toYaml .orphanedResources | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .roles }} + {{- with .roles }} roles: -{{- toYaml .roles | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .syncWindows }} + {{- with .syncWindows }} syncWindows: -{{- toYaml .syncWindows | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} -{{- end }} + {{- end }} {{- end }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index c32f34bf..06572cbb 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -850,6 +850,8 @@ server: # namespace: argocd # additionalLabels: {} # additionalAnnotations: {} + # finalizers: + # - resources-finalizer.argocd.argoproj.io # project: guestbook # source: # repoURL: https://github.com/argoproj/argocd-example-apps.git @@ -880,6 +882,8 @@ server: # namespace: argocd # additionalLabels: {} # additionalAnnotations: {} + # finalizers: + # - resources-finalizer.argocd.argoproj.io # description: Example Project # sourceRepos: # - '*'