Using Helm version v3.4.1.
I was having this error.
helm chart with requirements.yaml, did not find local charts
"helm dep build" fails if requirements.yaml contains local dependencies and remote one #3742.
My solution was to:
- Rename
charts/
(directory) to subcharts/
- And
chmod 755 subcharts/*
Heml 3 didn't like it when I placed my local dependencies in charts/
Also Helm dep up needs permissions to move the local dependencies from your subcharts directory to tmpcharts/
and so on.
**
This is not my find.
**
I read this from @sgandon :
Bug documented #3742.
comment.
the reason why the os.Stat() fails to find the folder. This is
because the calling function
downloadAll is renaming the charts folder to tmpcharts during the update
thus making our unpacked chart not foundable for that duration.
Note:
!! On Helm 3 requirements.yaml is deprecated. !!
You add the dependencies in the Parent/Main Charts.yaml.
dependencies:
- name: chart-you-want-to-deploy-1
repository: file://subcharts/chart-you-want-to-deploy-1
version: 0.0.1
condition: chart-you-want-to-deploy-1.enabled
- name: chart-you-want-to-deploy-2
repository: file://subcharts/chart-you-want-to-deploy-2
version: 0.0.1
condition: chart-you-want-to-deploy-2e.enabled
Added my variables to my globals in the Parent/Main Values.yaml
globals:
chart-you-want-to-deploy-1:
enabled: true
chart-you-want-to-deploy-2:
enabled: false
Dont forget to add the flags to your command.
In my case I was using a CI/CD tool (Gitlab)
script:
- >
helm dep up Main-Chart-Name && \
helm upgrade --install \
--set chart-you-want-to-deploy-1.enabled=false \
--set chart-you-want-to-deploy-2.enabled=true \
RELEASE_NAME Main-Chart-Name
my tree
Main-Chart-Name
├── Chart.yaml
├── subcharts
│ ├── chart-you-want-to-deploy-1
│ │ ├── Chart.yaml
│ │ ├── charts
│ │ ├── templates
│ │ │ └── chart-you-want-to-deploy-1.yaml
│ │ └── values.yaml
│ └── chart-you-want-to-deploy-2
│ ├── Chart.yaml
│ ├── charts
│ ├── templates
│ │ └── chart-you-want-to-deploy-2.yaml
│ └── values.yaml
├── templates
│ ├── helpers.tpl
│ ├── my.yaml
│ ├── main.yaml
│ └── templates.yaml
└── values.yaml
P.S. - Thank you @Narayana and @sgandon . Thanks to you guys I'm happy deploying!