apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Values.name }} namespace: {{ .Release.Namespace }} labels: app: {{ .Values.name }} type: {{ .Values.type | default "service" }} {{- if $.Values.labels }} {{ toYaml $.Values.labels | indent 4 }} {{- end }} chart: {{ template "chart.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} {{- if $.Values.rbac }} automountServiceAccountToken: true {{- else }} automountServiceAccountToken: false {{- end }}