mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 07:49:41 +02:00
feat(libhelm): allow passing optional env and http client [EE-5252] (#8758)
This commit is contained in:
parent
a7474188b9
commit
7a8a20e0cc
29 changed files with 161 additions and 52 deletions
|
@ -50,12 +50,15 @@ func (hbpm *helmBinaryPackageManager) SearchRepo(searchRepoOpts options.SearchRe
|
|||
return nil, errRequiredSearchOptions
|
||||
}
|
||||
|
||||
// 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,
|
||||
client := searchRepoOpts.Client
|
||||
if searchRepoOpts.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,
|
||||
}
|
||||
}
|
||||
|
||||
url, err := url.ParseRequestURI(searchRepoOpts.Repo)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue