apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  name: replacer-webhook-dev
  labels:
    app: replacer-dev
webhooks:
  - name: replacer.default.svc
    admissionReviewVersions: ["v1beta1","v1"]
    sideEffects: None
    clientConfig:
      service:
        name: replacer
        namespace: default
        path: "/mutate"
    rules:
      - operations: [ "CREATE","UPDATE" ]
        apiGroups: ["apps", ""]
        apiVersions: ["v1"]
        resources: ["deployments","daemonset","statefulset"]
      - operations: [ "CREATE","UPDATE" ]
        apiGroups: ["batch"]
        apiVersions: ["v1"]
        resources: ["jobs"]