1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-20 13:59:40 +02:00

fix(helm): increase default helm timeouts [EE-6617]
Some checks are pending
ci / build_manifests (push) Blocked by required conditions
ci / build_images (map[arch:amd64 platform:linux]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
ci / build_images (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
ci / build_images (map[arch:arm64 platform:linux]) (push) Waiting to run
/ triage (push) Waiting to run
Lint / Run linters (push) Waiting to run
Test / test-client (push) Waiting to run
Test / test-server (map[arch:amd64 platform:linux]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:1809]) (push) Waiting to run
Test / test-server (map[arch:amd64 platform:windows version:ltsc2022]) (push) Waiting to run
Test / test-server (map[arch:arm64 platform:linux]) (push) Waiting to run

This commit is contained in:
Matt Hook 2024-01-29 13:03:11 +13:00 committed by GitHub
parent 46b2175729
commit 8a98704111
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 8 additions and 3 deletions

View file

@ -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,
}
}

View file

@ -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 {

View file

@ -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,
}
}

View file

@ -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 {