Merge pull request #29650 from ping035627/ping035627-patch-0727

Automatic merge from submit-queue

Add error log for clientset.NewForConfig

Deal with the CreateAPIServerClientConfig return, when s.APIServerList == 0, CreateAPIServerClientConfig return error, and on the origin way the err perhaps has been rewrited by clientset.NewForConfig(&eventClientConfig).
This commit is contained in:
Kubernetes Submit Queue 2016-09-12 00:08:10 -07:00 committed by GitHub
commit 66201fa7af

View File

@ -369,6 +369,9 @@ func run(s *options.KubeletServer, kubeDeps *kubelet.KubeletDeps) (err error) {
clientConfig, err := CreateAPIServerClientConfig(s)
if err == nil {
kubeClient, err = clientset.NewForConfig(clientConfig)
if err != nil {
glog.Warningf("New kubeClient from clientConfig error: %v", err)
}
// make a separate client for events
eventClientConfig := *clientConfig
eventClientConfig.QPS = float32(s.EventRecordQPS)