Add slack.enabled flag

This commit is contained in:
sergeyshaykhullin 2020-06-22 16:53:24 +03:00
parent f57c359a33
commit 8f69e55a31
6 changed files with 12 additions and 1 deletions

View file

@ -1,3 +1,4 @@
{{ if .Values.bots.slack.enabled }}
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
@ -41,3 +42,4 @@ spec:
tolerations: tolerations:
{{- toYaml . | nindent 8 }} {{- toYaml . | nindent 8 }}
{{- end }} {{- end }}
{{ end }}

View file

@ -1,3 +1,4 @@
{{ if .Values.bots.slack.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: Role kind: Role
metadata: metadata:
@ -14,3 +15,4 @@ rules:
- watch - watch
- update - update
- patch - patch
{{ end }}

View file

@ -1,3 +1,4 @@
{{ if .Values.bots.slack.enabled }}
apiVersion: rbac.authorization.k8s.io/v1 apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding kind: RoleBinding
metadata: metadata:
@ -9,3 +10,4 @@ roleRef:
subjects: subjects:
- kind: ServiceAccount - kind: ServiceAccount
name: {{ include "argocd-notifications.bots.slack.serviceAccountName" . }} name: {{ include "argocd-notifications.bots.slack.serviceAccountName" . }}
{{ end }}

View file

@ -1,3 +1,4 @@
{{ if .Values.bots.slack.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
@ -11,3 +12,4 @@ spec:
selector: selector:
{{- include "argocd-notifications.bots.slack.selectorLabels" . | nindent 4 }} {{- include "argocd-notifications.bots.slack.selectorLabels" . | nindent 4 }}
type: {{ .Values.bots.slack.service.type }} type: {{ .Values.bots.slack.service.type }}
{{ end }}

View file

@ -1,4 +1,4 @@
{{ if .Values.secret.create }} {{ if and .Values.bots.slack.enabled .Values.secret.create }}
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:

View file

@ -162,6 +162,9 @@ triggers:
bots: bots:
# For more information: https://argoproj-labs.github.io/argocd-notifications/recipients/bot/ # For more information: https://argoproj-labs.github.io/argocd-notifications/recipients/bot/
slack: slack:
# You have to set secret.notifiers.slack.signingSecret
enabled: false
updateStrategy: updateStrategy:
type: Recreate type: Recreate