Commit 7a51a9ad authored by Waqar Ahmed's avatar Waqar Ahmed

Add common serviceaccount implementation

parent e5d0fb7c
{{-/*
Common service account
*/-}}
{{- define "common.serviceaccount" -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "common.names.serviceAccountName" . | quote }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.selectorLabels" | nindent 4 -}}
{{- end -}}
......@@ -29,3 +29,10 @@ Create chart name and version as used by the chart label.
{{- define "common.names.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Determine service account name for deployment or statefulset.
*/}}
{{- define "common.names.serviceAccountName" -}}
{{- (include "common.names.fullname" .) | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment