See resolution details here: https://github.com/kubernetes-sigs/vsphere-csi-driver/pull/1731
Workaround:
CAUTION: The below steps should be performed with a VMware Support Engineer.
SCOPE to determine values of "insecure-flag" and "ca-file" in Supervisor Cluster CSI Secret:
[Global]
insecure-flag = "false"
ca-file = "" ----------> This should not be empty if insecure-flag is false
cluster-id = "domain-c8"
cnsregistervolumes-cleanup-intervalinmin = 720
cluster-distribution = "SupervisorCluster"
[VirtualCenter "vcenter.domain.com"]
user = "workload_storage_management-2927599b-1e8a-453c-a5d2-3871cbda9671@vsphere.local"
password = "@#$srfed$%s-gh"
datacenters = "datacenter-1"
port = "443"
targetvSANFileShareClusters = ""
In the above example, the insecure-flag is set to false, indicating that CSI must exchange certs with vCenter. The ca-file is empty, leading to a failure to verify the Root CA of the vCenter cert. The ca-file must reference a valid file in order for this to work.
Copy the output of the above command for reference in the below steps.
If the ca-file is blank when the insecure-flag is set to "false", the secret will need to be updated with the following procedure to add the ca-file path:
# echo '[Global]
insecure-flag = "false"
ca-file = "/etc/vmware/wcp/tls/vmca.pem"
cluster-id = "domain-c8"
cnsregistervolumes-cleanup-intervalinmin = 720
cluster-distribution = "SupervisorCluster"
[VirtualCenter "VCENTER_FQDN"]
user = "workload_storage_management-2927599b-1e8a-453c-a5d2-3871cbda9671@vsphere.local"
password = "@#$srfed$%s-gh"
datacenters = "datacenter-1"
port = "443"
targetvSANFileShareClusters = ""' | base64 | tr -d '\n'
# echo '[Global]
insecure-flag = "false"
ca-file = "/etc/vmware/wcp/tls/vmca.pem"
cluster-id = "domain-c8"
supervisor-id = "supervisor-<id>"
cnsregistervolumes-cleanup-intervalinmin = 720
cluster-distribution = "SupervisorCluster"
[VirtualCenter "<VCENTER_FQDN>"]
user = "workload storage management-<id>@<domain>"
password = "<password>"
datacenters = "datacenter-<id>"
port = "443"
targetvSANFileShareClusters = ""' | base64 | tr -d '\n'