Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add better kubernetes client connection settings #50

Merged
merged 2 commits into from
Oct 6, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.x.x / 2018-xx-xx

* [ENHANCEMENT] (Kubernetes) Set better settings on client connection.
* [ENHANCEMENT] (Brigade) Update to Brigade v0.17.

## 0.6.0 / 2018-08-12
Expand Down
12 changes: 11 additions & 1 deletion cmd/brigadeterm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import (

const (
brigadeVersionFMT = "brigadeterm %s"
kubeCliQPS = 50
kubeCliBurst = 50
)

var (
Expand Down Expand Up @@ -90,8 +92,16 @@ func (m *Main) loadKubernetesConfig() (*rest.Config, error) {
overrides := &clientcmd.ConfigOverrides{
CurrentContext: m.flags.kubeContext,
}
cfg, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loader, overrides).ClientConfig()
if err != nil {
return nil, err
}

// Set better client rate limits.
cfg.QPS = kubeCliQPS
cfg.Burst = kubeCliBurst

return clientcmd.NewNonInteractiveDeferredLoadingClientConfig(loader, overrides).ClientConfig()
return cfg, nil
}

// printVersion prints the version of the app.
Expand Down