Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions internal/indexer/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ func newDockerResolver(u *url.URL, username, password string, insecure bool) rem
},
}
}
client.once.Do(func() {
client.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
opts := docker.ResolverOptions{
Hosts: func(s string) ([]docker.RegistryHost, error) {
return []docker.RegistryHost{
Expand Down
6 changes: 6 additions & 0 deletions pkg/client/repo/chartmuseum/chartmuseum.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,12 @@ func (r *Repo) Upload(file string, _ *chart.Metadata) error {
}
client = &http.Client{Transport: tr}
}
r.once.Do(func() {
r.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
res, err := client.Do(req)
if err != nil {
return errors.Annotatef(err, "uploading %q chart", file)
Expand Down
6 changes: 6 additions & 0 deletions pkg/client/repo/harbor/harbor.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ func (r *Repo) Upload(file string, _ *chart.Metadata) error {
}
client = &http.Client{Transport: tr}
}
r.once.Do(func() {
r.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
res, err := client.Do(req)
if err != nil {
return errors.Annotatef(err, "uploading %q chart", file)
Expand Down
12 changes: 12 additions & 0 deletions pkg/client/repo/helmclassic/helmclassic.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ var reloadIndex = func(r *Repo) error {
}
client = &http.Client{Transport: tr}
}
r.once.Do(func() {
r.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
res, err := client.Do(req)
if err != nil {
return errors.Annotate(err, "fetching index.yaml")
Expand Down Expand Up @@ -185,6 +191,12 @@ func (r *Repo) Fetch(name string, version string) (string, error) {
}
client = &http.Client{Transport: tr}
}
r.once.Do(func() {
r.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
res, err := client.Do(req)
if err != nil {
return "", errors.Annotatef(err, "fetching %s:%s chart", name, version)
Expand Down
18 changes: 18 additions & 0 deletions pkg/client/repo/oci/oci.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,12 @@ func (r *Repo) getTagManifest(name, version string) (*ocispec.Manifest, error) {
}
client = &http.Client{Transport: tr}
}
r.once.Do(func() {
r.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
resp, err := client.Do(req)
if err != nil {
return nil, errors.Trace(err)
Expand Down Expand Up @@ -190,6 +196,12 @@ func (r *Repo) ListChartVersions(name string) ([]string, error) {
}
client = &http.Client{Transport: tr}
}
r.once.Do(func() {
r.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
resp, err := client.Do(req)
if err != nil {
return nil, errors.Trace(err)
Expand Down Expand Up @@ -271,6 +283,12 @@ func (r *Repo) Fetch(name string, version string) (string, error) {
}
client = &http.Client{Transport: tr}
}
r.once.Do(func() {
r.transport = &http.Transport{
DisableCompression: true,
Proxy: http.ProxyFromEnvironment,
}
})
res, err := client.Do(req)
if err != nil {
return "", errors.Annotatef(err, "fetching %s:%s chart", name, version)
Expand Down