-
Notifications
You must be signed in to change notification settings - Fork 594
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(gwapi): setup controllers dynamically when required CRDs get installed #3996
Conversation
6331f3b
to
96ec1d0
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #3996 +/- ##
=======================================
- Coverage 59.9% 59.4% -0.5%
=======================================
Files 148 149 +1
Lines 16290 16399 +109
=======================================
- Hits 9759 9753 -6
- Misses 5898 6009 +111
- Partials 633 637 +4
☔ View full report in Codecov by Sentry. |
96ec1d0
to
2d937be
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe we should add a changelog entry for this. WDYT @czeslavo ?
bc0b313
to
2978bc1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 🚢
Adds watch and list permissions for apiextensions.k8s.io.customresourcedefinitions to controller's ClusterRole to enable watching CRDs and start reconcilers dynamically once they get installed implemented in Kong/kubernetes-ingress-controller#3996.
What this PR does / why we need it:
Adds a
crds.DynamicController
that ensures that RequiredCRDs are installed in the cluster and only then sets up all of its Controllers that depend on them. In case the CRDs are not installed at start-up time, DynamicController will set up a watch for CustomResourceDefinition and will dynamically set up its Controllers once it detects that all RequiredCRDs are already in place.It's used for both the beta and alpha parts of the Gateway API.
Which issue this PR fixes:
Part of #3029.
Special notes for your reviewer:
PR Readiness Checklist:
Complete these before marking the PR as
ready to review
:CHANGELOG.md
release notes have been updated to reflect any significant (and particularly user-facing) changes introduced by this PR