{{- if .Values.serviceAccount.create -}} apiVersion: v1 kind: ServiceAccount metadata: name: {{ template "aws-node-termination-handler.serviceAccountName" . }} namespace: {{ .Release.Namespace }} labels: {{- include "aws-node-termination-handler.labels" . | nindent 8 }} {{- if (or .Values.annotations .Values.serviceAccount.annotations "") }} annotations: {{- with .Values.annotations }} {{- toYaml . | nindent 8 }} {{- end }} {{- with .Values.serviceAccount.annotations }} {{- toYaml . | nindent 8 }} {{- end }} {{- end }} {{- end }}