Skip to content

Commit 81239df

Browse files
elemental-lfdatabus23
authored andcommitted
Fix access to remote Helm repostories
* Call ChartDownloader with a list of all available getters * Return error from downloadTo to get better feedback why something went wrong
1 parent 1c05463 commit 81239df

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

helm.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ import (
1313

1414
"github.com/ghodss/yaml"
1515
"google.golang.org/grpc"
16+
"k8s.io/helm/pkg/getter"
17+
"k8s.io/helm/pkg/helm/environment"
1618
"k8s.io/helm/pkg/downloader"
1719
"k8s.io/helm/pkg/helm/helmpath"
1820
"k8s.io/helm/pkg/strvals"
@@ -68,6 +70,7 @@ func locateChartPath(name, version string, verify bool, keyring string) (string,
6870
HelmHome: helmpath.Home(homePath()),
6971
Out: os.Stdout,
7072
Keyring: keyring,
73+
Getters: getter.All(environment.EnvSettings{}),
7174
}
7275
if verify {
7376
dl.Verify = downloader.VerifyAlways
@@ -82,7 +85,7 @@ func locateChartPath(name, version string, verify bool, keyring string) (string,
8285
return lname, nil
8386
}
8487

85-
return filename, fmt.Errorf("file %q not found", name)
88+
return filename, err
8689
}
8790

8891
// Merges source and destination map, preferring values from the source map

0 commit comments

Comments
 (0)