Skip to content

Add --qps and --burst flags to contorl client-side throttling#363

Merged
tksm merged 2 commits into
stern:masterfrom
makeittotop:355-add
Apr 29, 2026
Merged

Add --qps and --burst flags to contorl client-side throttling#363
tksm merged 2 commits into
stern:masterfrom
makeittotop:355-add

Conversation

@makeittotop

@makeittotop makeittotop commented Apr 22, 2026

Copy link
Copy Markdown
Contributor

Fixes #355

These flags allows fine-grained control over client-side throttling.

Defaults for QPS and burst are 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!

Signed-off-by: Abhishek Pareek <makeittotop@users.noreply.github.com>
Signed-off-by: Abhishek Pareek <makeittotop@users.noreply.github.com>

@tksm tksm left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, nice improvement. Thanks for the PR!

@tksm tksm merged commit 7e59e4e into stern:master Apr 29, 2026
2 checks passed
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 ([#&#8203;363](stern/stern#363)) [`7e59e4e`](stern/stern@7e59e4e) (Abhishek Pareek)
- fix: honor klog -stderrthreshold even when -logtostderr is true ([#&#8203;364](stern/stern#364)) [`8e4ece3`](stern/stern@8e4ece3) (Pierluigi Lenoci)
- Update dependencies for Kubernetes 1.36 ([#&#8203;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=-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disable client-side throttling

2 participants