Unverified Commit 056c3259 authored by bryanl's avatar bryanl
Browse files

Print location of kubeconfig



When using a kubeconfig file from an environment variable, supplied by a
command line argument, or the default location, print the location of
the file.

Fixes #287
Signed-off-by: default avatarbryanl <bryanliles@gmail.com>
parent 0583ed58
......@@ -237,7 +237,7 @@ func (c *Config) ResolveContext(context string) (server, namespace string, err e
return "", "", errors.Errorf("context '%s' does not exist in the kubeconfig file", context)
}
log.Infof("Using context '%s' from the kubeconfig file specified at the environment variable $KUBECONFIG", context)
log.Infof("Using context %q from kubeconfig file %q", context, ctx.LocationOfOrigin)
cluster, exists := rawConfig.Clusters[ctx.Cluster]
if !exists {
return "", "", errors.Errorf("No cluster with name '%s' exists", ctx.Cluster)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment