apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: virt-template-validator
webhooks:
- name: virt-template-admission.kubevirt.io
  clientConfig:
    service:
      name: virt-template-validator
      namespace: kubevirt
      path: "/virtualmachine-template-validate"
    caBundle: "${CA_BUNDLE}"
  rules:
    - operations: ["CREATE","UPDATE"]
      apiGroups: ["kubevirt.io"]
      apiVersions: ["v1alpha3"]
      resources: ["virtualmachines"]
  failurePolicy: Fail
  admissionReviewVersions: ["v1", "v1beta1"]
  sideEffects: None
