Skip to content

Commit d4b08e3

Browse files
author
Mengqi Yu
committed
📖 add a note for bootstrapping webhooks for pods
1 parent 73805d5 commit d4b08e3

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

docs/book/src/cronjob-tutorial/running-webhook.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,15 @@ kubectl create -f config/samples/batch_v1_cronjob.yaml
5757
You can also try to create an invalid CronJob (e.g. use an ill-formatted
5858
schedule field). You should see a creation failure with a validation error.
5959

60-
**Note**: If you are
61-
60+
<aside>
61+
Note: If you are deploying a webhook for pods in the same cluster, be
62+
careful about the bootstrapping problem, since the creation request of the
63+
webhook pod would be sent to the webhook pod itself, which hasn't come up yet.
64+
65+
To make it work, you can either use [namespaceSelector] if your kubernetes
66+
version is 1.9+ or use [objectSelector] if your kubernetes version is 1.15+ to
67+
skip itself.
68+
</aside>
69+
70+
[namespaceSelector]: https://github.com/kubernetes/api/blob/kubernetes-1.14.5/admissionregistration/v1beta1/types.go#L189-L233
71+
[objectSelector]: https://github.com/kubernetes/api/blob/kubernetes-1.15.2/admissionregistration/v1beta1/types.go#L262-L274

0 commit comments

Comments
 (0)