Using helper for secret name in multiple places
This commit is contained in:
parent
6a001fe940
commit
1818256cda
3 changed files with 9 additions and 2 deletions
|
@ -92,3 +92,10 @@ Create the name of the bot service account to use
|
|||
{{ default "default" .Values.bots.slack.serviceAccount.name }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Create the name of the secret to use
|
||||
*/}}
|
||||
{{- define "argocd-notifications.secretName" -}}
|
||||
{{- printf "%s-secret" (include "argocd-notifications.name" .) -}}
|
||||
{{- end -}}
|
||||
|
|
|
@ -18,7 +18,7 @@ rules:
|
|||
- apiGroups:
|
||||
- ""
|
||||
resourceNames:
|
||||
- argocd-notifications-secret
|
||||
- {{ include "argocd-notifications.secretName" . }}
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: {{ include "argocd-notifications.name" . }}-secret
|
||||
name: {{ include "argocd-notifications.secretName" . }}
|
||||
labels:
|
||||
{{- include "argocd-notifications.labels" . | nindent 4 }}
|
||||
type: Opaque
|
||||
|
|
Loading…
Reference in a new issue