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

fix dialing https server #4324

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

zhangzujian
Copy link
Member

Pull Request

What type of this PR

Examples of user facing changes:

  • Features
  • Bug fixes
  • Docs
  • Tests

Which issue(s) this PR fixes

Use tls.Dial to dial tls/https server. Fixes the following error when secure serving is enabled:

2024/07/19 13:10:53 http: TLS handshake error from 172.19.0.2:37244: EOF

@zhangzujian zhangzujian added bug Something isn't working need backport labels Jul 19, 2024
pkg/util/k8s.go Outdated
case "tcp", "http":
conn, err = net.DialTimeout("tcp", address, timeout)
case "tls", "https":
conn, err = tls.DialWithDialer(&net.Dialer{Timeout: timeout}, "tcp", address, &tls.Config{InsecureSkipVerify: true})

Check failure

Code scanning / CodeQL

Disabled TLS certificate check High

InsecureSkipVerify should not be used in production code.
Signed-off-by: zhangzujian <[email protected]>
pkg/util/k8s.go Dismissed Show dismissed Hide dismissed
@zhangzujian zhangzujian merged commit be7fd17 into kubeovn:master Jul 20, 2024
61 of 62 checks passed
@zhangzujian zhangzujian deleted the fix-ovn-controller-check branch July 20, 2024 02:46
zhangzujian added a commit that referenced this pull request Jul 20, 2024
zhangzujian added a commit to zhangzujian/kube-ovn that referenced this pull request Jul 20, 2024
bobz965 pushed a commit that referenced this pull request Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need backport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants