apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: dynatrace-webhook
webhooks:
  - admissionReviewVersions:
      - v1
      - v1beta1
      - v1alpha1
    clientConfig:
      service:
        name: dynatrace-webhook
        namespace: dynatrace
        path: /validate
    rules:
      - operations:
          - CREATE
          - UPDATE
        apiGroups:
          - dynatrace.com
        apiVersions:
          - v1alpha1
        resources:
          - dynakubes
    name: webhook.dynatrace.com
    sideEffects: None
