|
|
@@ -43,7 +43,7 @@ func (cp ContextParams) CreateContextData() (interface{}, string, error) {
|
|
|
// we use the current kubectl context from a $KUBECONFIG path
|
|
|
return store.KubeContext{
|
|
|
FromEnvironment: cp.FromEnvironment,
|
|
|
- }, cp.Description, nil
|
|
|
+ }, cp.getDescription(), nil
|
|
|
}
|
|
|
user := prompt.User{}
|
|
|
selectContext := func() error {
|
|
|
@@ -69,7 +69,7 @@ func (cp ContextParams) CreateContextData() (interface{}, string, error) {
|
|
|
ContextName: cp.KubeContextName,
|
|
|
KubeconfigPath: cp.KubeConfigPath,
|
|
|
FromEnvironment: cp.FromEnvironment,
|
|
|
- }, cp.Description, nil
|
|
|
+ }, cp.getDescription(), nil
|
|
|
}
|
|
|
err := selectContext()
|
|
|
if err != nil {
|
|
|
@@ -118,8 +118,8 @@ func (cp ContextParams) getDescription() string {
|
|
|
return "From environment variables"
|
|
|
}
|
|
|
configFile := "default kube config"
|
|
|
- if cp.KubeconfigPath != "" {
|
|
|
- configFile = cp.KubeconfigPath
|
|
|
+ if cp.KubeConfigPath != "" {
|
|
|
+ configFile = cp.KubeConfigPath
|
|
|
}
|
|
|
- return fmt.Sprintf("%s (in %s)", cp.ContextName, configFile)
|
|
|
+ return fmt.Sprintf("%s (in %s)", cp.KubeContextName, configFile)
|
|
|
}
|