fix: reject --kube-api-qps without --kube-api-burst at startup #466
All Vouch review confidence checks passed
Residual risk 0.29 = Change Risk (0.62) × (1 − Review Confidence (0.54)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.62 · 259 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.333
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.062
Real PR Conversation Timeline
1 comments
"Review active on #466"
general
weight: 0.35
Karthik-K-N
Description
cmd/main.gocopied--kube-api-qpsand--kube-api-burstinto the rest config as given. Both default to-1, which disables client-side throttling, but a positive QPS with the burst left at-1is a pair client-go refuses:kubernetes.NewForConfigfails with "burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0", and a controller-runtime client built from the same config fails every request with "rate: Wait(n=1) exceeds limiter's burst -1". The controller exited with the clientset message, which names neither flag, and the Helm chart renders that pair whenever onlycontroller.kubeAPIQPSis set.This validates the pair right after
flag.Parseand exits with a message that names both flags:The defaults and any pair with a positive burst are unchanged. A burst on its own is still accepted and ignored, as before.
Related Issue
Fixes #465
Type of Change
/kind bug
Testing
TestValidateKubeAPIFlagsincmd/main_test.gocovers the disabled defaults, both flags set, QPS with the default burst, QPS with a zero burst, burst on its own, and a zero QPS.--kube-api-qps=50alone exits 1 with the message above;--kube-api-qps=50 --kube-api-burst=100and the plain defaults start the manager as before.make testandmake lintpass locally.This PR was written in part with the assistance of generative AI; the failure was reproduced against the real binary and the change was reviewed and tested by hand.
Checklist
make testpassesmake lintpassesDoes this PR introduce a user-facing change?
``
release-note
``The controller now exits at startup with a clear message when --kube-api-qps is set without a positive --kube-api-burst, instead of failing later with a client-go error that names neither flag.