Merge pull request #871 from technosophos/feat/helm-install-from-repo

feat(helm): install directly from repo
pull/877/head
Matt Butcher 8 years ago committed by GitHub
commit 5b6fad043a

@ -55,6 +55,11 @@ func fetch(cmd *cobra.Command, args []string) error {
if filepath.Ext(pname) != ".tgz" {
pname += ".tgz"
}
return fetchChart(pname)
}
func fetchChart(pname string) error {
f, err := repo.LoadRepositoriesFile(repositoriesFile())
if err != nil {

@ -133,5 +133,19 @@ func locateChartPath(name string) (string, error) {
if _, err := os.Stat(crepo); err == nil {
return filepath.Abs(crepo)
}
// Try fetching the chart from a remote repo into a tmpdir
if filepath.Ext(name) != ".tgz" {
name += ".tgz"
}
if err := fetchChart(name); err == nil {
lname, err := filepath.Abs(filepath.Base(name))
if err != nil {
return lname, err
}
fmt.Printf("Fetched %s to %s\n", name, lname)
return lname, nil
}
return name, fmt.Errorf("file %q not found", name)
}

Loading…
Cancel
Save