apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: mutating-webhook-configuration
  annotations:
    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
webhooks:
- name: mutating-webhook.k8s-hostpath-device-plugin.everpeace.github.com
  namespaceSelector:
    matchExpressions:
    - key: app.kubernetes.io/name
      operator: NotIn
      values: ["hostpath-sample-device-plugin"]
  admissionReviewVersions:
  - v1
  - v1beta1
  clientConfig:
    service:
      name: webhook-service
      namespace: system
      path: /mutating
  failurePolicy: Fail
  rules:
  - apiGroups:
    - ""
    apiVersions:
    - v1
    operations:
    - CREATE
    resources:
    - pods
  sideEffects: None
