【问题标题】:helm chart dependency - Error: directory charts/stable/tomcat not foundhelm chart 依赖项 - 错误:找不到目录 charts/stable/tomcat
【发布时间】:2022-01-27 06:44:42
【问题描述】:

我已经创建了 helm 图表,并尝试向它添加依赖项。 我在 Chart.yaml 中添加了依赖项部分。但是当我运行“helm 依赖项更新”命令或包命令时,它会引发错误。

据我了解,根据指定的依赖项,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 helm3


    【解决方案1】:

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

    根据我在 Artifact Hub 上看到的情况,您应该改用 https://cloudnativeapp.github.io/charts/curated/

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

    【讨论】:

    • 我尝试使用您建议的网址,但不起作用...指定存储库有效。
    【解决方案2】:

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

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

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

    【讨论】:

      猜你喜欢
      • 2023-03-05
      • 1970-01-01
      • 2020-06-02
      • 1970-01-01
      • 2019-09-30
      • 1970-01-01
      • 1970-01-01
      • 2018-07-20
      • 1970-01-01
      相关资源
      最近更新 更多