diff --git a/pkg/libhelm/binary/search_repo.go b/pkg/libhelm/binary/search_repo.go index 81ebd172e..de9c04507 100644 --- a/pkg/libhelm/binary/search_repo.go +++ b/pkg/libhelm/binary/search_repo.go @@ -52,13 +52,14 @@ func (hbpm *helmBinaryPackageManager) SearchRepo(searchRepoOpts options.SearchRe } client := searchRepoOpts.Client - if searchRepoOpts.Client == nil { + + if client == nil { // The current index.yaml is ~9MB on bitnami. // At a slow @2mbit download = 40s. @100bit = ~1s. // I'm seeing 3 - 4s over wifi. // Give ample time but timeout for now. Can be improved in the future client = &http.Client{ - Timeout: 60 * time.Second, + Timeout: 300 * time.Second, Transport: http.DefaultTransport, } } diff --git a/pkg/libhelm/binary/search_repo_test.go b/pkg/libhelm/binary/search_repo_test.go index 5b1562268..4d5dd4d82 100644 --- a/pkg/libhelm/binary/search_repo_test.go +++ b/pkg/libhelm/binary/search_repo_test.go @@ -26,6 +26,8 @@ func Test_SearchRepo(t *testing.T) { {"portainer helm repo", "https://portainer.github.io/k8s/", false}, {"gitlap helm repo with trailing slash", "https://charts.gitlab.io/", false}, {"elastic helm repo with trailing slash", "https://helm.elastic.co/", false}, + {"fabric8.io helm repo with trailing slash", "https://fabric8.io/helm/", false}, + {"lensesio helm repo without trailing slash", "https://lensesio.github.io/kafka-helm-charts", false}, } for _, test := range tests { diff --git a/pkg/libhelm/validate_repo.go b/pkg/libhelm/validate_repo.go index 6823f72eb..901dd464c 100644 --- a/pkg/libhelm/validate_repo.go +++ b/pkg/libhelm/validate_repo.go @@ -28,7 +28,7 @@ func ValidateHelmRepositoryURL(repoUrl string, client *http.Client) error { if client == nil { client = &http.Client{ - Timeout: time.Second * 10, + Timeout: time.Second * 120, Transport: http.DefaultTransport, } } diff --git a/pkg/libhelm/validate_repo_test.go b/pkg/libhelm/validate_repo_test.go index ea04a3818..7f81311ba 100644 --- a/pkg/libhelm/validate_repo_test.go +++ b/pkg/libhelm/validate_repo_test.go @@ -31,6 +31,8 @@ func Test_ValidateHelmRepositoryURL(t *testing.T) { {"portainer helm repo", "https://portainer.github.io/k8s/", false}, {"elastic helm repo", "https://helm.elastic.co/", false}, {"redirect", "https://charts.jetstack.io/", false}, + {"fabric8.io helm repo", "https://fabric8.io/helm/", false}, + {"lensesio helm repo", "https://lensesio.github.io/kafka-helm-charts", false}, } for _, test := range tests {