-
Notifications
You must be signed in to change notification settings - Fork 48
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
Allow customization of client-go throttling #525
Allow customization of client-go throttling #525
Conversation
This allows customization of the client-side throttling in client-go and sets a higher initial default. It is necessary for bigger setups with many domachines. The approach and naming of the flags are taken 1:1 from cluster API to keep things consistent.
main.go
Outdated
@@ -95,6 +97,8 @@ func initFlags(fs *pflag.FlagSet) { | |||
fs.DurationVar(&syncPeriod, "sync-period", 10*time.Minute, "The minimum interval at which watched resources are reconciled (e.g. 10m)") | |||
fs.IntVar(&webhookPort, "webhook-port", 9443, "Webhook Server port, disabled by default. When enabled, the manager will only work as webhook server, no reconcilers are installed.") | |||
fs.DurationVar(&reconcileTimeout, "reconcile-timeout", reconciler.DefaultLoopTimeout, "The maximum duration a reconcile loop can run (e.g. 90m)") | |||
fs.Float32Var(&restConfigQPS, "kube-api-qps", 20, "Maximum queries per second from the controller client to the Kubernetes API server. Defaults to 20") | |||
fs.IntVar(&restConfigBurst, "kube-api-burst", 30, "Maximum number of queries that should be allowed in one burst from the controller client to the Kubernetes API server. Default 30") |
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.
Do we need to specify the default value, or does pflag
show it automatically already?
FWIW, I don't see defaults explicitly mentioned much elsewhere.
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.
You're right, the flags package add that anyway. Removed it.
This is already done automatically by the flags package.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: gottwald, timoreimann 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 |
What this PR does / why we need it:
This allows customization of the client-side throttling in client-go and sets a higher initial default.
It is necessary for bigger setups with many domachines.
The approach and naming of the flags are taken 1:1 from cluster API to keep things consistent.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #
Release note:
/assign @timoreimann @cpanato