Merge pull request #1694 from flant/fix-openshift-root-ca

Fix OpenShift connector rootCA option
This commit is contained in:
Márk Sági-Kazár 2020-05-12 13:55:45 +02:00 committed by GitHub
commit 709d4169d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -227,7 +227,7 @@ func newHTTPClient(insecureCA bool, rootCA string) (*http.Client, error) {
if insecureCA {
tlsConfig = tls.Config{InsecureSkipVerify: true}
} else if rootCA != "" {
tlsConfig := tls.Config{RootCAs: x509.NewCertPool()}
tlsConfig = tls.Config{RootCAs: x509.NewCertPool()}
rootCABytes, err := ioutil.ReadFile(rootCA)
if err != nil {
return nil, fmt.Errorf("failed to read root-ca: %v", err)