apiVersion: admissionregistration.k8s.io/v1beta1
kind: MutatingWebhookConfiguration
metadata:
  name: kruise-mutating-webhook-configuration
---
apiVersion: admissionregistration.k8s.io/v1beta1
kind: ValidatingWebhookConfiguration
metadata:
  name: kruise-validating-webhook-configuration
webhooks:
  - clientConfig:
      caBundle: fake
      service:
        name: kruise-webhook-server-service
        namespace: kruise-system
        path: /validating-create-update-broadcastjob
    failurePolicy: Fail
    name: validating-create-update-broadcastjob.kruise.io
    namespaceSelector:
      matchExpressions:
        - key: control-plane
          operator: DoesNotExist
    rules:
      - apiGroups:
          - apps.kruise.io
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - broadcastjobs
  - clientConfig:
      caBundle: fake
      service:
        name: kruise-webhook-server-service
        namespace: kruise-system
        path: /validating-create-update-sidecarset
    failurePolicy: Fail
    name: validating-create-update-sidecarset.kruise.io
    namespaceSelector:
      matchExpressions:
        - key: control-plane
          operator: DoesNotExist
    rules:
      - apiGroups:
          - apps.kruise.io
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - sidecarsets
  - clientConfig:
      caBundle: fake
      service:
        name: kruise-webhook-server-service
        namespace: kruise-system
        path: /validating-create-update-statefulset
    failurePolicy: Fail
    name: validating-create-update-statefulset.kruise.io
    namespaceSelector:
      matchExpressions:
        - key: control-plane
          operator: DoesNotExist
    rules:
      - apiGroups:
          - apps.kruise.io
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - statefulsets
  - clientConfig:
      caBundle: fake
      service:
        name: kruise-webhook-server-service
        namespace: kruise-system
        path: /validating-create-update-uniteddeployment
    failurePolicy: Fail
    name: validating-create-update-uniteddeployment.kruise.io
    namespaceSelector:
      matchExpressions:
        - key: control-plane
          operator: DoesNotExist
    rules:
      - apiGroups:
          - apps.kruise.io
        apiVersions:
          - v1alpha1
        operations:
          - CREATE
          - UPDATE
        resources:
          - uniteddeployments