apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  annotations:
    cert-manager.io/inject-ca-from: "{{ namespace }}/cdi-apiserver-server-cert"
  labels:
    cdi.kubevirt.io: cdi-api
  name: cdi-api-dataimportcron-validate
webhooks:
  - admissionReviewVersions:
      - v1
      - v1beta1
    clientConfig:
      service:
        name: cdi-api
        namespace: "{{ namespace }}"
        path: /dataimportcron-validate
        port: 443
    failurePolicy: Fail
    matchPolicy: Exact
    name: dataimportcron-validate.cdi.kubevirt.io
    namespaceSelector: {}
    objectSelector: {}
    rules:
      - apiGroups:
          - cdi.kubevirt.io
        apiVersions:
          - v1beta1
        operations:
          - CREATE
          - UPDATE
        resources:
          - dataimportcrons
        scope: '*'
    sideEffects: None
    timeoutSeconds: 30