---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: mutating-webhook-configuration
  annotations:
    cert-manager.io/inject-ca-from: $(CERTIFICATE_NAMESPACE)/$(CERTIFICATE_NAME)
webhooks:
- admissionReviewVersions: [v1]
  clientConfig:
    service:
      name: webhook
      namespace: system
      path: /spark/mutate-driver-core-v1-pod
  failurePolicy: Ignore
  name: spark.mutate-driver.core-v1-pod
  objectSelector:
    matchLabels:
      spark-driver: client-mode
  rules:
  - apiGroups: [""]
    apiVersions: ["v1"]
    operations: ["CREATE"]
    resources: ["pods"]
  sideEffects: None