add a judgement for the cloud in server.go

Signed-off-by: PingWang <wang.ping5@zte.com.cn>

update server.go

Signed-off-by: PingWang <wang.ping5@zte.com.cn>
This commit is contained in:
PingWang 2016-07-20 11:50:00 +08:00
parent 4d896cd3b2
commit a7d3c73bbc

View File

@ -348,8 +348,12 @@ func run(s *options.KubeletServer, kcfg *KubeletConfig) (err error) {
if err != nil {
return err
}
glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile)
kcfg.Cloud = cloud
if cloud == nil {
glog.V(2).Infof("No cloud provider specified: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile)
} else {
glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile)
kcfg.Cloud = cloud
}
}
}