-
Notifications
You must be signed in to change notification settings - Fork 1.2k
⚠️ Config: Disable client-side ratelimiter by default #3119
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,6 +61,9 @@ func RegisterFlags(fs *flag.FlagSet) { | |
// If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running | ||
// in cluster and use the cluster provided kubeconfig. | ||
// | ||
// The returned `*rest.Config` has client-side ratelimting disabled as we can rely on API priority and | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth mentioning what the previous default configuration would have been for users who wish to restore/maintain the previous behaviour? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMHO no - We never documented the previous default either and I don't know why it existed There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can mention it in release notes There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ack, release notes is fine by me There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. xref: #3123 |
||
// fairness. Set its QPS to a value equal or bigger than 0 to re-enable it. | ||
// | ||
// It also applies saner defaults for QPS and burst based on the Kubernetes | ||
// controller manager defaults (20 QPS, 30 burst) | ||
// | ||
|
@@ -81,6 +84,9 @@ func GetConfig() (*rest.Config, error) { | |
// If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running | ||
// in cluster and use the cluster provided kubeconfig. | ||
// | ||
// The returned `*rest.Config` has client-side ratelimting disabled as we can rely on API priority and | ||
// fairness. Set its QPS to a value equal or bigger than 0 to re-enable it. | ||
// | ||
// It also applies saner defaults for QPS and burst based on the Kubernetes | ||
// controller manager defaults (20 QPS, 30 burst) | ||
// | ||
|
@@ -99,10 +105,9 @@ func GetConfigWithContext(context string) (*rest.Config, error) { | |
return nil, err | ||
} | ||
if cfg.QPS == 0.0 { | ||
cfg.QPS = 20.0 | ||
} | ||
if cfg.Burst == 0 { | ||
cfg.Burst = 30 | ||
// Disable client-side ratelimer by default, we can rely on | ||
// API priority and fairness | ||
cfg.QPS = -1 | ||
} | ||
sbueringer marked this conversation as resolved.
Show resolved
Hide resolved
|
||
return cfg, nil | ||
} | ||
|
@@ -170,6 +175,9 @@ func loadConfigWithContext(apiServerURL string, loader clientcmd.ClientConfigLoa | |
// If --kubeconfig is set, will use the kubeconfig file at that location. Otherwise will assume running | ||
// in cluster and use the cluster provided kubeconfig. | ||
// | ||
// The returned `*rest.Config` has client-side ratelimting disabled as we can rely on API priority and | ||
// fairness. Set its QPS to a value equal or bigger than 0 to re-enable it. | ||
// | ||
// Will log an error and exit if there is an error creating the rest.Config. | ||
func GetConfigOrDie() *rest.Config { | ||
config, err := GetConfig() | ||
|
Uh oh!
There was an error while loading. Please reload this page.