mirror of https://github.com/portainer/portainer
fix(helm): increase default helm timeouts [EE-6617]
parent
46b2175729
commit
8a98704111
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue