apiVersion: admissionregistration.k8s.io/v1
kind: ValidatingWebhookConfiguration
metadata:
  name: eviction-webhook
webhooks:
  - name: eviction.mydomain.com
    clientConfig:
      service:
        name: eviction-webhook
        namespace: default
        path: /validate-eviction
      caBundle: ${CA_BUNDLE}
    rules:
      - operations: ["CREATE"]
        apiGroups: [""]
        apiVersions: ["v1"]
        resources: ["pods/eviction"]
    admissionReviewVersions: ["v1"]
    sideEffects: None
    failurePolicy: Fail