apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: physics-admission-controller
  labels:
    app: physics-admission-controller
webhooks:
  - name: physics-admission-controller.physics-infra.svc
    failurePolicy: Ignore
    sideEffects: None
    admissionReviewVersions: ['v1', 'v1beta1']
    clientConfig:
      service:
        name: physics-admission-controller
        namespace: physics-infra
        path: "/"
      caBundle: ADD_CA_BUNDLE
    rules:
      - operations: ["CREATE"]
        apiGroups: [""]
        apiVersions: ["*"]
        resources: ["pods"]
    namespaceSelector:
      matchLabels:
        physics-webhook: enabled
