helm 图表依赖项 - 错误:找不到目录charts/stable/tomcat

问题描述 投票:0回答:2

我已经创建了 Helm Chart,并尝试向其添加依赖项。 我已经在 Chart.yaml 中添加了依赖项部分。但是,当我运行“helm dependency update”命令或包命令时,它会抛出错误。

据我了解,根据指定的依赖项,helm 应该下载依赖项并放入“charts”文件夹中。

# create the helm chart, name - assign4
helm create assign4 -n helm


# added the dependencies section to Chart.yaml

dependencies:
- name: stable/tomcat
  version: 3.0.1
  url: https://artifacthub.io/packages/helm/cloudnativeapp/tomcat 


Karans-MacBook-Pro:assign4 karanalang$ helm dep build
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "ingress-nginx" chart repository
...Successfully got an update from the "concourse" chart repository
...Successfully got an update from the "stable" chart repository
...Successfully got an update from the "bitnami" chart repository
...Successfully got an update from the "prometheus-community" chart repository
Update Complete. ⎈Happy Helming!⎈
Error: directory charts/stable/tomcat not found


Karans-MacBook-Pro:helm karanalang$ helm package assign4 -n helm -u
Error: directory /Users/karanalang/Documents/Technology/helm/assign4/charts/stable/tomcat not found

需要采取什么措施来解决这个问题? 蒂亚!

dependencies kubernetes-helm
2个回答
1
投票

我在 Charts.yaml 中使用了以下内容来解决该问题:

dependencies:
- name: tomcat
  version: '9.1.5'
  repository: 'https://charts.bitnami.com/bitnami'

即指定存储库和正确的版本, 名称可以是我们选择的任何名称。


0
投票

Artifact Hub 允许您探索 Helm 图表,但不存储它们。您应该使用 Helm 注册表本身的 URL 更新 URL。

根据我在 Artifact Hub 上看到的情况,您应该使用

https://cloudnativeapp.github.io/charts/curated/
来代替。

enter image description here

了解更多信息 https://helm.sh/docs/helm/helm_dependency/

© www.soinside.com 2019 - 2024. All rights reserved.