From baae429368376e3bfb05d1bc146430df801efdbc Mon Sep 17 00:00:00 2001 From: Artiom Diomin Date: Thu, 16 Jan 2025 17:46:19 +0200 Subject: [PATCH] Make sure no slash at the end of vcenterPrefix Signed-off-by: Artiom Diomin --- pkg/credentials/secret.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/credentials/secret.go b/pkg/credentials/secret.go index 8cc1f7f85..2e8409a90 100644 --- a/pkg/credentials/secret.go +++ b/pkg/credentials/secret.go @@ -211,6 +211,7 @@ func vsphereSecret(credentials map[string]string) *corev1.Secret { vscreds := map[string]string{} vcenterPrefix := strings.ReplaceAll(credentials[VSphereAddressMC], "https://", "") + vcenterPrefix, _ = strings.CutSuffix(vcenterPrefix, "/") // Save credentials in Secret and configure vSphere cloud controller // manager to read it, in replace of storing those in /etc/kubernates/cloud-config // see more: https://vmware.github.io/vsphere-storage-for-kubernetes/documentation/k8s-secret.html