{{- if .Values.controller.enabled }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: kargo-controller
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "kargo.labels" . | nindent 4 }}
    {{- include "kargo.controller.labels" . | nindent 4 }}
  {{- if .Values.controller.serviceAccount.iamRole }}
  annotations:
    eks.amazonaws.com/role-arn: {{ .Values.controller.serviceAccount.iamRole }}
  {{- end }}
{{- end }}
