Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/v1.56] Use JoinPath to construct vSphere url #1741

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion pkg/cloudprovider/provider/vsphere/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,13 @@ func (s *RESTSession) Logout(ctx context.Context) {
}

func createVim25Client(ctx context.Context, config *Config) (*vim25.Client, error) {
clientURL, err := url.Parse(fmt.Sprintf("%s/sdk", config.VSphereURL))
endpointURL, err := url.Parse(config.VSphereURL)
if err != nil {
return nil, err
}

clientURL := endpointURL.JoinPath("/sdk")

// creating the govmoni Client in roundabout way because we need to set the proper CA bundle: reference https://github.com/vmware/govmomi/issues/1200
soapClient := soap.NewClient(clientURL, config.AllowInsecure)
// set our CA bundle
Expand Down