📖docs: improve MaxConcurrentReconciles documentation#3521
Conversation
|
Welcome @mattsu2020! |
|
Hi @mattsu2020. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
Add detailed Go doc comments for MaxConcurrentReconciles explaining: - The option controls the number of worker goroutines processing items from the controller's work queue - Different queue items may be reconciled concurrently, but the same item is never processed by multiple workers at the same time - If the same item is added again while being processed, it is marked dirty and requeued after the current reconciliation finishes - Increasing concurrency can improve throughput but may increase load on the API server and external systems; QPS/Burst settings should be considered - Manager-level (config.Controller) and GroupKind-level configuration are also available; per-controller values take precedence
|
Hi @joelanford @varshaprasad96, Could you please take a look when you have a chance? This is a docs-only PR for #1416 that improves the GoDoc around Thank you! |
| // | ||
| // The work queue ensures that the same item is not processed by multiple | ||
| // workers at the same time. If the same item is added again while it is being | ||
| // processed, it is marked dirty and requeued after the current reconciliation |
There was a problem hiding this comment.
Remove the comment about "being marked dirty", that is a) an implemention detail and b) not actually the case when using the priorityqueue, its just called locked there
There was a problem hiding this comment.
Thank you
Edit comment
| // finishes. For the default reconcile.Request type, the item key is the | ||
| // object's namespace/name. | ||
| // | ||
| // Higher concurrency can increase load on the Kubernetes API server and any |
There was a problem hiding this comment.
I don't find this a useful section, because it depends a lot on what exactly the reconciler does. The bit about QPS/Burst is also not useful, because we default to disable the clientside ratelimiter and rely on APF
There was a problem hiding this comment.
Thank you.
I've deleted the relevant part of the comment.
Co-authored-by: Alvaro Aleman <alvaroaleman@users.noreply.github.com>
Co-authored-by: Alvaro Aleman <alvaroaleman@users.noreply.github.com>
alvaroaleman
left a comment
There was a problem hiding this comment.
/hold
/assign @sbueringer
|
LGTM label has been added. DetailsGit tree hash: d7844ed6e50e8b9e6d802e7bb072abed46bcaf46 |
|
/ok-to-test |
|
Thx! /lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: alvaroaleman, mattsu2020, sbueringer The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/hold cancel |
|
thanks |
Summary
This improves the GoDoc for
MaxConcurrentReconcilesto address issue #1416, which requested better documentation explaining when and how to use this option.The added documentation explains:
reconcile.Requesttype, the item key is the object's namespace/nameconfig.Controller.MaxConcurrentReconciles) and GroupKind-level (config.Controller.GroupKindConcurrency) configuration are also available; per-controller values take precedenceChanges
pkg/controller/controller.goTypedOptions.MaxConcurrentReconciles(primary documentation)pkg/config/controller.gopkg/internal/controller/controller.goOptionsandControllerstructs reference primary docCloses #1416