Skip to content

Commit

Permalink
Exit if there is no ClusterID and allow-untagged-cluster isn't set.
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Rati committed Sep 13, 2017
1 parent 709cc84 commit 9b30e95
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/cmd/server/kubernetes/master/master_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,13 @@ func BuildControllerManagerServer(masterConfig configapi.MasterConfig) (*cmapp.C
return nil, nil, err
}
if cloud != nil {
if cloud.HasClusterID() == false {
if cmserver.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")
} else {
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")
}
}
glog.V(2).Infof("Successfully initialized cloud provider: %q from the config file: %q\n", cmserver.CloudProvider, cmserver.CloudConfigFile)
}

Expand Down

0 comments on commit 9b30e95

Please sign in to comment.