-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
I'm talking mainly about this part of Helm templates:
charts/versions/kruise/1.5.2/templates/webhookconfiguration.yaml
Lines 6 to 31 in d1c325e
- admissionReviewVersions: | |
- v1 | |
- v1beta1 | |
clientConfig: | |
service: | |
name: kruise-webhook-service | |
namespace: kruise-system | |
path: /mutate-pod | |
failurePolicy: Fail | |
name: mpod.kb.io | |
namespaceSelector: | |
matchExpressions: | |
- key: control-plane | |
operator: NotIn | |
values: | |
- openkruise | |
rules: | |
- apiGroups: | |
- "" | |
apiVersions: | |
- v1 | |
operations: | |
- CREATE | |
resources: | |
- pods | |
sideEffects: None |
It creates a webhook for any "CREATE" operation of the "pod" resource - this basically affects everything in a Kubernetes cluster. There can be various reasons for OpenKruise controller to be unavailable, thus, it might be very useful to have an option to make the webhook isolated only to resources in "*.kruise.io" API group.
Here's an easy example when I scaled "manager" to 0 replicas and trying to create a dummy pod:
$ kubectl run busybox --image=busybox
Error from server (InternalError): Internal error occurred: failed calling webhook "mpod.kb.io": failed to call webhook: Post "https://kruise-webhook-service.kruise-system.svc:443/mutate-pod?timeout=10s": no endpoints available for service "kruise-webhook-service"
Metadata
Metadata
Assignees
Labels
No labels