{{- if and .Values.rbac.enabled .Values.rbac.serviceaccount.create }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ .Values.rbac.serviceaccount.name }}
  {{- with .Values.rbac.serviceaccount.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
{{- end }}
