{{ if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "aws-eks-asg-rolling-update-handler.serviceAccountName" . }}
  namespace: {{ template "aws-eks-asg-rolling-update-handler.namespace" . }}
  labels:
{{ include "aws-eks-asg-rolling-update-handler.labels" . | indent 4 }}
  {{- with .Values.serviceAccount.annotations }}
  annotations:
  {{- toYaml . | nindent 4 }}
  {{- end }}
{{ end }}