From aa720582ece593d193cd1e6e1a2d6fd009702774 Mon Sep 17 00:00:00 2001 From: Deepak Sharma Date: Sat, 17 Oct 2020 10:14:15 +0530 Subject: [PATCH 1/2] copy vspherecluster labels to csi config --- pkg/services/cloudprovider/csi.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/services/cloudprovider/csi.go b/pkg/services/cloudprovider/csi.go index 1e31dc4528..67ea940843 100644 --- a/pkg/services/cloudprovider/csi.go +++ b/pkg/services/cloudprovider/csi.go @@ -657,6 +657,9 @@ func ConfigForCSI(vsphereCluster v1alpha3.VSphereCluster, cluster clusterv1.Clus } } + config.Labels.Region = vsphereCluster.Spec.CloudProviderConfiguration.Labels.Region + config.Labels.Zone = vsphereCluster.Spec.CloudProviderConfiguration.Labels.Zone + return config } From 73987ac619d1a29aeab8f9da3e8aaa1809dfedc3 Mon Sep 17 00:00:00 2001 From: Deepak Sharma Date: Sat, 17 Oct 2020 10:32:58 +0530 Subject: [PATCH 2/2] direct assign labels --- pkg/services/cloudprovider/csi.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/services/cloudprovider/csi.go b/pkg/services/cloudprovider/csi.go index 67ea940843..878d521f9a 100644 --- a/pkg/services/cloudprovider/csi.go +++ b/pkg/services/cloudprovider/csi.go @@ -657,8 +657,7 @@ func ConfigForCSI(vsphereCluster v1alpha3.VSphereCluster, cluster clusterv1.Clus } } - config.Labels.Region = vsphereCluster.Spec.CloudProviderConfiguration.Labels.Region - config.Labels.Zone = vsphereCluster.Spec.CloudProviderConfiguration.Labels.Zone + config.Labels = vsphereCluster.Spec.CloudProviderConfiguration.Labels return config }