chore(argo-cd): Move notification configs (#1419)

* Move notification configs to config dir

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>

* Use expected names for notification configs

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>

* Fix notification role

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>

Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
Petr Drastil 2022-08-25 12:12:51 +02:00 committed by GitHub
parent c06aef63d8
commit 3930788628
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 8 additions and 41 deletions

View file

@ -264,28 +264,6 @@ Return the default Argo CD app version
{{- default .Chart.AppVersion .Values.global.image.tag }}
{{- end -}}
{{/*
Create the name of the notifications controller secret to use
*/}}
{{- define "argo-cd.notifications.secretName" -}}
{{- if .Values.notifications.secret.create -}}
{{ default (printf "%s-secret" (include "argo-cd.notifications.fullname" .)) .Values.notifications.secret.name }}
{{- else -}}
{{ default "argocd-notifications-secret" .Values.notifications.secret.name }}
{{- end -}}
{{- end -}}
{{/*
Create the name of the configmap to use
*/}}
{{- define "argo-cd.notifications.configMapName" -}}
{{- if .Values.notifications.cm.create -}}
{{ default (printf "%s-cm" (include "argo-cd.notifications.fullname" .)) .Values.notifications.cm.name }}
{{- else -}}
{{ default "argocd-notifications-cm" .Values.notifications.cm.name }}
{{- end -}}
{{- end -}}
{{- define "argo-cd.redisPasswordEnv" -}}
{{- if or .Values.externalRedis.password .Values.externalRedis.existingSecret }}
- name: REDIS_PASSWORD

View file

@ -2,7 +2,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "argo-cd.notifications.configMapName" . }}
name: argocd-notifications-cm
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
data:

View file

@ -2,7 +2,7 @@
apiVersion: v1
kind: Secret
metadata:
name: {{ include "argo-cd.notifications.secretName" . }}
name: argocd-notifications-secret
labels:
{{- include "argo-cd.labels" (dict "context" . "component" .Values.notifications.name "name" .Values.notifications.name) | nindent 4 }}
{{- if .Values.notifications.secret.annotations }}
@ -14,6 +14,6 @@ metadata:
type: Opaque
stringData:
{{- with .Values.notifications.secret.items }}
{{ toYaml . | nindent 2 }}
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end }}

View file

@ -48,8 +48,6 @@ spec:
{{- end }}
- --namespace={{ .Release.Namespace }}
- --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
- --secret-name={{ include "argo-cd.notifications.secretName" . }}
- --config-map-name={{ include "argo-cd.notifications.configMapName" . }}
{{- range .Values.notifications.extraArgs }}
- {{ . | squote }}
{{- end }}

View file

@ -28,7 +28,7 @@ rules:
- apiGroups:
- ""
resourceNames:
- {{ include "argo-cd.notifications.configMapName" . }}
- argocd-notifications-cm
resources:
- configmaps
verbs:
@ -36,7 +36,7 @@ rules:
- apiGroups:
- ""
resourceNames:
- {{ include "argo-cd.notifications.secretName" . }}
- argocd-notifications-secret
resources:
- secrets
verbs: