Decouple conversion webhook registration from leader election - #2122
Merged
sergenyalcin merged 2 commits intoJun 23, 2026
Merged
Conversation
sergenyalcin
force-pushed
the
register-webhooks-seperately
branch
from
June 18, 2026 08:02
8c0d464 to
ce26ef0
Compare
Collaborator
Author
|
/test-examples="examples/ec2/cluster/v1beta1/vpc.yaml" |
sergenyalcin
marked this pull request as ready for review
June 18, 2026 10:46
sergenyalcin
requested review from
bobh66,
erhancagirici,
jastang,
turkenf and
ulucinar
as code owners
June 18, 2026 10:46
3 tasks
ulucinar
reviewed
Jun 22, 2026
ulucinar
left a comment
Collaborator
There was a problem hiding this comment.
Thank you @sergenyalcin for working debugging & fixing this issue.
Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
Signed-off-by: Sergen Yalçın <yalcinsergen97@gmail.com>
sergenyalcin
force-pushed
the
register-webhooks-seperately
branch
from
June 22, 2026 15:53
174e974 to
3b05311
Compare
ulucinar
approved these changes
Jun 23, 2026
2 tasks
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.
Description of your changes
Applies the upjet template fix for the conversion webhook / leader election bug (upjet#) to this provider.
hack/main.go.tmpl: removesStartWebhooksfrom both opts structs; adds an explicitstartWebhooksblock before thecanSafeStartgate that callsSetupWebhookWithManager_<group>for both cluster-scoped and namespaced controllers. A comment at the call site explains why webhook registration must happen here rather than inside the gate.config/templates/controller.go.tmpl: mirrors the upjet template change — addsSetupWebhookWithManager, removes theif o.StartWebhooks { ... }block fromSetup.Generated files: all
zz_main.go,zz_controller.go, andzz_*_setup.gofiles regenerated from the updated templates.Note: This PR uses the forked upjet dependency until the upjet PR is merged.
I have:
make generateand committed the results (ideally in a separate commit).make check-diff.How has this code been tested
https://github.com/crossplane-contrib/provider-upjet-aws/actions/runs/27750948935