adds log when --kubeconfig with wrong config

pull/6/head
x1957 2017-05-31 23:16:57 +08:00
parent 278b1e56c2
commit 10eecc771d
1 changed files with 2 additions and 0 deletions

View File

@ -467,6 +467,8 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
} else {
if s.RequireKubeConfig {
return fmt.Errorf("invalid kubeconfig: %v", err)
} else if s.KubeConfig.Provided() && !standaloneMode {
glog.Warningf("Invalid kubeconfig: %v", err)
}
if standaloneMode {
glog.Warningf("No API client: %v", err)