From 8e3a57a32bca2bbf93b40f15474c6d61bb719d63 Mon Sep 17 00:00:00 2001 From: Taylor Thornton Date: Mon, 27 Feb 2023 10:23:31 -0800 Subject: [PATCH] Configure higher burst and QPS to avoid client side throttling Signed-off-by: Taylor Thornton --- internal/clients/client.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/internal/clients/client.go b/internal/clients/client.go index 481d96b1..8360b580 100644 --- a/internal/clients/client.go +++ b/internal/clients/client.go @@ -57,7 +57,7 @@ func restConfigFromAPIConfig(c *api.Config) (*rest.Config, error) { // set of identity credentials (e.g. Google Application Creds). user = &api.AuthInfo{} } - return &rest.Config{ + config := &rest.Config{ Host: cluster.Server, Username: user.Username, Password: user.Password, @@ -77,5 +77,12 @@ func restConfigFromAPIConfig(c *api.Config) (*rest.Config, error) { KeyData: user.ClientKeyData, CAData: cluster.CertificateAuthorityData, }, - }, nil + } + + // NOTE(tnthornton): these values match the burst and QPS values in kubectl. + // xref: https://github.com/kubernetes/kubernetes/pull/105520 + config.Burst = 300 + config.QPS = 50 + + return config, nil }