Open jkroepke opened 1 year ago
I'm pretty sure this is mostly a duplicate of https://github.com/helm/helm/issues/11876
https://helm.sh/docs/topics/charts/#managing-dependencies-manually-via-the-charts-directory provides a method for including charts outside of the Chart.yaml/Chart.lock control. This is intentional.
But does it make sense? It's a different behavior compared to all known package mangers?
I would not expect that the manual dependency management hits here, since there is a Chart.lock which opt-in into automatic dependency management.
@joejulian After-rethink about this. There is a conflict.
I re-read https://helm.sh/docs/topics/charts/#managing-dependencies-manually-via-the-charts-directory which documents the manual dependency management. And do some local tests.
Manually dependency must be extracted otherwise, the helm dep
command would remove them. In conclusion, packaged dependency should never considered as manually managed dependency, since helm dep build
and helm dep up
would remove them otherwise.
The documented describes that manually dependencies should be extracted which means that dependency which packaged as tar.gz
should be never assumed as manually managed dependency. helm dep build
and helm dep up
behaving like this. They assume, any tar.gz in the charts directory coming form earlier helm dep up
run.
From my point of view, it is a bug that helm is loading outdated .tar.gz
packaged dependency. Helm is able to validate, if the .tar.gz
does not match the Chart.lock file, since a packaged dependency should never considered as manual managed dependency.
You make a fair argument but the fact is, it's always worked this way and it's possible that with the millions of users out there, some may be using this to their advantage.
If you'd like to offer a PR to change this behavior, it would need to be governed by a helm improvement proposal (HIP) and guarded by a flag to prevent breaking existing use cases.
I may ask, why a bug fix need a HIP? Provisusly #11876 is mentioned as duplicate and marked as bug. Now, a bug is mentioned as proposal?
would need to be governed by a helm improvement proposal
Well, no one will pass the very slow process of the HIP for a bugfix.
Hi @joejulian
I would like ask you again, if you consider this as bug. I recently figure out that dependencies.import-values
works fine, even the version constrain does not met. This issue is wrongly marked as proposal
If dependencies.import-values
works, dependencies.alias
should works fine.
dependencies:
- name: kube-prometheus-stack
alias: prom-stack
condition: prom-stack.enabled
# https://artifacthub.io/packages/helm/prometheus-community/kube-prometheus-stack
version: 45.7.1
repository: https://prometheus-community.github.io/helm-charts
import-values:
- child: alertmanager
parent: dependencyCheck.kubePrometheusStack
I'm very unhappy with the current situation here.
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Still a bug
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Still a bug
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Relevant
I just wasted half a day on this. The chart versions didn't match the downloaded ones anymore, thus the chart alias didn't work anymore, and so values didn't get applied, and I had no clue as to why.
and I had no clue as to why.
Because the error behavior is 'is intentional' by helm.
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
Still an issue
This issue has been marked as stale because it has been open for 90 days with no activity. This thread will be automatically closed in 30 days if no further activity occurs.
bump
Output of
helm version
:On some local machines we identity the issue that some helm dependencies are completely ignoring helm values. After some investigation, I could identity that the problem appears, after some dependencies update maintenance tasks.
Looking deeper into it, I could identity that only charts with the alias property are affected.
In our setup, we have the (sub-)charts directory always on
.gitignore
to prevent that .tar.gz in out git repository. In conclusion, if someone changes the dependency on theChart.yaml
runshelm dep up
on local system and check in, the problem will occurs on all systems after a git pull. (Example Commit: https://github.com/jkroepke/homelab/commit/31a5edef38f5776b7fb50cd247f9c6c591002bf8)If the
Chart.lock
and the charts/ directory of a helm chart are out of sync, then helm will ignore the alias property entirely which prevents that values are pass from the umbrella chart to the sub chart.A potential workaround is running
helm dep up
.How to reproduce this?
Proposed fix
If there is a
Chart.lock
file in helm directory and theChart.lock
is not in sync with thecharts/
directory, helm should refuse commands likehelm template
andhelm upgrade
. Helm does this already, if the charts is empty:Helm checks, if the sub chart is present on the
charts
directory but it does not validate, if the specific version if present in the charts directory. If the version specific helm chart version different from theChart.lock
file, the alias property gets ignored.