apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: kubernetes-sidecar-injector-webhook
  labels:
    app: kubernetes-sidecar-injector
webhooks:
  - name: kubernetes-sidecar-injector.expedia.com
    sideEffects: Some
    admissionReviewVersions: ["v1"]
    clientConfig:
      service:
        name: kubernetes-sidecar-injector-svc
        namespace: default
        path: "/mutate"
      caBundle: ${CA_BUNDLE}
    rules:
      - operations: [ "CREATE" ]
        apiGroups: [""]
        apiVersions: ["v1"]
        resources: ["pods"]
    namespaceSelector:
      matchLabels:
        kubernetes-sidecar-injector: enabled
