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