Commit a7d3c73b authored by PingWang's avatar PingWang

add a judgement for the cloud in server.go

Signed-off-by: 's avatarPingWang <wang.ping5@zte.com.cn> update server.go Signed-off-by: 's avatarPingWang <wang.ping5@zte.com.cn>
parent 4d896cd3
...@@ -348,8 +348,12 @@ func run(s *options.KubeletServer, kcfg *KubeletConfig) (err error) { ...@@ -348,8 +348,12 @@ func run(s *options.KubeletServer, kcfg *KubeletConfig) (err error) {
if err != nil { if err != nil {
return err return err
} }
glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", s.CloudProvider, s.CloudConfigFile) if cloud == nil {
kcfg.Cloud = cloud 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
}
} }
} }
......
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