Bump QPS on namespace controller

https://github.com/kubernetes/kubernetes/pull/62913 switched from using a client pool, where each groupVersionResource got its own rest client, to a single client.

This increases the QPS to account for increased requests using a single rest client rate limiter.
This commit is contained in:
Jordan Liggitt
2018-04-27 10:05:57 -04:00
parent 7711d88661
commit 1bddcdcf44
2 changed files with 7 additions and 3 deletions

View File

@@ -297,8 +297,8 @@ func startNamespaceController(ctx ControllerContext) (bool, error) {
// the ratelimiter negatively affects its speed. Deleting 100 total items in a namespace (that's only a few of each resource
// including events), takes ~10 seconds by default.
nsKubeconfig := ctx.ClientBuilder.ConfigOrDie("namespace-controller")
nsKubeconfig.QPS *= 10
nsKubeconfig.Burst *= 10
nsKubeconfig.QPS *= 20
nsKubeconfig.Burst *= 100
namespaceKubeClient := clientset.NewForConfigOrDie(nsKubeconfig)
discoverResourcesFn := namespaceKubeClient.Discovery().ServerPreferredNamespacedResources