Skip to content

Commit 9b30e95

Browse files
author
Robert Rati
committed
Exit if there is no ClusterID and allow-untagged-cluster isn't set.
1 parent 709cc84 commit 9b30e95

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pkg/cmd/server/kubernetes/master/master_config.go

+7
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,13 @@ func BuildControllerManagerServer(masterConfig configapi.MasterConfig) (*cmapp.C
384384
return nil, nil, err
385385
}
386386
if cloud != nil {
387+
if cloud.HasClusterID() == false {
388+
if cmserver.AllowUntaggedCloud == true {
389+
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")
390+
} else {
391+
return nil, nil, fmt.Errorf("no ClusterID Found. A ClusterID is required for the cloud provider to function properly. This check can be bypassed by setting the allow-untagged-cloud option")
392+
}
393+
}
387394
glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", cmserver.CloudProvider, cmserver.CloudConfigFile)
388395
}
389396

0 commit comments

Comments
 (0)