Allow clients to skip TLS verification

Adds -skip_tls_verify to any API server client. Also store in auth
This commit is contained in:
Clayton Coleman
2014-10-02 10:25:09 -04:00
parent d3816069e6
commit 7af3c7d75e
3 changed files with 7 additions and 0 deletions

View File

@@ -20,10 +20,12 @@ package client
// and cobra pflags (Posix style).
type FlagSet interface {
StringVar(p *string, name, value, usage string)
BoolVar(p *bool, name string, value bool, usage string)
}
// BindClientConfigFlags registers a standard set of CLI flags for connecting to a Kubernetes API server.
func BindClientConfigFlags(flags FlagSet, config *Config) {
flags.StringVar(&config.Host, "master", config.Host, "The address of the Kubernetes API server")
flags.StringVar(&config.Version, "api_version", config.Version, "The API version to use when talking to the server")
flags.BoolVar(&config.Insecure, "insecure_skip_tls_verify", config.Insecure, "If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure.")
}