-
Notifications
You must be signed in to change notification settings - Fork 916
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
Support namespace filter in RR for search proxy #3527
Conversation
Test ReportThere are two clusters.
In cluster2:
rr: apiVersion: search.karmada.io/v1alpha1
kind: ResourceRegistry
metadata:
name: foo
spec:
resourceSelectors:
- apiVersion: v1
kind: Pod
namespace: test
|
/assign @XiShanYongYe-Chang |
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #3527 +/- ##
==========================================
+ Coverage 52.64% 53.09% +0.44%
==========================================
Files 213 216 +3
Lines 19581 20107 +526
==========================================
+ Hits 10308 10675 +367
- Misses 8720 8856 +136
- Partials 553 576 +23
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Thanks a lot, I will take a look ASAP. |
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.
Thanks a lot
Signed-off-by: yingjinhui <yingjinhui@didiglobal.com>
/lgtm Hi @hanzai, I think this pr has achieved the function you want, can you help take a look? |
In this case, should proxy get pods of default namespace from cache or karmada cluster? The code indicates that this action hits the cache plugin when pods of default namespace are not cached. @ikaven1024 @XiShanYongYe-Chang |
Hi @hanzai I'm sorry, I didn't catch your point. Do you mean if it's not in the search cache, it's directly obtained from the member cluster? |
pods in default ns are not cached, so client get none.
This code indicating |
The Command In product environment, different namespaces are used by different teams. Someone adds RR with a namespace should not make affects in other namespaces. |
Hi @hanzai, thanks for your wonderful reply, I understand your concern. This is indeed a question worth considering. According to the current design, ResourceRegistry is a system configuration. When an administrator performs operations on ResourceRegistry, all users who use karmada search to query data are affected. Therefore, all users need to know the existence of the ResourceRegistry, that is, users need to know which resources are cached on the current control plane. How to let common users know whether the queried information is cached from the member cluster to the control plane? One method is that the user proactively queries the ResourceRegistry, and the other method is based on the returned result. Currently, resources obtained from the cache carry labels of cluster information, but resources obtained from karmada do not have labels. Perhaps we can consider removing Ask @ikaven1024 for some advice. |
With it, it's is friendly to users to operate with kubectl. Of cause, users can custom their individual strategy by refactoring the proxy framework. But it's not recommend to merge it to the opensource. |
Yeah,I agree with it. Karmada-plugin is necessary in my use case. |
For example:
It's is strange that get some pods from IMO, we should still hold this logic atpresent. And do it when we have sufficient cases. |
I agree with this point. Hi @hanzai, if you want to discuss it at the meeting, please feel free to add agenda in the next Karmada Community Meeting: https://docs.google.com/document/d/1y6YLVC-v7cmVAdbjedoyR5WL0-q45DBRXTvz5_I7bkA/edit#heading=h.g61sgp7w0d0c |
I'm tied up this month and glad to attend the meeting next month. |
Okay, We are looking forward to your participation. I think that this pr can continue to advance, related questions you can raise an issue to track, thank you. /approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: XiShanYongYe-Chang 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 type of PR is this?
/kind feature
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #3445
Special notes for your reviewer:
Does this PR introduce a user-facing change?: