feat(argo-cd): Support for existing Secret in ArgoCD Notifications, and ability to set its name.

Signed-off-by: ranrubin <ranrubin@gmail.com>
This commit is contained in:
ranrubin 2024-03-07 19:29:33 +02:00
parent 9a8739d752
commit 2eea9d0b05
No known key found for this signature in database
GPG key ID: 4BF7D4C7E19E40E5
6 changed files with 16 additions and 8 deletions

View file

@ -3,7 +3,7 @@ appVersion: v2.10.2
kubeVersion: ">=1.23.0-0"
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 6.6.0
version: 6.7.0
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
sources:
@ -26,5 +26,5 @@ annotations:
fingerprint: 2B8F22F57260EFA67BE1C5824B11F800CD9D2252
url: https://argoproj.github.io/argo-helm/pgp_keys.asc
artifacthub.io/changes: |
- kind: changed
description: Support ApplicationSet in any namespace.
- kind: Added
description: Support for existing Secret for ArgoCD Notifications, and ability to set its name.

View file

@ -1465,6 +1465,8 @@ If you want to use an existing Redis (eg. a managed service from a cloud provide
| notifications.secret.create | bool | `true` | Whether helm chart creates notifications controller secret |
| notifications.secret.items | object | `{}` | Generic key:value pairs to be inserted into the secret |
| notifications.secret.labels | object | `{}` | key:value pairs of labels to be added to the secret |
| notifications.secret.name | string | `"argocd-notifications-secret"` | notifications controller Secret name |
| notifications.secret.useExistingSecret | bool | `false` | Whether to use existing secret. If true, assumes that the existing secret name is notifications.secret.name |
| notifications.serviceAccount.annotations | object | `{}` | Annotations applied to created service account |
| notifications.serviceAccount.automountServiceAccountToken | bool | `true` | Automount API credentials for the Service Account |
| notifications.serviceAccount.create | bool | `true` | Create notifications controller service account |

View file

@ -1,8 +1,8 @@
{{- if and .Values.notifications.enabled .Values.notifications.secret.create }}
{{- if and (not .Values.notifications.secret.useExistingSecret) .Values.notifications.enabled .Values.notifications.secret.create }}
apiVersion: v1
kind: Secret
metadata:
name: argocd-notifications-secret
name: {{ .Values.notifications.secret.name }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}

View file

@ -38,11 +38,11 @@ rules:
verbs:
- get
{{- end }}
{{- if .Values.notifications.secret.create }}
{{- if or .Values.notifications.secret.create .Values.notifications.secret.useExistingSecret }}
- apiGroups:
- ""
resourceNames:
- argocd-notifications-secret
- {{ .Values.notifications.secret.name }}
resources:
- secrets
verbs:

View file

@ -37,7 +37,7 @@ rules:
- apiGroups:
- ""
resourceNames:
- argocd-notifications-secret
- {{ .Values.notifications.secret.name }}
resources:
- secrets
verbs:

View file

@ -3019,6 +3019,12 @@ notifications:
# -- Whether helm chart creates notifications controller secret
create: true
# -- notifications controller Secret name
name: "argocd-notifications-secret"
# -- Whether to use existing secret. If true, assumes that the existing secret name is notifications.secret.name
useExistingSecret: false
# -- key:value pairs of annotations to be added to the secret
annotations: {}