karmada icon indicating copy to clipboard operation
karmada copied to clipboard

Apply ClusterClientOption to controllers

Open Poor12 opened this issue 2 years ago • 3 comments

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.

Poor12 avatar Jul 22 '22 07:07 Poor12

[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.

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 avatar Jul 22 '22 07:07 karmada-bot

Please update the release note according to the code touches by this PR. The code touches not only karmada-search.

RainbowMango avatar Sep 05 '22 04:09 RainbowMango

Please update the release note according to the code touches by this PR. The code touches not only karmada-search.

Done

Poor12 avatar Sep 05 '22 06:09 Poor12

Please re-open it if you think it is still needed. /close

RainbowMango avatar Feb 13 '23 06:02 RainbowMango

@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.

karmada-bot avatar Feb 13 '23 06:02 karmada-bot

/reopen I think this PR is still needed.

Poor12 avatar Feb 13 '23 08:02 Poor12

@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.

karmada-bot avatar Feb 13 '23 08:02 karmada-bot

Codecov Report

Merging #2240 (6bf1e3b) into master (03b1f6b) will decrease coverage by 0.03%. The diff coverage is 5.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.

codecov-commenter avatar Feb 21 '23 11:02 codecov-commenter

/assign

RainbowMango avatar Mar 06 '23 09:03 RainbowMango

There are two places to set qps and burst.

  1. 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.
  2. 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.

Poor12 avatar Mar 06 '23 11:03 Poor12

Thanks for @RainbowMango to point out. /close

Poor12 avatar Mar 06 '23 11:03 Poor12

@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.

karmada-bot avatar Mar 06 '23 11:03 karmada-bot