Repository navigation
feat: add kube-api-qps and kube-api-burst flags for API client tuning - #347
Merged
Syspretor merged 1 commit intoMay 22, 2026
Merged
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces Kubernetes API client tuning parameters, specifically QPS and Burst settings, along with a concurrency configuration for the controller. These are exposed via command-line flags and integrated into the Helm chart. Review feedback identifies a high-severity issue where flag.Parse() is executed before all flags (like logger options) are registered, which would cause them to be ignored. There is also a recommendation to improve the Helm template's robustness by adding conditional checks for the tuning configuration to prevent rendering errors and allow for zero-value overrides.
Add --kube-api-qps and --kube-api-burst flags to the controller, allowing operators to tune client-go rate limiting for large-scale deployments. Also expose max-concurrent-reconciles, kube-api-qps, and kube-api-burst via the Helm chart under controllerTuning. Defaults match client-go defaults (QPS=20, Burst=30) so this is fully backward-compatible. When controllerTuning is omitted from Helm values, the controller falls back to its internal defaults. Also fix flag.Parse() ordering: move opts.BindFlags() before flag.Parse() so that zap logger flags (--zap-log-level etc.) are properly recognized. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: 玖宇 <guotongyu.gty@alibaba-inc.com>
Syspretor
force-pushed
the
feat/controller-tuning-flags
branch
from
May 21, 2026 09:17
acc731d to
79b4cff
Compare
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.
Summary
--kube-api-qps(default: 20) and--kube-api-burst(default: 30) flags to the controller binary, allowing operators to tune client-go rate limiting for large-scale deploymentscontrollerTuning.maxConcurrentReconciles,controllerTuning.kubeApiQPS, andcontrollerTuning.kubeApiBurstin the Helm chartvalues.yamlMotivation
When running at scale (hundreds of RBGs), the default client-go rate limits (QPS=20, Burst=30) can become a bottleneck, causing client-side throttling and slower reconciliation. This change gives operators control over these parameters without code changes.
The
--max-concurrent-reconcilesflag already existed but was not configurable via Helm — now it is.Changes
cmd/rbgs/main.go--kube-api-qpsand--kube-api-burstflags, apply torest.Configdeploy/helm/rbgs/values.yamlcontrollerTuningsectiondeploy/helm/rbgs/templates/manager.yamlBackward Compatibility
Defaults match existing client-go defaults (QPS=20, Burst=30, max-concurrent-reconciles=10). No behavioral change for existing deployments.
Test plan
make buildpassesgolangci-lintpasses on./cmd/rbgs/...helm templaterenders correct args with both default and custom values🤖 Generated with Claude Code