{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "k8s-spot-termination-handler.serviceAccountName" . }}
  labels:
    app.kubernetes.io/name: {{ template "k8s-spot-termination-handler.name" . }}
    helm.sh/chart: {{ template "k8s-spot-termination-handler.chart" . }}
    app.kubernetes.io/instance: {{ .Release.Name }}
    app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
