Skip to content

Commit

Permalink
UPSTREAM: 49215: Exit if there is no ClusterID and allow-untagged-clu…
Browse files Browse the repository at this point in the history
…ster isn't set.
  • Loading branch information
Robert Rati committed Sep 13, 2017
1 parent 9a7a7b0 commit adc5769
Show file tree
Hide file tree
Showing 2 changed files with 12 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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit adc5769

Please sign in to comment.