Skip to content

Commit

Permalink
Configure higher burst to avoid client side throttling
Browse files Browse the repository at this point in the history
* 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 kubernetes/kubernetes#109141

Signed-off-by: Yury Tsarev <yury@upbound.io>
  • Loading branch information
ytsarev committed Feb 25, 2023
1 parent b1f3bfc commit 57aca38
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/clients/helm/restclientgetter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 57aca38

Please sign in to comment.