fix bug when cloud is nil

This commit is contained in:
stewart-yu 2017-11-27 21:15:10 +08:00
parent 02a7c12cbd
commit eed826a25e

View File

@ -93,6 +93,10 @@ func Run(s *options.CloudControllerManagerServer) error {
glog.Fatalf("Cloud provider could not be initialized: %v", err)
}
if cloud == nil {
glog.Fatalf("cloud provider is nil")
}
if cloud.HasClusterID() == false {
if s.AllowUntaggedCloud == true {
glog.Warning("detected a cluster without a ClusterID. A ClusterID will be required in the future. Please tag your cluster to avoid any future issues")