Komal Kadam
Komal Kadam

Reputation: 978

Error: found in Chart.yaml, but missing in charts/ directory: mysql

I have added mysql in requirements.yaml. Helm dependency downloads the mysql chart

helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "nginx" chart repository
...Successfully got an update from the "stable" chart repository

Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading mysql from repo <our private repository>
Deleting outdated charts

But when I do helm install my_app_chart ../my_app_chart It gives error

Error: found in Chart.yaml, but missing in charts/ directory: mysql

Upvotes: 52

Views: 98818

Answers (4)

Montralis
Montralis

Reputation: 1

To pick up on @AshvjitSingh point again, I have had good experience with helm-push. This is a tool that packages your chart directly and pushes it to your saved remote repository.

Also have to note again that helm dependency update is used to manage dependencies for local Helm charts. It updates the charts/ directory based on the Chart.yaml file, ensuring that all required charts are present and at the correct versions. This command downloads the dependencies, updates them as needed, and generates a Chart.lock file to record exact versions.

Upvotes: 0

Affes Salem
Affes Salem

Reputation: 1649

I have encountred the same error message when I first started learning how to use libcharts, I used chart.yaml to specify the dependency of the libchart like so:

chart.yaml

...
dependencies:
  - name: mylibchart
    version: 0.1.0
    repository: file://path/to/libchart

and in that libchart chart.yaml data was like this:

apiVersion: v2
name: lib <-- this was causing the error to occur (should be mylibchart instead)
description: A Helm chart for Kubernetes
type: library
version: 0.1.0
appVersion: "1.16.0"

so as you can see the name specified in the dependencies has to be the same name of the chart/libchart.

Upvotes: 7

PhoneixS
PhoneixS

Reputation: 11026

You don't have to add it to the control version system, you just download them again if for some reason you have lost them (for example when you clone the repository). To do this, execute the command:

helm dependency update

The above command will download the dependencies you've defined in the requirements.yaml file or dependencies entry in Chart.yaml to the charts folder. This way, requirements are updated and you'll have the correct dependencies without worrying about if you updated them also in the control version system.

Upvotes: 113

Komal Kadam
Komal Kadam

Reputation: 978

I updated .helmignore

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
charts/

It contained charts/ I removed the entry and it worked

# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/

Upvotes: 16

Related Questions