Commit 62f800b
authored
Fix webhook admission control deadlock during installation (#2179)
This fixes a chicken-and-egg bootstrap issue where the operator would
get stuck during KnativeServing installation.
Problem:
- ValidatingWebhookConfiguration with failurePolicy=Fail intercepts
Certificate resource creation
- If Certificate resources are created before the webhook pod is ready,
the API server rejects them
- The activator deployment depends on the routing-serving-certs secret
(generated from a Certificate resource) at runtime
- Previous stage ordering would check all deployments (including activator)
before creating Certificate resources, causing a deadlock
Solution:
1. Added CheckWebhookDeployment() function that waits specifically for
the webhook deployment to be ready before proceeding
2. Reordered reconciliation stages:
- manifests.Install (creates all deployments)
- CheckWebhookDeployment (waits for webhook to be ready)
- InstallWebhookDependentResources (creates Certificate resources)
- CheckDeployments (checks all deployments including activator)
This ensures:
- Webhook is ready before Certificate creation (avoids admission rejection)
- Certificate resources exist before checking activator (avoids missing secret)
- Clear error message if webhook deployment is missing from manifest
Related functions:
- pkg/reconciler/common/deployments.go: Added CheckWebhookDeployment()
- pkg/reconciler/knativeserving/knativeserving.go: Reordered stages
- pkg/reconciler/common/install.go: Added logging for consistency1 parent 0423300 commit 62f800b
File tree
3 files changed
+43
-2
lines changed- pkg/reconciler
- common
- knativeserving
3 files changed
+43
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
30 | 32 | | |
31 | 33 | | |
32 | 34 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
46 | 85 | | |
47 | 86 | | |
48 | 87 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| 93 | + | |
93 | 94 | | |
94 | 95 | | |
95 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
124 | 124 | | |
125 | 125 | | |
126 | 126 | | |
127 | | - | |
128 | | - | |
| 127 | + | |
| 128 | + | |
129 | 129 | | |
| 130 | + | |
130 | 131 | | |
131 | 132 | | |
132 | 133 | | |
| |||
0 commit comments