Skip to content

Commit

Permalink
Configure higher burst and QPS to avoid client side throttling
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Thornton <[email protected]>
  • Loading branch information
tnthornton committed Feb 27, 2023
1 parent 644fce6 commit 8e3a57a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions internal/clients/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
}

0 comments on commit 8e3a57a

Please sign in to comment.