mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-14 13:45:06 +00:00
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:
@@ -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 {
|
||||||
|
Reference in New Issue
Block a user