mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 23:19:26 +00:00
Merge pull request #3589 from filbranden/fix_nil_interface_pointer_without_reflect1
Fix comparison of EtcdClient to nil so that it does not run into the pointer vs. interface issue
This commit is contained in:
@@ -25,6 +25,7 @@ import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/client/record"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/health"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/tools"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
"github.com/coreos/go-etcd/etcd"
|
||||
"github.com/golang/glog"
|
||||
@@ -55,7 +56,7 @@ func InitHealthChecking(k *Kubelet) {
|
||||
}
|
||||
|
||||
// TODO: move this into a pkg/tools/etcd_tools
|
||||
func EtcdClientOrDie(etcdServerList util.StringList, etcdConfigFile string) *etcd.Client {
|
||||
func EtcdClientOrDie(etcdServerList util.StringList, etcdConfigFile string) tools.EtcdClient {
|
||||
if len(etcdServerList) > 0 {
|
||||
return etcd.NewClient(etcdServerList)
|
||||
} else if etcdConfigFile != "" {
|
||||
|
Reference in New Issue
Block a user