-
Notifications
You must be signed in to change notification settings - Fork 94
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
✨ configure QPS and Burst for the flags of klusterlet agents #344
Conversation
bfd1851
to
93e5ec6
Compare
8850f39
to
9ec9963
Compare
/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) |
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.
what if it is not set? it could happen during upgrade.
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.
will use the default values which are set at the beginning : https://github.com/open-cluster-management-io/ocm/pull/344/files#diff-cb893b14481c5389fd18eb242570f35dfc9ddccb794406ba79cf256c88d8a51dR193
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.
but the klusterlet.Spec.RegistrationConfiguration.KubeAPIQPS can be 0 for old klusterlet
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.
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}}
pkg/operator/operators/klusterlet/controllers/klusterletcontroller/klusterlet_controller.go
Show resolved
Hide resolved
640456b
to
be95fd8
Compare
Signed-off-by: Zhiwei Yin <zyin@redhat.com>
be95fd8
to
683d1f0
Compare
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.
/approve
/lgtm
[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 |
8bd9979
into
open-cluster-management-io:main
Summary
configure QPS and Burst for the flags of klusterlet agents
Related issue(s)
#331
Fixes #