【发布时间】:2021-10-14 06:43:23
【问题描述】:
我的 JFrog 帐户中有 3 个 helm 存储库:
- helm-local - 用于存储私有 helm 图表
- helm-remote - 用于代理公共图表
- helm - 虚拟机,将两者结合在一起
我像这样配置我的 helm 客户端:helm repo add %reponame% https://%name%.jfrog.io/artifactory/helm --username %username% --password %password%,因为它在 https://www.jfrog.com/confluence/display/RTF6X/Helm+Chart+Repositories 中描述。
然后我做helm repo update。
但是当我尝试执行helm pull %reponame%/%chartname% 时,它返回 404
Error: failed to fetch https://%name%.jfrog.io/helm-local/%chartname%-%chartversion%.tgz : 404 Not Found
helm.go:88: [debug] failed to fetch https://%name%.jfrog.io/helm-local/%chartname%-%chartversion%.tgz : 404 Not Found
helm.sh/helm/v3/pkg/getter.(*HTTPGetter).get
helm.sh/helm/v3/pkg/getter/httpgetter.go:90
helm.sh/helm/v3/pkg/getter.(*HTTPGetter).Get
helm.sh/helm/v3/pkg/getter/httpgetter.go:42
helm.sh/helm/v3/pkg/downloader.(*ChartDownloader).DownloadTo
helm.sh/helm/v3/pkg/downloader/chart_downloader.go:99
helm.sh/helm/v3/pkg/action.(*Pull).Run
helm.sh/helm/v3/pkg/action/pull.go:129
main.newPullCmd.func2
helm.sh/helm/v3/cmd/helm/pull.go:75
github.com/spf13/cobra.(*Command).execute
github.com/spf13/cobra@v1.1.3/command.go:852
github.com/spf13/cobra.(*Command).ExecuteC
github.com/spf13/cobra@v1.1.3/command.go:960
github.com/spf13/cobra.(*Command).Execute
github.com/spf13/cobra@v1.1.3/command.go:897
main.main
helm.sh/helm/v3/cmd/helm/helm.go:87
runtime.main
runtime/proc.go:225
runtime.goexit
runtime/asm_amd64.s:1371
似乎正在获取索引,并获取最新版本的图表,但无法获取正确的下载 URL。 我做错了什么?
【问题讨论】:
-
我看你是想直接从helm-local拉取,可以用helm virtual试试拉取吗?另外,能不能在虚拟repo上做zap缓存,在本地repo上重新计算索引,测试pull?
-
@MuhammedKashif 我正在从添加到 helm 的 repo 中提取,它是 /helm - 已经是虚拟的。所以我做
helm repo add ABC https://.../helm,在helm pull ABC/chart上它被解析为https://.../helm-local/chart-version.tgz。我会尝试重新计算索引,如果有帮助,请告诉您,谢谢! -
谢谢@MuhammedKashif,索引重建有帮助,在新索引中链接变得正确!
-
很高兴知道它有效 :)
-
@MuhammedKashif 你不想建议一个答案,以便我接受吗?
标签: kubernetes-helm jfrog jfrog-container-registry