---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
metadata:
  labels:
    tkg.tanzu.vmware.com/addon-webhooks: "addon-webhooks"
  name: cluster-pause-mutating-webhook-configuration
webhooks:
  - admissionReviewVersions:
      - v1
      - v1beta1
    clientConfig:
      #placeholder for cabundle. To be modifed by patch or programatically.
      caBundle: Cg==
      service:
        name: tanzu-addons-manager-webhook-service
        namespace: tkg-system
        path: /mutate-cluster-x-k8s-io-v1beta1-cluster
        port: 9443
    failurePolicy: Fail
    name: cluster.pause.mutating.vmware.com
    rules:
      - apiGroups:
          - cluster.x-k8s.io
        apiVersions:
          - v1beta1
        operations:
          - UPDATE
        resources:
          - clusters
    sideEffects: None
    timeoutSeconds: 10
