Skip to content

Commit

Permalink
feat: increase Kubernetes rate limits.
Browse files Browse the repository at this point in the history
  • Loading branch information
atombender committed Oct 3, 2022
1 parent 3b291e7 commit 02f1b62
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,24 @@ func main() {
inclusionMatcher := buildMatcher(includePatterns, labelSelector, true)
exclusionMatcher := buildMatcher(excludePatterns, nil, false)

clientConfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
clientConfig := clientcmd.NewInteractiveDeferredLoadingClientConfig(
&clientcmd.ClientConfigLoadingRules{
ExplicitPath: kubeconfigPath,
},
&clientcmd.ConfigOverrides{
CurrentContext: contextName,
})
},
nil)

config, err := clientConfig.ClientConfig()
if err != nil {
fail(err.Error())
}

// Set higher rate limits
config.QPS = 100
config.Burst = 100

clientset, err := kubernetes.NewForConfig(config)
if err != nil {
fail(err.Error())
Expand Down

0 comments on commit 02f1b62

Please sign in to comment.