fix: ArgoCD Notifications - Bot service account
This commit is contained in:
parent
5ca92acda0
commit
0626ac5e7a
5 changed files with 14 additions and 3 deletions
|
@ -87,7 +87,7 @@ Create the name of the bot service account to use
|
||||||
*/}}
|
*/}}
|
||||||
{{- define "argocd-notifications.bots.slack.serviceAccountName" -}}
|
{{- define "argocd-notifications.bots.slack.serviceAccountName" -}}
|
||||||
{{- if .Values.bots.slack.serviceAccount.create -}}
|
{{- if .Values.bots.slack.serviceAccount.create -}}
|
||||||
{{ default (include "argocd-notifications.fullname" .) .Values.bots.slack.serviceAccount.name }}
|
{{ default (printf "%s-bot" (include "argocd-notifications.fullname" .)) .Values.bots.slack.serviceAccount.name }}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{ default "default" .Values.bots.slack.serviceAccount.name }}
|
{{ default "default" .Values.bots.slack.serviceAccount.name }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
|
@ -20,7 +20,7 @@ spec:
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
{{- toYaml . | nindent 8 }}
|
{{- toYaml . | nindent 8 }}
|
||||||
{{- end }}
|
{{- end }}
|
||||||
serviceAccountName: {{ include "argocd-notifications.serviceAccountName" . }}-bot
|
serviceAccountName: {{ include "argocd-notifications.bots.slack.serviceAccountName" . }}
|
||||||
containers:
|
containers:
|
||||||
- name: {{ include "argocd-notifications.name" . }}-bot
|
- name: {{ include "argocd-notifications.name" . }}-bot
|
||||||
image: "{{ .Values.bots.slack.image.repository }}:{{ .Values.bots.slack.image.tag }}"
|
image: "{{ .Values.bots.slack.image.repository }}:{{ .Values.bots.slack.image.tag }}"
|
||||||
|
|
|
@ -15,4 +15,13 @@ rules:
|
||||||
- watch
|
- watch
|
||||||
- update
|
- update
|
||||||
- patch
|
- patch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
- configmaps
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{ if and .Values.bots.slack.enabled .Values.secret.create }}
|
{{- if .Values.bots.slack.serviceAccount.create }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
|
{{- if .Values.serviceAccount.create }}
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argocd-notifications.serviceAccountName" . }}
|
name: {{ include "argocd-notifications.serviceAccountName" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argocd-notifications.labels" . | nindent 4 }}
|
{{- include "argocd-notifications.labels" . | nindent 4 }}
|
||||||
|
{{- end }}
|
||||||
|
|
Loading…
Reference in a new issue