{{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: labels: app: {{ template "k8s-prometheus-adapter.name" . }} chart: {{ template "k8s-prometheus-adapter.chart" . }} release: {{ .Release.Name }} heritage: {{ .Release.Service }} name: {{ template "k8s-prometheus-adapter.serviceAccountName" . }} namespace: {{ .Release.Namespace }} {{- end -}}