mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 19:23:40 +00:00
Bump discovery burst of default ConfigFlags to 300
Signed-off-by: Alper Rifat Ulucinar <ulucinar@users.noreply.github.com>
This commit is contained in:
parent
534427f5d3
commit
45f653e3db
@ -437,9 +437,9 @@ func NewConfigFlags(usePersistentConfig bool) *ConfigFlags {
|
|||||||
|
|
||||||
usePersistentConfig: usePersistentConfig,
|
usePersistentConfig: usePersistentConfig,
|
||||||
// The more groups you have, the more discovery requests you need to make.
|
// The more groups you have, the more discovery requests you need to make.
|
||||||
// given 25 groups (our groups + a few custom resources) with one-ish version each, discovery needs to make 50 requests
|
// with a burst of 300, we will not be rate-limiting for most clusters but
|
||||||
// double it just so we don't end up here again for a while. This config is only used for discovery.
|
// the safeguard will still be here. This config is only used for discovery.
|
||||||
discoveryBurst: 100,
|
discoveryBurst: 300,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -459,9 +459,8 @@ func setDiscoveryDefaults(config *restclient.Config) error {
|
|||||||
if config.Timeout == 0 {
|
if config.Timeout == 0 {
|
||||||
config.Timeout = defaultTimeout
|
config.Timeout = defaultTimeout
|
||||||
}
|
}
|
||||||
// if a burst limit is not already configured and
|
// if a burst limit is not already configured
|
||||||
// an avg. rate of `defaultBurst` qps is not already configured
|
if config.Burst == 0 {
|
||||||
if config.Burst == 0 && config.QPS < defaultBurst {
|
|
||||||
// discovery is expected to be bursty, increase the default burst
|
// discovery is expected to be bursty, increase the default burst
|
||||||
// to accommodate looking up resource info for many API groups.
|
// to accommodate looking up resource info for many API groups.
|
||||||
// matches burst set by ConfigFlags#ToDiscoveryClient().
|
// matches burst set by ConfigFlags#ToDiscoveryClient().
|
||||||
|
Loading…
Reference in New Issue
Block a user