aboutsummaryrefslogtreecommitdiffstats
path: root/src/kube2msb/kube2msb.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/kube2msb/kube2msb.go')
-rw-r--r--src/kube2msb/kube2msb.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/kube2msb/kube2msb.go b/src/kube2msb/kube2msb.go
index 627405e..2d39b77 100644
--- a/src/kube2msb/kube2msb.go
+++ b/src/kube2msb/kube2msb.go
@@ -92,6 +92,11 @@ func newKubeClient() (*kclient.Client, error) {
overrides := &kclientcmd.ConfigOverrides{}
overrides.ClusterInfo.Server = masterUrl
+ if token, present := os.LookupEnv("AUTH_TOKEN"); present {
+ overrides.AuthInfo.Token = token
+ overrides.ClusterInfo.InsecureSkipTLSVerify = true
+ }
+
rules := kclientcmd.NewDefaultClientConfigLoadingRules()
kubeConfig, err := kclientcmd.NewNonInteractiveDeferredLoadingClientConfig(rules, overrides).ClientConfig()