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>
pull/1422/head^2 argo-cd-5.2.2
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

@ -2,7 +2,7 @@ apiVersion: v2
appVersion: v2.4.11
description: A Helm chart for Argo CD, a declarative, GitOps continuous delivery tool for Kubernetes.
name: argo-cd
version: 5.2.1
version: 5.2.2
home: https://github.com/argoproj/argo-helm
icon: https://argo-cd.readthedocs.io/en/stable/assets/logo.png
keywords:
@ -21,4 +21,5 @@ dependencies:
condition: redis-ha.enabled
annotations:
artifacthub.io/changes: |
- "[Changed]: Update redis-ha"
- "[Changed]: Move notification configs to config folder"
- "[Changed]: Use default names for notification configs"

View File

@ -927,7 +927,6 @@ If you want to use an existing Redis (eg. a managed service from a cloud provide
| notifications.bots.slack.tolerations | list | `[]` | [Tolerations] for use with node taints |
| notifications.bots.slack.updateStrategy | object | `{"type":"Recreate"}` | The deployment strategy to use to replace existing pods with new ones |
| notifications.cm.create | bool | `true` | Whether helm chart creates controller config map |
| notifications.cm.name | string | `""` | The name of the config map to use. |
| notifications.containerSecurityContext | object | `{}` | Container Security Context |
| notifications.context | object | `{}` | Define user-defined context |
| notifications.enabled | bool | `true` | Enable Notifications controller |
@ -960,7 +959,6 @@ If you want to use an existing Redis (eg. a managed service from a cloud provide
| notifications.secret.annotations | object | `{}` | key:value pairs of annotations to be added to the secret |
| notifications.secret.create | bool | `true` | Whether helm chart creates controller secret |
| notifications.secret.items | object | `{}` | Generic key:value pairs to be inserted into the secret |
| notifications.secret.name | string | `""` | The name of the secret to use. |
| notifications.securityContext | object | `{"runAsNonRoot":true}` | Pod Security Context |
| notifications.serviceAccount.annotations | object | `{}` | Annotations applied to created service account |
| notifications.serviceAccount.create | bool | `true` | Specifies whether a service account should be created |

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:

View File

@ -2174,10 +2174,6 @@ notifications:
# -- key:value pairs of annotations to be added to the secret
annotations: {}
# -- The name of the secret to use.
## If not set and create is true, the default name 'argocd-notifications-secret' is used
name: ""
# -- Generic key:value pairs to be inserted into the secret
## Can be used for templates, notification services etc. Some examples given below.
## For more information: https://argocd-notifications.readthedocs.io/en/stable/services/overview/
@ -2287,10 +2283,6 @@ notifications:
# -- Whether helm chart creates controller config map
create: true
# -- The name of the config map to use.
## If not set and create is true, the default name 'argocd-notifications-cm' is used
name: ""
# -- Contains centrally managed global application subscriptions
## For more information: https://argocd-notifications.readthedocs.io/en/stable/subscriptions/
subscriptions: []