-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
🌱 Use Lazy Restmapper #8091
🌱 Use Lazy Restmapper #8091
Conversation
44c20e2
to
184e5cd
Compare
/hold |
184e5cd
to
ffeb158
Compare
/hold cancel |
/test pull-cluster-api-test-mink8s-main |
cc @sbueringer who is tracking the latest changes in CR and how they impact CAPI; from a quick pass, two comments from my side:
|
I'll take a closer look at the CR PR (probably tomorrow). At a first glance I agree with Fabrizio. Would be good to feature-gate it for now (even if it will probably be the default in CR v0.15) |
/test pull-cluster-api-e2e-full-main |
Just fyi. Brought up a question on the CR PR: kubernetes-sigs/controller-runtime#2116 (comment) If I'm correct the Cluster API controller would have to be restarted e.g. when a new infra provider which introduces CRDs in a new APIGroup is deployed. But (assuming I'm right) I think this is just a small gap that can be addressed in CR. |
/retest |
@Fedosin Your fix in CR is merged, cherry-picked and v0.14.5 has been released. I opened a PR in CAPI to bump to v0.14.5 (#8213). Would be great if you have time to update this PR once the CR bump is merged. It would be nice to get a version of this PR where the lazy restmapper is used behind a feature gate into CAPI v1.4. We might get to investing a bit in scale testing after v1.4 and this would allow us to easily try out the lazy restmapper in those tests. (just fyi, we released the first v1.4 beta on Tuesday, we roughly have another 1,5 weeks to get this PR in until the first rc, then it's only bugfixes etc (xref: https://github.com/kubernetes-sigs/cluster-api/blob/main/docs/release/releases/release-1.4.md)) |
@sbueringer thank you for your review and comments! I updated the PR and now it uses the released 0.14.5 version of controller-runtime. |
@Fedosin Change itself looks fine. Let's add a feature gate for this (disabled per default). Should be:
|
This featuregate will be used for enabling lazy restmapper functionality from controller-runtime.
The feature was introduced in controller-runtime 0.14.4+ allows to use lazy restmapper. The main advantage of this restmapper is that it fetches only required api resources in runtime, which highly reduces the number of http calls to the api server.
/test pull-cluster-api-test-main |
Thank you very much! /test pull-cluster-api-e2e-full-main /lgtm |
LGTM label has been added. Git tree hash: e88b70568d267715c146b3bb70b81268e7eb6f89
|
/retest |
Nice one! |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabriziopandini The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
The feature introduced in controller-runtime 0.14.4+ allows to use a lazy restmapper. The main advantage of this restmapper is that it fetches only required api resources in runtime, which significantly reduces the number of http requests to the api server.