Last active
July 3, 2020 15:44
-
-
Save velotiotech/8d268c714e2e0a7893289b63821e3ef9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ( | |
// Set during build | |
version string | |
proxyURL = flag.String("proxy", "", | |
`If specified, it is assumed that a kubctl proxy server is running on the | |
given url and creates a proxy client. In case it is not given InCluster | |
kubernetes setup will be used`) | |
) | |
if *proxyURL != "" { | |
config, err = clientcmd.NewNonInteractiveDeferredLoadingClientConfig( | |
&clientcmd.ClientConfigLoadingRules{}, | |
&clientcmd.ConfigOverrides{ | |
ClusterInfo: clientcmdapi.Cluster{ | |
Server: *proxyURL, | |
}, | |
}).ClientConfig() | |
if err != nil { | |
glog.Fatalf("error creating client configuration: %v", err) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment