feat(argo-cd): Expose cluster's project as a label

Given that Argo CD's ApplicationSet cluster generator allows selecting
clusters using arbitrary labels, it'd be useful for operators to have
the clusters' project available as label to for instance easily deploy
a single application to all the clusters of a given project.

More info: https://github.com/argoproj/argo-helm/discussions/2949

Signed-off-by: Nacho Barrientos <nacho.barrientos@cern.ch>
This commit is contained in:
Nacho Barrientos 2024-10-07 10:20:24 +02:00
parent 7a831569e9
commit f20ad5d25f
2 changed files with 5 additions and 2 deletions

View file

@ -3,7 +3,7 @@ appVersion: v2.12.4
kubeVersion: ">=1.25.0-0"
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 7.6.8
version: 7.6.9
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources:
@ -27,4 +27,4 @@ annotations:
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: added
description: Set affinity in redis secret-init job.
description: Add the cluster project as a label.

View file

@ -11,6 +11,9 @@ metadata:
{{- toYaml . | nindent 4 }}
{{- end }}
argocd.argoproj.io/secret-type: cluster
{{- if $cluster_value.project }}
argocd.argoproj.io/project: {{ $cluster_value.project | quote }}
{{- end }}
{{- with $cluster_value.annotations }}
annotations:
{{- range $key, $value := . }}