Skip to content

Commit

Permalink
Ignore https bad cert error for chartrepo (#50)
Browse files Browse the repository at this point in the history
* Ignore https bad cert error for chartrepo
  • Loading branch information
hangyan authored Mar 6, 2020
1 parent 1793bd9 commit 8738667
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion controllers/chartrepo_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package controllers
import (
"bytes"
"context"
"crypto/tls"
"fmt"
"github.com/alauda/captain/pkg/util"
"github.com/go-logr/logr"
Expand Down Expand Up @@ -132,7 +133,10 @@ func (r *ChartRepoReconciler) GetIndex(cr *alaudaiov1alpha1.ChartRepo, ctx conte
}

link := strings.TrimSuffix(cr.Spec.URL, "/") + "/index.yaml"
c := &http.Client{Timeout: 30 * time.Second}
transCfg := &http.Transport{
TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // ignore expired SSL certificates
}
c := &http.Client{Timeout: 30 * time.Second, Transport: transCfg}
req, err := http.NewRequest("GET", link, nil)

if username != "" && password != "" {
Expand Down

0 comments on commit 8738667

Please sign in to comment.