{{- if .Values.externalSecrets.enabled }}
{{- if eq .Values.externalSecrets.type "aws" }}
apiVersion: v1
kind: ServiceAccount
metadata:
  annotations:
    eks.amazonaws.com/role-arn: {{ required "AWS IAM Role is not defined" .Values.externalSecrets.secretProvider.aws.role }}
  name: externalsecrets-aws
  namespace: {{ .Release.Namespace }}
  labels:
    {{- include "edp-install.labels" . | nindent 4 }}
{{- end }}
{{- end }}
