Closed redlava closed 6 years ago
Yes, it seems that for Docker for Windows/Mac it is not enough to set the property insecureSkipTlsVerify
would you mind sending a PR with the patch?
Also, note that you would get the same result exporting the environment variable NODE_TLS_REJECT_UNAUTHORIZED=0
$ export NODE_TLS_REJECT_UNAUTHORIZED=0
has solved the issue
Thanks!
Let me apply the fix proposed by @redlava so no one finds this issue again.
Using Docker CE for Windows (Edge) with Kubernetes enabled and Kubeless v0.5.0 installed, I receive the following error when executing serverless info on the example project:
Docker has setup my .kube/config with a https url and insecure-skip-tls-verify: true.
Looking into lib/crd.js of 0.4.0 I can see request being called with connectionOptions, but helper.getConnectionOptions does not include the strictSSL option, which would prevent request from rejecting an invalid connection.
Adding
connectionOptions.strictSSL = false;
afterconnectionOptions.insecureSkipTlsVerify = true;
on line 139 of lib/helpers.js should resolve this, assuming I've understood the issue correctly.