Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I'm getting the following error

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

when I try to install a chart. The chart has a dependency on dependency-chart.

requirements.yaml:

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

Commands performed:

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

Output:

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/ directory contains dependency-chart-0.1.0.tgz

I have many other charts which depends on dependency-chart and they work just fine. helm lint does not help:

==> 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

The ERROR is reported by the linter in other charts where the helm install command works, so it's not really helping me.

I've tried to point to the local chart in the requirements.yaml instead of from the aliased repository, same result.

I've run out of things to try to debug the issue as well, any suggestion?

like image 761
supercalifragilistichespirali Avatar asked Mar 21 '18 22:03

supercalifragilistichespirali


People also ask

How do I add a dependency to a chart in YAML?

Adding Dependencies Manually in the “charts” Directory Managing dependencies through the Chart.yaml file is the more elegant solution. But, sometimes, that won’t be possible, or won’t be desired. We mentioned that dependencies can be dropped in the charts directory.

How do I update the helm chart dependencies?

Once you have a dependencies file, you can run helm dependency update and it will use your dependency file to download all the specified charts into your charts/ directory for you. $ helm dep up foochart Hang tight while we grab the latest from your chart repositories... ...

How to mark a chart as deprecated in YAML?

The optional deprecated field in Chart.yaml can be used to mark a chart as deprecated. If the latest version of a chart in the repository is marked as deprecated, then the chart as a whole is considered to be deprecated. The chart name can later be reused by publishing a newer version that is not marked as deprecated.

How do I override default values in a YAML file?

A values file is formatted in YAML. A chart may include a default values.yaml file. The Helm install command allows a user to override values by supplying additional YAML values: When values are passed in this way, they will be merged into the default values file. For example, consider a myvals.yaml file that looks like this:


1 Answers

I've started debugging the Helm project locally and I stumbled upon this:

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

This reminded me that, for some reason, I've added charts/ to the .helmignore file. And that is the reason why it was not seeing the downloaded dependencies :(

like image 171
supercalifragilistichespirali Avatar answered Oct 23 '22 04:10

supercalifragilistichespirali