feat(argocd-notifications): Add slack icon and signingSecret support and Grafana support (#384)
* Add icon and signingSecret support * Fix typo * Add grafana support * Fix trailing spaces * Fix trailing spaces 2 * Fix grafana comments * Add bot manifests * Bump version * No new line character * Values.yaml new line character * Add comments * Add slack.enabled flag * Move slack bot to bots/slack folder Co-authored-by: sergeyshaykhullin <sergeyshaykhullin@gmail.com> Co-authored-by: Sergey Shaykhullin <46970457+sergeyshaykhullin@users.noreply.github.com>
This commit is contained in:
parent
209d69558e
commit
422752023d
10 changed files with 194 additions and 2 deletions
|
|
@ -0,0 +1,45 @@
|
|||
{{ if .Values.bots.slack.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "argocd-notifications.name" . }}-bot
|
||||
labels:
|
||||
{{- include "argocd-notifications.bots.slack.labels" . | nindent 4 }}
|
||||
spec:
|
||||
strategy:
|
||||
{{- .Values.bots.slack.updateStrategy | toYaml | nindent 4 }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "argocd-notifications.bots.slack.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "argocd-notifications.bots.slack.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.bots.slack.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "argocd-notifications.serviceAccountName" . }}-bot
|
||||
containers:
|
||||
- name: {{ include "argocd-notifications.name" . }}-bot
|
||||
image: "{{ .Values.bots.slack.image.repository }}:{{ .Values.bots.slack.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.bots.slack.image.pullPolicy }}
|
||||
resources:
|
||||
{{- toYaml .Values.bots.slack.resources | nindent 12 }}
|
||||
command:
|
||||
- /app/argocd-notifications
|
||||
- bot
|
||||
{{- with .Values.bots.slack.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bots.slack.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.bots.slack.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{ end }}
|
||||
18
charts/argocd-notifications/templates/bots/slack/role.yaml
Normal file
18
charts/argocd-notifications/templates/bots/slack/role.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{{ if .Values.bots.slack.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "argocd-notifications.name" . }}-bot
|
||||
rules:
|
||||
- apiGroups:
|
||||
- argoproj.io
|
||||
resources:
|
||||
- applications
|
||||
- appprojects
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- update
|
||||
- patch
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
{{ if .Values.bots.slack.enabled }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ include "argocd-notifications.name" . }}-bot
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ include "argocd-notifications.name" . }}-bot
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "argocd-notifications.bots.slack.serviceAccountName" . }}
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{{ if .Values.bots.slack.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "argocd-notifications.name" . }}-bot
|
||||
spec:
|
||||
ports:
|
||||
- name: server
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: 8080
|
||||
selector:
|
||||
{{- include "argocd-notifications.bots.slack.selectorLabels" . | nindent 4 }}
|
||||
type: {{ .Values.bots.slack.service.type }}
|
||||
{{ end }}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{{ if and .Values.bots.slack.enabled .Values.secret.create }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "argocd-notifications.bots.slack.serviceAccountName" . }}
|
||||
labels:
|
||||
{{- include "argocd-notifications.bots.slack.labels" . | nindent 4 }}
|
||||
{{ end }}
|
||||
Loading…
Add table
Add a link
Reference in a new issue