Clean up kube-controller-manager.

These are based on recommendation from
[staticcheck](http://staticcheck.io/).
This commit is contained in:
Àbéjídé Àyodélé 2019-05-01 17:54:58 +00:00
parent 8f5a62af48
commit 9327c4bbbc

View File

@ -48,8 +48,8 @@ func createCloudProvider(cloudProvider string, externalCloudVolumePlugin string,
return nil, loopMode, fmt.Errorf("cloud provider could not be initialized: %v", err)
}
if cloud != nil && cloud.HasClusterID() == false {
if allowUntaggedCloud == true {
if cloud != nil && !cloud.HasClusterID() {
if allowUntaggedCloud {
klog.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, loopMode, 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")