Search code examples
kuberneteskubernetes-helm

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?


Solution

  • 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 :(