Skip to content

Commit

Permalink
Merge pull request #104 from tnthornton/client-side-throttling
Browse files Browse the repository at this point in the history
Configure higher burst and QPS to avoid client side throttling
  • Loading branch information
turkenh committed Feb 28, 2023
2 parents 644fce6 + 8e3a57a commit 56b5974
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 56b5974

Please sign in to comment.