Repository navigation
fix(webhook): publish not-ready address so conversion bootstraps - #143
Merged
Merged
Conversation
The manager serves its own CRD conversion webhook. With v1beta1 storage and controllers watching the v1alpha1 spoke, the informer LIST at startup must convert stored objects through the webhook Service — but the Service excluded the pod until it passed readiness, and readiness waits on cache sync, which waits on that conversion. Cold starts with stored objects (e.g. the Helm same-cluster e2e) deadlocked: 'connection refused' to the webhook, caches never synced, pod never Ready. publishNotReadyAddresses lets bootstrap conversion reach the already-serving pod.
There was a problem hiding this comment.
Pull request overview
This PR fixes a startup deadlock where the manager’s self-hosted CRD conversion webhook Service had no endpoints during bootstrap because the pod wasn’t Ready yet, preventing informer cache sync when stored objects require conversion.
Changes:
- Enable
publishNotReadyAddresses: trueon the kustomize webhook Service to publish endpoints before readiness gates pass. - Enable
publishNotReadyAddresses: trueon the Helm chart’s webhook Service template for the same bootstrap behavior. - Add inline comments documenting the deadlock scenario and why this setting is required.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| config/webhook/service.yaml | Publishes not-ready pod addresses for the webhook Service to avoid conversion bootstrap deadlock. |
| charts/mkurator/templates/webhook-service.yaml | Applies the same Service behavior in the Helm deployment path. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Root cause (confirmed via diagnostics on main run 30096991327)
The
E2Ered onmainis a conversion-webhook startup deadlock, introduced by the v1beta1 storage flip (beb43f7).The manager serves its own CRD conversion webhook. Controllers still watch the v1alpha1 spoke (
For(&messagingv1alpha1...)), so with storage now v1beta1, the informer LIST at startup must convert stored objects through the webhook Service. But the Service excluded the pod until it passed readiness, and/readyzwaits on cache sync, which waits on that conversion → deadlock.Diagnostic dump from the failing Helm-on-same-cluster step:
connection refusedis TCP-level — the Service had no endpoint because the pod was not-Ready. A fresh kustomize install passes because there are no stored objects to convert at startup; the deadlock only bites a cold start with stored objects (the realistic upgrade/DR path this e2e exercises).Fix
publishNotReadyAddresses: trueon both webhook Services (Helm chart + kustomizeconfig/webhook). This lets bootstrap conversion reach the already-serving pod during startup, breaking the deadlock. Standard remedy for self-hosted conversion-webhook bootstrap; matches the staged migration (controllers stay on the spoke, conversion carries the load) — no need to migrate controllers to v1beta1.Verification
The Helm-on-same-cluster step runs only on the
mainpush (PR e2e runs kustomize only, andworkflow_dispatch'se2e-helmjob uses a fresh cluster), so this PR's own e2e cannot exercise the path. The failure-time diagnostic added in the prior commit stays in to confirm on the post-merge main run.