You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 consistency
0 commit comments