Skip to content
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

Proxy connect get cluster impersonator secret use secretLister #3947

Merged

Conversation

yanfeng1992
Copy link
Member

@yanfeng1992 yanfeng1992 commented Aug 16, 2023

What type of PR is this?
/kind cleanup

What this PR does / why we need it:

When using the proxy function provided by karmada-aggregated-apiserver to access member cluster resources. The current implementation needs to obtain the impersonator secret corresponding to the member cluster in real time each time.

In large-scale scenarios, the number of requests to karmada-apiserver will increase, and I think cached queries should be used

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

NONE

@karmada-bot karmada-bot added the kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. label Aug 16, 2023
@karmada-bot karmada-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Aug 16, 2023
Copy link
Member

@zishen zishen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job, and you will add relevant test cases later, right?

@XiShanYongYe-Chang
Copy link
Member

Thanks~
/assign

The UT run failed, can you help take a look?

@yanfeng1992 yanfeng1992 force-pushed the proxy-connect-use-secretLister branch from a9a2277 to b316fbd Compare August 16, 2023 10:34
@karmada-bot karmada-bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 16, 2023
@codecov-commenter
Copy link

codecov-commenter commented Aug 16, 2023

Codecov Report

Merging #3947 (c30e6e6) into master (1953a0e) will decrease coverage by 0.14%.
Report is 41 commits behind head on master.
The diff coverage is 75.00%.

❗ 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    #3947      +/-   ##
==========================================
- Coverage   54.85%   54.71%   -0.14%     
==========================================
  Files         229      229              
  Lines       21927    22079     +152     
==========================================
+ Hits        12027    12080      +53     
- Misses       9261     9353      +92     
- Partials      639      646       +7     
Flag Coverage Δ
unittests 54.71% <75.00%> (-0.14%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
pkg/registry/cluster/storage/storage.go 0.00% <0.00%> (ø)
pkg/registry/cluster/storage/proxy.go 65.38% <100.00%> (+6.29%) ⬆️

... and 6 files with indirect coverage changes

@yanfeng1992 yanfeng1992 force-pushed the proxy-connect-use-secretLister branch from b316fbd to 8e7d11a Compare August 16, 2023 13:45
@yanfeng1992
Copy link
Member Author

I added UT @XiShanYongYe-Chang @zishen

Copy link
Member

@XiShanYongYe-Chang XiShanYongYe-Chang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot

pkg/registry/cluster/storage/proxy.go Outdated Show resolved Hide resolved
pkg/registry/cluster/storage/proxy_test.go Outdated Show resolved Hide resolved
Signed-off-by: huangyanfeng <huangyanfeng1992@gmail.com>
@yanfeng1992 yanfeng1992 force-pushed the proxy-connect-use-secretLister branch from 8e7d11a to c30e6e6 Compare August 18, 2023 01:53
@XiShanYongYe-Chang
Copy link
Member

Thanks~
/lgtm

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2023
@yanfeng1992
Copy link
Member Author

cc @RainbowMango

@RainbowMango
Copy link
Member

@XiShanYongYe-Chang Are you waiting for me to take a look?

@XiShanYongYe-Chang
Copy link
Member

@XiShanYongYe-Chang Are you waiting for me to take a look?

Hi @RainbowMango we need you to approve the merge request.

@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 18, 2023
@karmada-bot karmada-bot merged commit 24bb582 into karmada-io:master Aug 18, 2023
12 checks passed
@yanfeng1992 yanfeng1992 deleted the proxy-connect-use-secretLister branch April 2, 2024 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants