{{- if and .Values.operator.enabled .Values.operator.serviceAccount.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "kube-prometheus.operator.serviceAccountName" . }}
  namespace: {{ .Release.Namespace }}
  labels: {{- include "kube-prometheus.operator.labels" . | nindent 4 }}
{{- include "kube-prometheus.imagePullSecrets" . }}
{{- end }}
