-
Notifications
You must be signed in to change notification settings - Fork 913
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
[BUG] Using golang 1.20 and use govmomi as libarary will cause issue with certificate validation because Go 1.20 introduces a new tls.CertificateValidationError type #3174
[BUG] Using golang 1.20 and use govmomi as libarary will cause issue with certificate validation because Go 1.20 introduces a new tls.CertificateValidationError type #3174
Comments
But when I just edit the gomod to 1.20 and compile govc directly, I don't see error
I suspect it's because CPI is using golang 1.20 but govmomi is still pointing to 1.19. Let me try bump the govmomi dependency in govmomi from CPI's go mod |
I tried updated the govmomi with golang 1.20 in dependency of CPI
But still CPI reports error
|
Go 1.20 introduces a new
Let me try update govmomi again by adding a new type here https://github.com/vmware/govmomi/blob/main/vim25/soap/error.go#L135 |
Ok it's working now after checking the whole error chain :)
Let me create a PR |
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
Steps to reproduce the behavior:
Error shows up
More Context
How Cloud provider vsphere use tlsthumbprint to initialize a govmomi client
https://github.com/kubernetes/cloud-provider-vsphere/blob/master/pkg/common/vclib/connection.go#L160-L195
If I use
insecureFlag: true
in CPI config then there is no issue connecting to VC. Also if I change CPI image to old one that use golang 1.19, there is no issueThe code of thumbprint check might be bypassed
When I just edit the gomod to 1.20 and compile govc directly, I don't see error
I suspect it's because CPI is using golang 1.20 but govmomi is still pointing to 1.19.
Expected behavior
There is no error when using golang 1.20 and govmomi api
Affected version
Currently, the CPI calls govmomi 0.30.4. It doesn't really related to govc version, as long as the downstream repo use golang 1.20
Screenshots/Debug Output
If applicable, add screenshots or debug output to help explain your problem.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: