Merge pull request #62461 from deads2k/cli-23-disco

Automatic merge from submit-queue (batch tested with PRs 62273, 62461). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

allow higher burst for discovery

Discovery makes a lot of consecutive (maybe someday parallel) calls.  One for every group and another for every version.  Add a few CRDs and it's pretty easy to get to 50 calls. 

This targets the burst on kubectl's discovery client only.
This commit is contained in:
Kubernetes Submit Queue
2018-04-12 06:38:16 -07:00
committed by GitHub

View File

@@ -109,6 +109,11 @@ func (f *discoveryFactory) DiscoveryClient() (discovery.CachedDiscoveryInterface
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.
cfg.Burst = 100
if f.cacheDir != "" {
wt := cfg.WrapTransport
cfg.WrapTransport = func(rt http.RoundTripper) http.RoundTripper {