karmada
karmada copied to clipboard
Apply ClusterClientOption to controllers
What type of PR is this? /kind bug
What this PR does / why we need it: Now ClusterAPIQPS and ClusterAPIBurst are not fully applied to controllers which need to connect with kube-apiservers in member clusters.
Which issue(s) this PR fixes: Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
karmada-search introduces `cluster-api-qps` to indicate qps to use while talking with cluster kube-apiserver and `cluster-api-burst` to indicate burst to use while talking with cluster kube-apiserver.
`cluster-api-qps` and `cluster-api-burst` in karmada-controller-manager and karmada-agent now are valid for all controllers.
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please assign kevin-wangzefeng after the PR has been reviewed.
You can assign the PR to them by writing /assign @kevin-wangzefeng
in a comment when ready.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve
in a comment
Approvers can cancel approval by writing /approve cancel
in a comment
Please update the release note according to the code touches by this PR.
The code touches not only karmada-search
.
Please update the release note according to the code touches by this PR. The code touches not only
karmada-search
.
Done
Please re-open it if you think it is still needed. /close
@RainbowMango: Closed this PR.
In response to this:
Please re-open it if you think it is still needed. /close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
/reopen I think this PR is still needed.
@Poor12: Reopened this PR.
In response to this:
/reopen I think this PR is still needed.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
Codecov Report
Merging #2240 (6bf1e3b) into master (03b1f6b) will decrease coverage by
0.03%
. The diff coverage is5.88%
.
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## master #2240 +/- ##
==========================================
- Coverage 49.21% 49.18% -0.03%
==========================================
Files 202 202
Lines 18168 18179 +11
==========================================
+ Hits 8941 8942 +1
- Misses 8737 8746 +9
- Partials 490 491 +1
Flag | Coverage Δ | |
---|---|---|
unittests | 49.18% <5.88%> (-0.03%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
...kg/controllers/status/cluster_status_controller.go | 0.00% <0.00%> (ø) |
|
pkg/controllers/status/workstatus_controller.go | 0.00% <0.00%> (ø) |
|
pkg/util/membercluster_client.go | 63.63% <6.66%> (-8.09%) |
:arrow_down: |
pkg/search/proxy/store/util.go | 94.31% <0.00%> (+0.94%) |
:arrow_up: |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
/assign
There are two places to set qps and burst.
- ObjectWatcher will use dynamicClient to create or upgrade workloads in member clusters. Since we do not share the client for each clusters, we will create the client when we need to create a specific resource. So it will not work in this situation.
- SingleClusterInformerManager will use the client to create informer manager mainly for watching the resources in member clusters. However,
watch
will not be limited. So this will not work, too.
// Watch attempts to begin watching the requested location.
// Returns a watch.Interface, or an error.
func (r *Request) Watch(ctx context.Context) (watch.Interface, error) {
// We specifically don't want to rate limit watches, so we
// don't use r.rateLimiter here.
Thanks for @RainbowMango to point out. /close
@Poor12: Closed this PR.
In response to this:
Thanks for @RainbowMango to point out. /close
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.