✨ Add ClusterFilter to ClusterCache Options#12665
✨ Add ClusterFilter to ClusterCache Options#12665k8s-ci-robot merged 1 commit intokubernetes-sigs:mainfrom
Conversation
|
Please write the test about this. |
2e015ff to
165bddb
Compare
|
Now maybe the code looks better? |
Yup! I'm wondering if we need test coverage for cases where the filter returns different results for the same cluster over time, as that seems to be supported now? |
|
My naive attempt to test this did not go so well 😓 |
The problem is simply that you are trying to patch labels with the status subresource :) g.Expect(env.Status().Patch(ctx, testCluster, patch)).To(Succeed())(in l.129 + l.143) |
|
Oh my 🤦 |
5ac3629 to
ed97655
Compare
|
I'll try to take a closer look next week |
|
@lentzi90 Do you have time to address the finding above? |
This allows filtering the Clusters that are handled by the cache. It can be used for example by providers that only want to cache Clusters of the relevant type to them. Signed-off-by: Lennart Jern <lennart.jern@est.tech>
ed97655 to
94233c1
Compare
|
I forgot about it, but now I think I have addressed it. Looks good according to the tests at least. 🙂 |
|
I'll have to get back to this after PTO :) |
|
The Kubernetes project currently lacks enough contributors to adequately respond to all PRs. This bot triages PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
|
/remove-lifecycle stale |
|
Thank you very much! /lgtm |
|
LGTM label has been added. DetailsGit tree hash: 163b8ba54172781fe84d861176017b9a17856045 |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
What this PR does / why we need it:
This allows filtering the Clusters that are handled by the cache. It can be used for example by providers that only want to cache Clusters of the relevant type to them.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Fixes #12657
/area clustercache