Include original error in the error message.

This commit is contained in:
Slava Semushin 2018-03-27 15:50:23 +02:00
parent 90c09c75d6
commit e976c4e233
2 changed files with 4 additions and 2 deletions

View File

@ -452,7 +452,8 @@ func BuildGenericConfig(s *options.ServerRunOptions, proxyTransport *http.Transp
// groups. This leads to a nil client above and undefined behaviour further down.
//
// TODO: get rid of KUBE_API_VERSIONS or define sane behaviour if set
glog.Errorf("Failed to create clientset with KUBE_API_VERSIONS=%q. KUBE_API_VERSIONS is only for testing. Things will break.", kubeAPIVersions)
glog.Errorf("Failed to create clientset with KUBE_API_VERSIONS=%q: %v. KUBE_API_VERSIONS is only for testing. Things will break.",
kubeAPIVersions, err)
}
kubeClientConfig := genericConfig.LoopbackClientConfig

View File

@ -162,7 +162,8 @@ func (c completedConfig) New(delegationTarget genericapiserver.DelegationTarget)
// groups. This leads to a nil client above and undefined behaviour further down.
//
// TODO: get rid of KUBE_API_VERSIONS or define sane behaviour if set
glog.Errorf("Failed to create clientset with KUBE_API_VERSIONS=%q. KUBE_API_VERSIONS is only for testing. Things will break.", kubeAPIVersions)
glog.Errorf("Failed to create clientset with KUBE_API_VERSIONS=%q: %v. KUBE_API_VERSIONS is only for testing. Things will break.",
kubeAPIVersions, err)
}
s.Informers = internalinformers.NewSharedInformerFactory(crdClient, 5*time.Minute)