Unverified Commit 3aef3fd8 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

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.
parents 0b5fa0b9 b3dad83c
...@@ -109,6 +109,11 @@ func (f *discoveryFactory) DiscoveryClient() (discovery.CachedDiscoveryInterface ...@@ -109,6 +109,11 @@ func (f *discoveryFactory) DiscoveryClient() (discovery.CachedDiscoveryInterface
return nil, err 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 != "" { if f.cacheDir != "" {
wt := cfg.WrapTransport wt := cfg.WrapTransport
cfg.WrapTransport = func(rt http.RoundTripper) http.RoundTripper { cfg.WrapTransport = func(rt http.RoundTripper) http.RoundTripper {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment