Bump discovery burst for kubectl

This commit is contained in:
Maciej Szulik 2021-11-16 22:26:32 +01:00
parent 2b3ff415ba
commit e944d2c365
No known key found for this signature in database
GPG Key ID: F15E55D276FA84C4
2 changed files with 1 additions and 4 deletions

View File

@ -268,9 +268,6 @@ func (f *ConfigFlags) toDiscoveryClient() (discovery.CachedDiscoveryInterface, e
return nil, err
}
// 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
// double it just so we don't end up here again for a while. This config is only used for discovery.
config.Burst = f.discoveryBurst
cacheDir := defaultCacheDir

View File

@ -294,7 +294,7 @@ func NewKubectlCommand(o KubectlOptions) *cobra.Command {
kubeConfigFlags := o.ConfigFlags
if kubeConfigFlags == nil {
kubeConfigFlags = genericclioptions.NewConfigFlags(true).WithDeprecatedPasswordFlag()
kubeConfigFlags = genericclioptions.NewConfigFlags(true).WithDeprecatedPasswordFlag().WithDiscoveryBurst(300)
}
kubeConfigFlags.AddFlags(flags)
matchVersionKubeConfigFlags := cmdutil.NewMatchVersionFlags(kubeConfigFlags)