From d9486ea1aead6847e403b54ae97324e355eff0e2 Mon Sep 17 00:00:00 2001 From: Deepak Kinni Date: Tue, 29 Jun 2021 17:44:36 -0700 Subject: [PATCH] Always use insecure connections for vc client (#82) Signed-off-by: Deepak Kinni --- pkg/common/vsphere/virtual_center.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/common/vsphere/virtual_center.go b/pkg/common/vsphere/virtual_center.go index df4426c..647838e 100644 --- a/pkg/common/vsphere/virtual_center.go +++ b/pkg/common/vsphere/virtual_center.go @@ -119,6 +119,11 @@ func (this *VirtualCenter) newClient(ctx context.Context) (*govmomi.Client, erro log.Errorf("failed to parse URL %s with err: %v", url, err) return nil, err } + if this.Config.Insecure == false { + log.Warnf("The vCenter Configuration states secure connection, overriding to use insecure connection..") + this.Config.Insecure = true + // TODO: support vCenter connection using certs. + } soapClient := soap.NewClient(url, this.Config.Insecure) soapClient.Timeout = time.Duration(this.Config.VCClientTimeout) * time.Minute log.Debugf("Setting vCenter soap client timeout to %v", soapClient.Timeout)