From d9581afdbee3e7080fe3661d72c624bbc89c3e3e Mon Sep 17 00:00:00 2001 From: Christoph Mewes Date: Fri, 12 Jan 2024 15:36:49 +0100 Subject: [PATCH] use external CCM for GCE (#347) --- pkg/cloudprovider/cloudprovider.go | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/pkg/cloudprovider/cloudprovider.go b/pkg/cloudprovider/cloudprovider.go index 0a545b02..ca91f1bb 100644 --- a/pkg/cloudprovider/cloudprovider.go +++ b/pkg/cloudprovider/cloudprovider.go @@ -60,15 +60,11 @@ func GetCloudConfig(pconfig providerconfigtypes.Config, kubeletVersion string) ( func KubeletCloudProviderConfig(cloudProvider providerconfigtypes.CloudProvider, external bool) (inTreeCCM bool, outOfTree bool, err error) { switch osmv1alpha1.CloudProvider(cloudProvider) { - case osmv1alpha1.CloudProviderAWS, osmv1alpha1.CloudProviderAzure, osmv1alpha1.CloudProviderVsphere: - if external { - return false, true, nil - } - - return true, false, nil - - case osmv1alpha1.CloudProviderGoogle: - return true, false, nil + case osmv1alpha1.CloudProviderAWS, + osmv1alpha1.CloudProviderAzure, + osmv1alpha1.CloudProviderGoogle, + osmv1alpha1.CloudProviderVsphere: + return !external, external, nil default: return false, external, nil