{{- if .Values.rbac.create }}
apiVersion: v1
kind: ServiceAccount
metadata:
  name: {{ template "kyverno.serviceAccountName" . }}
  labels: {{ include "kyverno.labels" . | nindent 4 }}
  {{- if .Values.rbac.serviceAccount.annotations }}
  annotations: {{ toYaml .Values.rbac.serviceAccount.annotations | nindent 4 }}
  {{- end }}
{{- end }}