Hi all.
I am facing an issue with local dependencies declaration part of a release, as follows:
releases:
- name: foo_rel
namespace: foo_ns
chart: foo_example
dependencies:
- name: dep_chart
repository: file://../path/to/dep_chart_dir
version: 1.0.1
The above will throw this error when trying to render/diff templates:
in helmfile.d/helmfile.yaml: failed to read helmfile.yaml: reading document at index 1: yaml: unmarshal errors:
line 12: field name not found in type state.Dependency
line 13: field repository not found in type state.Dependency
exit status 1
But if declared in Charts.yaml within foo_example directory, it works just fine and loads/renders dep_chart along with foo_example as expected.
dependencies:
- name: dep_chart
repository: file://../path/to/dep_chart_dir
version: 1.0.1
Thank you.
@marianogg9 Hey! Please see https://github.com/variantdev/chartify/commit/c9b4508f8a490d167eac6c96032d049eda0728a9 and #1765.
I was pretty confused initially but I managed to make it work.
First of all, Helmfile's dependencies syntax is a bit different from Helm Chart.yaml's. In helmfile's, the only available fields are:
Until now chart only supported the REMOTE_REPO/CHART where REMOTE_REPO must be defined in repositories section of your helmfiel.yaml like:
repositories:
- name: REMOTE_REPO
url: https://example.com/charts
Neither repositories[].url nor releases[].dependencies[].chart had support for local file URLs(with a file:// scheme)
repositories[].dependencies[].chart to just accept the path to local chart.So,
releases:
- name: foo
chart: ./path/to/foo
dependencies:
- chart: ./path/to/bar
results in Helmfile internally generating Chart.yaml containing:
dependencies:
- alias: bar
name: bar
repo: file:///abs/path/to/bar
@marianogg9 WDYT? Does this resolve your issue?
Thank you @mumoshu, that looks good! If it accepts a local FS path for a chart, then it is fixed.
@marianogg9 Thanks for confirming! #1765 has been merged with a brand new documentation about adding ad-hoc dendendencies https://github.com/roboll/helmfile/blob/master/docs/advanced-features.md#adding-dependencies-without-forking-the-chart