To ease local development/testing, I have an umbrella chart that deploys all my sub-charts. Those applications make use of resources (e.g. MongoDB, Kafka, etc) and I want to make sure that if you are installing the umbrella chart to a cluster, it will also install those resources.
To do this, I have the following:
apiVersion: v2
name: my-cool-project
type: application
version: 0.1.0
appVersion: 0.1.0
dependencies:
- name: my-cool-app-1
repository: "file://my-cool-app-1"
- name: my-cool-app-2
repository: "file://my-cool-app-2"
- name: bitnami/kafka
version: 2.5.0
repository: "https://charts.bitnami.com/bitnami"
Unfortunately, installing this chart throws the following error:
Error: found in Chart.yaml, but missing in charts/ directory: bitnami/kafka
This seems so fundamental to the concept of Helm that the fact it's not working means I'm clearly missing something basic. Even the official docs are pretty clear this is the right approach.
Most documentation/guides instruct you to simply helm install it straight to the cluster. While this might solve my immediate problem of needing Kafka or MongoDB on the cluster, my desire is to code-ify the need for that resource so that I can achieve "single chart installs everything to an empty cluster and it just works" status.
What am I missing?
This worked for me 🔧:
apiVersion: v2
name: my-cool-project
type: application
version: 0.1.0
appVersion: 0.1.0
dependencies:
- name: my-cool-app-1
repository: "file://my-cool-app-1"
- name: my-cool-app-2
repository: "file://my-cool-app-2"
- name: kafka 👈
version: 11.6.0 👈
repository: "https://charts.bitnami.com/bitnami"
Then update on the dependencies on your local helm Chart:
○ → helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "bitnami" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading kafka from repo https://charts.bitnami.com/bitnami
Deleting outdated charts
✌️☮️
Related
i'm triyng to do one Helm Chart for different environments. In many tutorials such scheme should works, but my structure does not read value from dependency repository. Helm just ignores it.
I have following folder structure
helm
- charts
- core-web
- Chart.yaml
- values.yaml
- templates
- frontend
- Chart.yaml
- values.yaml
- templates
- prod
- Chart.yaml
- values.yaml
- dev
- Chart.yaml
- values.yaml
prod/Chart.yaml
apiVersion: v1
name: test
version: 1.0.0
dependencies:
- name: core-web
version: "1.37.0"
repository: file://../charts/core-web/
- name: frontend
version: "1.6.0"
repository: "file://../charts/frontend"
From helm folder i execute following command
helm install ./prod --dry-run --generate-name -n sandbox -f prod/values.yaml
Error: INSTALLATION FAILED: found in Chart.yaml, but missing in charts/ directory: core-web, frontend
If i move charts forlder to prod folder, then everithing works.
Why helm does not accept file path from dependency repository?
It should: https://helm.sh/docs/helm/helm_dependency/
Thanks for the help.
Try to replicate the issue, seems like a cache issue
you can verify that helm dependency on which path it's looking for charts.
helm template test ./prod
#output Error: found in Chart.yaml, but missing in charts/ directory: backend, web-app
then I tried to verify the path on which the helm looking
helm dep ls ./prod
from the output its clear it's still looking into the wrong path with the status missing as its still looking for chart inside prod folder.
NAME VERSION REPOSITORY STATUS
backend 1.2.3 file://charts/backend/ missing
web-app 1.2.3 file://charts/web-app/ missing
so to fix this
helm dependency update ./prod
then I can see
helm dep ls ./prod
I am trying to make Skaffold work with Helm.
Below is my skaffold.yml file:
apiVersion: skaffold/v2beta23
kind: Config
metadata:
name: test-app
build:
artifacts:
- image: test.common.repositories.cloud.int/manager/k8s
docker:
dockerfile: Dockerfile
deploy:
helm:
releases:
- name: my-release
artifactOverrides:
image: test.common.repositories.cloud.int/manager/k8s
imageStrategy:
helm: {}
Here is my values.yaml:
image:
repository: test.common.repositories.cloud.int/manager/k8s
tag: 1.0.0
Running the skaffold command results in:
...
Starting deploy...
Helm release my-release not installed. Installing...
Error: INSTALLATION FAILED: failed to download ""
deploying "my-release": install: exit status 1
Does anyone have an idea, what is missing here?!
I believe this is happening because you have not specified a chart to use for the helm release. I was able to reproduce your issue by commenting out the chartPath field in the skaffold.yaml file of the helm-deployment example in the Skaffold repo.
You can specify a local chart using the deploy.helm.release.chartPath field or a remote chart using the deploy.helm.release.remoteChart field.
Im trying to setup a Helm chart repo using Github pages. Everything appears to work fine with generating the index.yaml etc via Github Actions, awesome.
index.yaml
apiVersion: v1
entries:
test:
- apiVersion: v1
created: "2021-08-27T09:54:44.830905882Z"
description: Testing the chart releaser
digest: b41b263d236ef9eee0a75e877982a10ea73face093b4999c6004263b041f0fad
keywords:
- test
name: test
urls:
- https://github.com/xxx/xxx/releases/download/test-0.0.9/test-0.0.9.tgz
version: 0.0.9
generated: "2021-08-27T09:54:44.587113879Z"
And a test chart
name: test
description: Testing the chart releaser
version: 0.0.9
apiVersion: v1
keywords:
- test
sources:
home:
However, when i try to add the repo using
helm repo add test https://didactic-quibble-e0daddd0.pages.github.io/
I get the error
Error: looks like "http://didactic-quibble-e0daddd0.pages.github.io/" is not a valid chart repository or cannot be reached: error converting YAML to JSON: yaml: line 188: mapping values are not allowed in this context
The URL http://didactic-quibble-e0daddd0.pages.github.io/index.yaml returns the index.yaml file described above.
Any help would be much appreciated.
Cheers
I would suggest a different procedure and hope that helps you in hosting GitHub as a Helm Repo.
I have 2 Helm charts here:
Library- this is going to be used by other helm charts as a
dependency . This I am going to host in the below example as a helm repo on GitHub
App- this is going to consume the Library chart and extra
functionality.
Library Chart: In your Library Directory
helm package libchart
helm helm repo index .
Validate the index file is created and entries are correct
more index.yaml
apiVersion: v1
entries:
libchart:
- apiVersion: v2
appVersion: 1.16.0
created: "2022-11-30T08:57:01.109116+09:00"
description: A Helm chart for Kubernetes
digest: 8aa38d70d61f81cf31627a7d7d9cc5c293f340bf01918c9a16ac1fac9fcc96e9
name: libchart
type: library
urls:
- libchart-0.1.0.tgz
version: 0.1.0
generated: "2022-11-30T08:57:01.108194+09:00"
Commit "index.yaml" and ".tgz" files to the git .
Add helm repo:
#~: helm repo add mylib --username parjun8840 --password TOPSECRET-TOKEN-FROM-GIT
https://raw.githubusercontent.com/YOURGITUSER/helm-library/master
"mylib" has been added to your repositories
#~:helm-library arjunpandey$ helm repo update
App Chart: In your App Directory
#~:appchart arjunpandey$ more Chart.yaml
apiVersion: v2
name: appchart
description: A Helm chart for Kubernetes
type: application
version: 0.1.0
appVersion: "1.16.0"
dependencies:
- name: libchart
version: 0.1.0
repository: https://raw.githubusercontent.com/YOURGITUSER/helm-library/master
#~:appchart arjunpandey$ helm dependency update
Hang tight while we grab the latest from your chart repositories...
...Successfully got an update from the "mylib" chart repository
...Successfully got an update from the "newrelic" chart repository
Update Complete. ⎈Happy Helming!⎈
Saving 1 charts
Downloading libchart from repo https://raw.githubusercontent.com/YOURGITUSER/helm-library/master
Deleting outdated charts
I am trying to install rabbitmq helm chart in dependencies section of my parent chart.
Here is my parent chart
apiVersion: v2
name: mychart
description: A Helm chart to install rabbitmq
type: application
version: 1.0.0
appVersion: "1.0.0"
dependencies:
- name: rabbitmq
repository: https://charts.bitnami.com/bitnami
version: 8.11.9
condition: rabbitmq.enabled
And here is the values.yml file of this chart
rabbitmq:
enabled: true
auth.username: test
auth.password: test
I am trying to override the values of auth.username and auth.password of rabbitmq dependency chart. But values are getting override. And default values are used when I deploy/test this chart.
What am I doing wrong here ?
While the helm install --set option takes options like --set rabbitmq.auth.username=..., and charts' documentation generally uses this syntax, in YAML files you need to put each part in a nested block:
rabbitmq:
enabled: true
auth:
# "username" under "auth", not a single key "auth.username"
username: test
password: test
I have following dependency in requirement.yaml file:
dependencies:
- name: redis
version: 0.1.2
repository: http://helm-charts.repo:8800/
requirements.lock:
dependencies:
- name: redis
repository: http://helm-charts.repo:8800/
version: 0.1.2
digest: sha256: <some alpha numeric value>
generated: <>
helm dependency build <Chart name>
is giving me:
Error: requirements.lock is out of sync with requirements.yaml
You probably have old digest. Instead of manually updating requirements.lock file use the following command after just updating your requirement.yaml file:
helm dep update