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 }}
|
{{ default "default" .Values.bots.slack.serviceAccount.name }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- 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:
|
- apiGroups:
|
||||||
- ""
|
- ""
|
||||||
resourceNames:
|
resourceNames:
|
||||||
- argocd-notifications-secret
|
- {{ include "argocd-notifications.secretName" . }}
|
||||||
resources:
|
resources:
|
||||||
- secrets
|
- secrets
|
||||||
verbs:
|
verbs:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Secret
|
kind: Secret
|
||||||
metadata:
|
metadata:
|
||||||
name: {{ include "argocd-notifications.name" . }}-secret
|
name: {{ include "argocd-notifications.secretName" . }}
|
||||||
labels:
|
labels:
|
||||||
{{- include "argocd-notifications.labels" . | nindent 4 }}
|
{{- include "argocd-notifications.labels" . | nindent 4 }}
|
||||||
type: Opaque
|
type: Opaque
|
||||||
|
|
Loading…
Reference in a new issue