{{- if .Values.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ include "milvus.serviceAccount" . }}
{{- if .Values.serviceAccount.annotations }}
  annotations:
{{ toYaml .Values.serviceAccount.annotations | nindent 4 }}
{{- end }}
  labels:
{{ include "milvus.labels" . | indent 4 }}
{{- with .Values.serviceAccount.labels }}
  {{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}