-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support to set qps and burst via env variable #2755
Conversation
Currently some configuration such as `kube-api-burst` and `kube-api-qps` must be set via command line option. Knative deployments usually do not have the command line option, the command line option is unusual and so knative/operator also does not support the API. Hence This patch allows to set client config via env variable.
LGTM thanks @nak3! |
environment/client_config.go
Outdated
fs.Float64Var(&c.QPS, "kube-api-qps", float64(envVarOrDefault("KUBE_API_QPS", 0)), "Maximum QPS to the server from the client.") | ||
} | ||
|
||
func envVarOrDefault(key string, val int) int { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we dont have such a func elsewhere in the code base?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I think there is no util function like this.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #2755 +/- ##
==========================================
- Coverage 82.06% 81.75% -0.32%
==========================================
Files 166 167 +1
Lines 10150 10201 +51
==========================================
+ Hits 8330 8340 +10
- Misses 1576 1614 +38
- Partials 244 247 +3
☔ View full report in Codecov by Sentry. |
/hold I think I found one bug... |
/hold cancel Fixed. |
/hold We actually want to drop these settings from our controllers since K8s supports API priority and fairness now - https://kubernetes.io/docs/concepts/cluster-administration/flow-control/ So we should disable all client side rate limiting Some context: |
|
TestMetricsExport flake /retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dprotaso, nak3 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/hold cancel |
Currently some configuration such as
kube-api-burst
andkube-api-qps
must be set via command line option.Knative deployments usually do not have the command line option, the command line option is unusual and so knative/operator also does not support the API.
Hence This patch allows to set client config via env variable.
Release Note