Commit 0105a48b authored by Filipe Brandenburger's avatar Filipe Brandenburger

Merge pull request #3356 from dchen1107/image

Fix a crash for kubelet when without EtcdClient.
parents 68298f08 6e6f465a
......@@ -20,6 +20,7 @@ import (
"fmt"
"net"
"net/http"
"reflect"
"time"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
......@@ -225,8 +226,7 @@ func makePodSourceConfig(kc *KubeletConfig) *config.PodConfig {
glog.Infof("Adding manifest url: %v", kc.ManifestURL)
config.NewSourceURL(kc.ManifestURL, kc.HttpCheckFrequency, cfg.Channel(kubelet.HTTPSource))
}
if kc.EtcdClient != nil {
if !reflect.ValueOf(kc.EtcdClient).IsNil() {
glog.Infof("Watching for etcd configs at %v", kc.EtcdClient.GetCluster())
config.NewSourceEtcd(config.EtcdKeyForHost(kc.Hostname), kc.EtcdClient, cfg.Channel(kubelet.EtcdSource))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment