Skip to content

Commit

Permalink
feat(argo-cd): Support setting ArgoCD Notifications secret (#2577)
Browse files Browse the repository at this point in the history
* chore(deps): update renovatebot/github-action action to v40.1.3 (#2573)

Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Signed-off-by: ranrubin <ranrubin@gmail.com>

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

Signed-off-by: ranrubin <ranrubin@gmail.com>

* feat(argo-cd): Pass Secret name to Notification controller

Signed-off-by: ranrubin <ranrubin@gmail.com>

* chore(deps): update renovatebot/github-action action to v40.1.4 (#2579)

Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
Signed-off-by: ranrubin <ranrubin@gmail.com>

* feat(argo-cd): Remove redundant useExistingSecret, and assume existence of a secret

Signed-off-by: ranrubin <ranrubin@gmail.com>

---------

Signed-off-by: ranrubin <ranrubin@gmail.com>
Co-authored-by: argoproj-renovate[bot] <161757507+argoproj-renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <renovate[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 11, 2024
1 parent fc620a3 commit b9615e4
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 8 deletions.
6 changes: 3 additions & 3 deletions charts/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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.
1 change: 1 addition & 0 deletions charts/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,7 @@ 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.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 |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,12 @@ rules:
verbs:
- get
{{- end }}
{{- if .Values.notifications.secret.create }}
- apiGroups:
- ""
resourceNames:
- argocd-notifications-secret
- {{ .Values.notifications.secret.name }}
resources:
- secrets
verbs:
- get
{{- end }}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ spec:
- --logformat={{ default .Values.global.logging.format .Values.notifications.logFormat }}
- --namespace={{ .Release.Namespace }}
- --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
- --secret-name={{ .Values.notifications.secret.name }}
{{- range .Values.notifications.extraArgs }}
- {{ . | squote }}
{{- end }}
Expand Down
2 changes: 1 addition & 1 deletion charts/argo-cd/templates/argocd-notifications/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ rules:
- apiGroups:
- ""
resourceNames:
- argocd-notifications-secret
- {{ .Values.notifications.secret.name }}
resources:
- secrets
verbs:
Expand Down
4 changes: 4 additions & 0 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3017,8 +3017,12 @@ notifications:

secret:
# -- Whether helm chart creates notifications controller secret
## If true, will create a secret with the name below. Otherwise, will assume existence of a secret with that name.
create: true

# -- notifications controller Secret name
name: "argocd-notifications-secret"

# -- key:value pairs of annotations to be added to the secret
annotations: {}

Expand Down

0 comments on commit b9615e4

Please sign in to comment.