-
Notifications
You must be signed in to change notification settings - Fork 725
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
Add configurable QPS and burst settings for kube API client #2411
base: release-1.9
Are you sure you want to change the base?
Add configurable QPS and burst settings for kube API client #2411
Conversation
25eb8f6
to
5bf1d1e
Compare
8a8ce28
to
a5c93da
Compare
Pull Request Test Coverage Report for Build 13135248279Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
@ronk21runai Could you rebase this PR top on the release-1.9 branch? We has already been removed v1 codes from the master branch. |
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.
Mostly lgtm
Thank you
@ronk21runai Once you rebase and address my comment, we can contain this in the release-1.9.
cmd/training-operator.v1/main.go
Outdated
cfg.QPS = float32(clientQps) | ||
cfg.Burst = clientBurst |
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.
cfg.QPS = float32(clientQps) | |
cfg.Burst = clientBurst | |
cfg.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(float32(clientQps), clientBurst) |
Due to controller-runtime specification, IIUC, we need to specify those parameters throughout the RateLimiter.
Thank you for this great contribution! |
Ideally, we want to support those and manager specific parameters in the Config API for v2 |
I agree, I will create an issue to add Config API support into Kubeflow Trainer V2. |
Introduce new flags to configure `QPS` and `Burst` for the Kubernetes API client, enabling better control over API rate limits. Signed-off-by: R.K <ron.kahn@run.ai>
a5c93da
to
91c935f
Compare
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 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 |
Replaced direct QPS and Burst configuration with a token bucket rate limiter using Kubernetes client-go's flowcontrol package. Signed-off-by: R.K <ron.kahn@run.ai>
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.
otherwise lgtm
cmd/training-operator.v1/main.go
Outdated
@@ -19,6 +19,7 @@ package main | |||
import ( | |||
"errors" | |||
"flag" | |||
"k8s.io/client-go/util/flowcontrol" |
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.
could you move this to second block?
Signed-off-by: R.K <ron.kahn@run.ai>
Thanks @ronk21runai! |
What this PR does / why we need it:
Currently, the default configuration of QPS (20) and Burst (30) is configured by the controller runtime defaults, which are not adjustable by the user. This PR allows users to fine-tune these values, improving the controller's performance.
Introduce new flags to configure QPS and Burst for the Kubernetes API client, enabling better control over API rate limits.
*Proposed Changes
This PR introduces two new argument flags:
These flags allow users to configure API rate limits dynamically instead of relying on the default values.
Checklist: