-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
helmfile template fails when requirements.yaml specifies local path #1341
Comments
Actually I just found the |
@sirianni Hey! This is really interesting. So I thought that I had to run I don't have an elegant solution to this. Do we need to parse requirements.yaml and check the existence of corresponding Oh, or maybe we can just tolerate WDYT? Any input is much appreciated. |
Thanks @mumoshu. I haven't fully dug into all the details, but this seems like a reasonable approach. |
@sirianni Thanks! I'm going to implement the fix soon. However after re-reading your original issue description, I realized that the exact error you've seen seems like due to Helmfile is somehow missing the temporary created created by Helmfile itself. I'll investigate that asap, too. |
In #1172, we accidentally changed the meaning of prepare hook that is intended to be called BEFORE the pathExists check. It broke the scenario where one used a prepare hook for generating the local chart dynamically. This fixes Helmfile not to fetch local chart generated by prepare hook. In addition to that, this patch results in the following fixes: - Fix an issue that `helmfile template` without `--skip-deps` fails while trying to run `helm dep build` on `helm fetch`ed chart, when the remote chart has outdated dependencies in the Chart.lock file. It should be up to the chart maintainer to update Chart.lock and the user should not be blocked due to that. So, after this patch `helm dep build` is run only on the local chart, not on fetched remote chart. - Skip fetching chart on `helmfile template` when using Helm v3. `helm template` in helm v3 does support rendering remote charts so we do not need to fetch beforehand. Fixes #1328 May relate to #1341
In #1172, we accidentally changed the meaning of prepare hook that is intended to be called BEFORE the pathExists check. It broke the scenario where one used a prepare hook for generating the local chart dynamically. This fixes Helmfile not to fetch local chart generated by prepare hook. In addition to that, this patch results in the following fixes: - Fix an issue that `helmfile template` without `--skip-deps` fails while trying to run `helm dep build` on `helm fetch`ed chart, when the remote chart has outdated dependencies in the Chart.lock file. It should be up to the chart maintainer to update Chart.lock and the user should not be blocked due to that. So, after this patch `helm dep build` is run only on the local chart, not on fetched remote chart. - Skip fetching chart on `helmfile template` when using Helm v3. `helm template` in helm v3 does support rendering remote charts so we do not need to fetch beforehand. Fixes #1328 May relate to #1341
I just ran into this on a chart with a dependent chart when doing a helmfile lint
output error:
hydra-maester is a depedent chart of ory/hydra |
We are unable to run several
helmfile
commands (hemfile template
,helmfile lint
). These commands all error with:We have a monorepo and are using a relative path in
requirements.yaml
. The issue appears to be that helmfile is downloading the chart from the repo into/tmp
and runninghelm dependency build
inside that directory. This is unnecessary since our chart already includes the subcharts in the/charts
directory (via the--dependency-update
option tohelm package
. Our chart otherwise works fine withhelm
so this seems to be a quirk of how helmfile operates.Why can't
helmfile
template just runhelm template
? Whydoes it need to download the chart first andrunhelm dependency build
in a temp dir?I can't find any references other than this but I think it is a best practice to include all requirements in the chart TGZ package. If so, then running
helm dependency build
is unnecessary.EDIT: I see that it needs to download the chart first because
helm template
(with helm 2) is not capable of operating against remote charts (see helm/helm#4401). Is thedependency build
needed or can this be skipped if the subcharts are already packaged in the./charts
directory?Seems similar to #1002
The text was updated successfully, but these errors were encountered: