helm: dependency name (and alias) clashes should be reported as errors
While trying to fix #9150 I found another class of issues with aliases and name clashes of dependencies.
I am proposing to report the following situation as errors on linting (and template/installing/upgrading) a chart:
dependencies:
- name: foo
alias: baz # ← baz used twice
version: 1.0.0
- name: bar
alias: baz # ← baz used twice
version: 1.0.0
dependencies:
- name: foo
alias: bar # ← shadows chart below
version: 1.0.0
- name: bar
version: 1.0.0
dependencies:
- name: foo
version: 1.0.0
- name: foo # ← chart with same name as above (although version or repo will be different, this will not work currently)
version: 1.2.3
While the last example may be working in the future (see #7413), I can’t see any valid use case for the first two examples. Currently Helm renders templates, resulting in more or less undefined behaviour. Some templates will override each other, others won’t, depending on file names in the actual charts and on the chart names itself.
Output of helm version
:
version.BuildInfo{Version:"v3.4.2", GitCommit:"23dd3af5e19a02d4f4baa5b2f242645a1a3af629", GitTreeState:"clean", GoVersion:"go1.14.13"}
About this issue
- Original URL
- State: open
- Created 4 years ago
- Reactions: 3
- Comments: 17 (9 by maintainers)
Commits related to this issue
- lint and validate dependency metadata to reference dependencies with a unique key (name or alias) Report charts with the following bad dependency specifications as bad charts: dependencies: ... — committed to dastrobu/helm by dastrobu 4 years ago
- lint and validate dependency metadata to reference dependencies with a unique key (name or alias) Report charts with the following bad dependency specifications as bad charts: dependencies: ... — committed to dastrobu/helm by dastrobu 4 years ago
- lint and validate dependency metadata to reference dependencies with a unique key (name or alias) Report charts with the following bad dependency specifications as bad charts: dependencies: ... — committed to dastrobu/helm by dastrobu 4 years ago
- lint and validate dependency metadata to reference dependencies with a unique key (name or alias) Report charts with the following bad dependency specifications as bad charts: dependencies: ... — committed to dastrobu/helm by dastrobu 4 years ago
- lint and validate dependency metadata to reference dependencies with a unique key (name or alias) Report charts with the following bad dependency specifications as bad charts: dependencies: ... — committed to dastrobu/helm by dastrobu 4 years ago
- lint and validate dependency metadata to reference dependencies with a unique key (name or alias) Report charts with the following bad dependency specifications as bad charts: dependencies: ... — committed to dastrobu/helm by dastrobu 4 years ago
- Merge remote-tracking branch 'upstream/main' into #9169/lint-dependency-shadowing — committed to dastrobu/helm by joejulian 10 months ago
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.