{{- if .Values.reloader.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  labels:
{{ include "reloader-labels.chart" . | indent 4 }}
{{ include "reloader-labels.selector" . | indent 4 }}
{{- if .Values.reloader.serviceAccount.labels }}
{{ toYaml .Values.reloader.serviceAccount.labels | indent 4 }}
{{- end }}
{{- if .Values.reloader.matchLabels }}
{{ toYaml .Values.reloader.matchLabels | indent 4 }}
{{- end }}
  name: {{ template "serviceAccountName" . }}
{{- end }}
