{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: "{{ .Values.serviceAccount.name }}"
  namespace: "{{ .Values.serviceAccount.namespace }}"
  annotations:
    eks.amazonaws.com/role-arn: "{{ .Values.serviceAccount.awsRoleArn }}"
  labels:
    owner: "{{ .Values.serviceAccount.owner }}"
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
secrets:
  - name: {{ include "common.names.fullname" . }}    
{{- end }}  