From 9327c4bbbcd3e0958f376c366e8d9aa30102fa98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=80b=C3=A9j=C3=ADd=C3=A9=20=C3=80yod=C3=A9l=C3=A9?= Date: Wed, 1 May 2019 17:54:58 +0000 Subject: [PATCH] Clean up kube-controller-manager. These are based on recommendation from [staticcheck](http://staticcheck.io/). --- cmd/kube-controller-manager/app/cloudproviders.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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")