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

✨ configure QPS and Burst for the flags of klusterlet agents #344

Merged

Conversation

zhiweiyin318
Copy link
Member

Summary

configure QPS and Burst for the flags of klusterlet agents

Related issue(s)

#331
Fixes #

@openshift-ci openshift-ci bot requested review from xuezhaojun and zhujian7 January 15, 2024 16:18
@zhiweiyin318 zhiweiyin318 force-pushed the add-flags branch 2 times, most recently from bfd1851 to 93e5ec6 Compare January 15, 2024 16:28
Copy link

codecov bot commented Jan 15, 2024

Codecov Report

Attention: 163 lines in your changes are missing coverage. Please review.

Comparison is base (f89d535) 61.75% compared to head (683d1f0) 61.57%.
Report is 12 commits behind head on main.

Files Patch % Lines
...ollers/migrationcontroller/migration_controller.go 56.09% 50 Missing and 4 partials ⚠️
pkg/registration/hub/lease/clocksynccontroller.go 42.85% 47 Missing and 5 partials ⚠️
...addon/controllers/addonconfiguration/controller.go 0.00% 15 Missing ⚠️
...setcontroller/manifestworkreplicaset_controller.go 20.00% 8 Missing and 4 partials ⚠️
pkg/addon/controllers/addonconfiguration/graph.go 84.09% 5 Missing and 2 partials ⚠️
...troller/manifestworkreplicaset_deploy_reconcile.go 73.07% 6 Missing and 1 partial ⚠️
...donconfiguration/addon_configuration_reconciler.go 14.28% 4 Missing and 2 partials ⚠️
pkg/common/helpers/error.go 0.00% 3 Missing ⚠️
...lers/klusterletcontroller/klusterlet_controller.go 76.92% 2 Missing and 1 partial ⚠️
pkg/work/helper/helpers.go 0.00% 2 Missing ⚠️
... and 2 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #344      +/-   ##
==========================================
- Coverage   61.75%   61.57%   -0.18%     
==========================================
  Files         132      133       +1     
  Lines       13992    14198     +206     
==========================================
+ Hits         8641     8743     +102     
- Misses       4585     4687     +102     
- Partials      766      768       +2     
Flag Coverage Δ
unit 61.57% <53.95%> (-0.18%) ⬇️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhiweiyin318 zhiweiyin318 force-pushed the add-flags branch 2 times, most recently from 8850f39 to 9ec9963 Compare January 16, 2024 00:06
@zhiweiyin318
Copy link
Member Author

/assign @qiujian16

@@ -241,7 +251,8 @@ func (n *klusterletController) sync(ctx context.Context, controllerContext facto
if klusterlet.Spec.RegistrationConfiguration != nil {
registrationFeatureGates = klusterlet.Spec.RegistrationConfiguration.FeatureGates
config.ClientCertExpirationSeconds = klusterlet.Spec.RegistrationConfiguration.ClientCertExpirationSeconds

config.RegistrationKubeAPIQPS = float32(klusterlet.Spec.RegistrationConfiguration.KubeAPIQPS)
Copy link
Member

Choose a reason for hiding this comment

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

what if it is not set? it could happen during upgrade.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

but the klusterlet.Spec.RegistrationConfiguration.KubeAPIQPS can be 0 for old klusterlet

Copy link
Member Author

Choose a reason for hiding this comment

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

add flags for the agent like, will not set qps/burst flags if kubeAPIQPS is 0.

          {{if gt .RegistrationKubeAPIQPS 0.0}}
          - "--kube-api-qps={{ .RegistrationKubeAPIQPS }}"
          {{end}}
          {{if gt .RegistrationKubeAPIBurst 0}}
          - "--kube-api-burst={{ .RegistrationKubeAPIBurst }}"
          {{end}}

@zhiweiyin318 zhiweiyin318 force-pushed the add-flags branch 6 times, most recently from 640456b to be95fd8 Compare January 17, 2024 08:22
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
Copy link
Member

@qiujian16 qiujian16 left a comment

Choose a reason for hiding this comment

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

/approve
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Jan 18, 2024
Copy link
Contributor

openshift-ci bot commented Jan 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiujian16, zhiweiyin318

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

@openshift-merge-bot openshift-merge-bot bot merged commit 8bd9979 into open-cluster-management-io:main Jan 18, 2024
13 checks passed
@zhiweiyin318 zhiweiyin318 deleted the add-flags branch January 18, 2024 01:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants