helm: Helm 3.0.0-rc.1 doesn't support downloading charts from a URL containing local

With:

$ helm version
version.BuildInfo{Version:"v3.0.0-rc.1", GitCommit:"ee77ae3d40fd599445ebd99b8fc04e2c86ca366c", GitTreeState:"clean", GoVersion:"go1.13.3"}

If I attempt to install a chart from a URL containing local, the install fails with Error: scheme "local" not supported

Full debug output

$ helm repo add msw https://artifactory.metaswitch.com/helm-local/
"msw" has been added to your repositories
$ helm install bar msw/foo --version "0.1.0-master" --devel --atomic --debug
install.go:148: [debug] Original chart version: "0.1.0-master"
Error: scheme "local" not supported
helm.go:76: [debug] scheme "local" not supported
helm.sh/helm/v3/pkg/getter.Providers.ByScheme
        /home/circleci/helm.sh/helm/pkg/getter/getter.go:117
helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).DownloadTo
        /home/circleci/helm.sh/helm/pkg/downloader/chart_downloader.go:92
helm.sh/helm/v3/pkg/action.(*ChartPathOptions).LocateChart
        /home/circleci/helm.sh/helm/pkg/action/install.go:665
main.runInstall
        /home/circleci/helm.sh/helm/cmd/helm/install.go:160
main.newInstallCmd.func1
        /home/circleci/helm.sh/helm/cmd/helm/install.go:115
github.com/spf13/cobra.(*Command).execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826
github.com/spf13/cobra.(*Command).ExecuteC
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
        /go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main
        /home/circleci/helm.sh/helm/cmd/helm/helm.go:75
runtime.main
        /usr/local/go/src/runtime/proc.go:203
runtime.goexit
        /usr/local/go/src/runtime/asm_amd64.s:1357```

However, if I use a URL which doesn’t include local in the name, install makes progress:

$ helm repo remove msw
"msw" has been removed from your repositories
$ helm repo add msw https://artifactory.metaswitch.com/helm-virtual/
"msw" has been added to your repositories
$ helm install bar msw/foo --version "0.1.0-master" --devel --atomic --debug
install.go:148: [debug] Original chart version: "0.1.0-master"
install.go:165: [debug] CHART PATH: /home/rjw2/.cache/helm/repository/foo-0.1.0-master.tgz

client.go:87: [debug] creating 65 resource(s)
wait.go:51: [debug] beginning wait for 65 resources with timeout of 5m0s
...

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 16 (8 by maintainers)

Most upvoted comments

There are two types of repositories: local and virtual repositories Not sure but I think we should configure 2 repositories, local to push and virtual to get charts

Configure 2 helm repositories

helm repo add my-local-repo  https://artifactory.mycompany.com/artifactory/helm-charts
helm repo add my-virtual-repo https://artifactory.mycompany.com/artifactory/virtual-helm-charts
helm repo list
NAME           	URL
stable         	https://kubernetes-charts.storage.googleapis.com/
my-local-repo  	https://artifactory.mycompany.com/artifactory/helm-charts
my-virtual-repo	https://artifactory.mycompany.com/artifactory/virtual-helm-charts

Push to the local repo

helm push-artifactory hello-chart-0.1.0.tgz my-local-repo --username XXX --password XXX
Pushing hello-chart-0.1.0.tgz to https://artifactory.mycompany.com/artifactory/helm-charts/hello-chart/hello-chart-0.1.0.tgz...
Done.
Reindex helm repository helm-charts...
Reindex of helm repo helm-charts was scheduled to run.

pull/install the chart using virtual repo

helm pull my-virtual-repo/hello-chart

cc @richardwhiuk

Hi @richardwhiuk

Looks like you are using artifactory for your Helm repo, if you are using artifactory then this has nothing to do with helm.

As @ehernandez-xk commented before, this is related with how artifactory manages the helm repositories (local and virtual). If you want to pull charts from artifactory you need to add the virtual repo, the local one won’t work, you can read more about this here: https://www.jfrog.com/confluence/display/RTF/Helm+Chart+Repositories

And well, if you want to push you need to push the charts to the local repo, the virtual won’'t work for push. I have a plugin to do this using helm https://github.com/belitre/helm-push-artifactory-plugin

😃

Thanks everyone for your input and support getting to the bottom of this! Looks like this can now be closed given the amount of in-depth answers provided here. There doesn’t appear to be anything on our end; looks like it’s a point of confusion on how artifactory local and virtual repositories work with Helm, and these are documented over on their site. Thanks @belitre and @ehernandez-xk for chiming in!

The issue only happens when I add the local-repo and does not happen with virtual-repo We should use the virtual repo created in the Artifactory

no issue:

helm repo add msw  https://artifactory.mycompany.com/artifactory/virtual-helm-charts

there is issue:

helm repo add msw   https://artifactory.mycompany.com/artifactory/helm-charts

edit: But there is an issue when you push and reindex helm push-artifactory

Reindex helm repository virtual-helm-charts...
Error: 404: Unsupported Helm reindex request for 'virtual-helm-charts': reindex is only allowed for Helm local repository.
404: Unsupported Helm reindex request for 'virtual-helm-charts': reindex is only allowed for Helm local repository.
Error: plugin "push-artifactory" exited with error

@belitre points us to the correct direction https://github.com/belitre/helm-push-artifactory-plugin/tree/v1.0.0#local-and-virtual-repositories

I added a repo with the world local in the URL at the start of the process:

$ helm repo add msw https://artifactory.metaswitch.com/helm-local/
"msw" has been added to your repositories