Add --qps and --burst flags to contorl client-side throttling#363
Merged
Conversation
Signed-off-by: Abhishek Pareek <makeittotop@users.noreply.github.com>
Signed-off-by: Abhishek Pareek <makeittotop@users.noreply.github.com>
tksm
approved these changes
Apr 26, 2026
tksm
left a comment
Contributor
There was a problem hiding this comment.
LGTM, nice improvement. Thanks for the PR!
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
May 8, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [stern/stern](https://github.com/stern/stern) | minor | `v1.33.1` → `v1.34.0` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>stern/stern (stern/stern)</summary> ### [`v1.34.0`](https://github.com/stern/stern/blob/HEAD/CHANGELOG.md#v1340) [Compare Source](stern/stern@v1.33.1...v1.34.0) #### ⚡ Notable Changes ##### New `--qps` and `--burst` flags for client-side throttling You can now control the rate of requests to the Kubernetes API server with `--qps` and `--burst` flags. This is useful when you are tailing many pods and want to avoid overwhelming the API server. ``` stern . --qps 10 --burst 20 ``` #### Changes - Add --qps and --burst flags to control client-side throttling ([#​363](stern/stern#363)) [`7e59e4e`](stern/stern@7e59e4e) (Abhishek Pareek) - fix: honor klog -stderrthreshold even when -logtostderr is true ([#​364](stern/stern#364)) [`8e4ece3`](stern/stern@8e4ece3) (Pierluigi Lenoci) - Update dependencies for Kubernetes 1.36 ([#​365](stern/stern#365)) [`6761a78`](stern/stern@6761a78) (Takashi Kusumi) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNjguNSIsInVwZGF0ZWRJblZlciI6IjQzLjE2OC41IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiLCJhdXRvbWF0aW9uOmJvdC1hdXRob3JlZCIsImRlcGVuZGVuY3ktdHlwZTo6bWlub3IiXX0=-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #355
These flags allows fine-grained control over client-side throttling.
Defaults for
QPSandburstare 5 and 10 respectively - https://github.com/kubernetes/client-go/blob/master/rest/config.go#L46-L49--qps= - set a custom limit. For e.g. --qps=100
--qps=-1 - disable client-side throttling completely - https://github.com/kubernetes/client-go/blob/master/rest/config.go#L120
--burst= - a custom burst limit. For e.g. --burst=100
Verification:
All tests succeed.
I'm a long time user of stern, but this is my contribution towards it. cc @superbrothers - please take a look 🙏
@superbrothers I've been using stern for a long time in my work, but thiis is my first attempt to contribute to it .
Please take a look - thanks!