diff --git a/cmd/kube-controller-manager/app/cloudproviders.go b/cmd/kube-controller-manager/app/cloudproviders.go index 762f5828b4d..e39fa83cf7f 100644 --- a/cmd/kube-controller-manager/app/cloudproviders.go +++ b/cmd/kube-controller-manager/app/cloudproviders.go @@ -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")