错误:在requirements.yaml中找到,但在图表/目录中缺少:dependency-chart

时间:2018-03-21 22:30:17

标签: kubernetes kubernetes-helm

我收到以下错误

Error: found in requirements.yaml, but missing in charts/ directory: dependency-chart

当我尝试安装图表时。该图表依赖dependency-chart

requirements.yaml

dependencies:
- name: dependency-chart
  repository: "@some-repo"
  version: 0.1.0

执行的命令:

rm -rf charts
helm dep up
helm upgrade --install chart-to-install . --debug

输出:

Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "some-repo" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading dependency-chart from repo gs://some-repo
Deleting outdated charts

[debug] Created tunnel using local port: '65477'
[debug] SERVER: "127.0.0.1:65477"
Error: found in requirements.yaml, but missing in charts/ directory: dependency-chart

charts/目录包含dependency-chart-0.1.0.tgz

我有许多其他图表依赖于dependency-chart,它们的工作正常。 helm lint无效:

==> Linting .
[ERROR] Chart.yaml: directory name (helm) and chart name (dependency-chart) must be the same
[INFO] Chart.yaml: icon is recommended
[WARNING] templates/: directory not found

Error: 1 chart(s) linted, 1 chart(s) failed

ERROR由其他图表中的linter报告,其中helm install命令有效,所以它并没有真正帮助我。

我试图指向requirements.yaml中的本地图表而不是别名存储库中的相同结果。

我已经完成了尝试调试问题的事情,任何建议?

1 个答案:

答案 0 :(得分:6)

我已经开始在本地调试Helm项目,我偶然发现了这个:

// If a .helmignore file matches, skip this file.
if rules.Ignore(n, fi) {
    return nil
}

这提醒我,出于某种原因,我已将charts/添加到.helmignore文件中。这就是它没有看到下载的依赖项的原因:(