From 57aca38f4fe48ff9ef7b9cdc8957a794a94b18fd Mon Sep 17 00:00:00 2001 From: Yury Tsarev Date: Sat, 25 Feb 2023 05:33:06 +0100 Subject: [PATCH] Configure higher burst to avoid client side throttling * Fixes #159 * No more client-side throttling timeouts like ``` I1128 12:44:10.336621 1 request.go:665] Waited for 11.188964474s due to client-side throttling, not priority and fairness, request: GET:https://10.255.0.1:443/apis/cloudidentity.cnrm.cloud.google.com/v1beta1?timeout=32s I1128 12:44:20.345096 1 request.go:665] Waited for 5.989111872s due to client-side throttling, not priority and fairness, request: GET:https://10.255.0.1:443/apis/binaryauthorization.cnrm.cloud.google.com/v1beta1?timeout=32s I1128 12:44:31.086707 1 request.go:665] Waited for 1.174828735s due to client-side throttling, not priority and fairness, request: GET:https://10.255.0.1:443/apis/servicedirectory.cnrm.cloud.google.com/v1beta1?timeout=32s ``` * 300 value is aligned with associated kubectl fix at https://github.com/kubernetes/kubernetes/pull/109141 Signed-off-by: Yury Tsarev --- pkg/clients/helm/restclientgetter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/clients/helm/restclientgetter.go b/pkg/clients/helm/restclientgetter.go index 346efa4..0f85e59 100644 --- a/pkg/clients/helm/restclientgetter.go +++ b/pkg/clients/helm/restclientgetter.go @@ -50,7 +50,8 @@ func (c *restClientGetter) ToDiscoveryClient() (discovery.CachedDiscoveryInterfa // The more groups you have, the more discovery requests you need to make. // given 25 groups (our groups + a few custom conf) 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 = 100 + // Align value with https://github.com/kubernetes/kubernetes/pull/109141 + config.Burst = 300 discoveryClient, _ := discovery.NewDiscoveryClientForConfig(config) return memory.NewMemCacheClient(discoveryClient), nil