{{- if .Values.controller.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "katib.controller.serviceAccountName" . }}
  namespace: {{ include "katib.namespace" . }}
  labels:
    {{- include "katib.controller.serviceAccountLabels" . | nindent 4 }}
  {{- with .Values.controller.serviceAccount.annotations }}
  annotations:
    {{- toYaml . | nindent 4 }}
  {{- end }}
{{- end }}