-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
copy dependencies on aliasing to avoid sharing chart references on mu…
…ltiply aliased dependencies Dependencies keep a reference on their parent chart, which breaks if a chart reference is shared among multiple aliases. By copying the dependencies, parent information can be set correctly to render the templates as expected later on. Note that this change will make ChartFullPath return a different path for sub-subcharts. It will contain the alias names instead of the path to the chart files which makes it consistent with paths to templates on the subchart level. Closes helm#9150 Signed-off-by: Daniel Strobusch <1847260+dastrobu@users.noreply.github.com>
- Loading branch information
Showing
9 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
pkg/chartutil/testdata/chart-with-dependency-aliased-twice/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v2 | ||
appVersion: 1.0.0 | ||
name: chart-with-dependency-aliased-twice | ||
type: application | ||
version: 1.0.0 | ||
|
||
dependencies: | ||
- name: child | ||
alias: foo | ||
version: 1.0.0 | ||
- name: child | ||
alias: bar | ||
version: 1.0.0 | ||
|
6 changes: 6 additions & 0 deletions
6
pkg/chartutil/testdata/chart-with-dependency-aliased-twice/charts/child/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
appVersion: 1.0.0 | ||
name: child | ||
type: application | ||
version: 1.0.0 | ||
|
6 changes: 6 additions & 0 deletions
6
...il/testdata/chart-with-dependency-aliased-twice/charts/child/charts/grandchild/Chart.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v2 | ||
appVersion: 1.0.0 | ||
name: grandchild | ||
type: application | ||
version: 1.0.0 | ||
|
7 changes: 7 additions & 0 deletions
7
...a/chart-with-dependency-aliased-twice/charts/child/charts/grandchild/templates/dummy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Chart.Name }}-{{ .Values.from }} | ||
data: | ||
{{- toYaml .Values | nindent 2 }} | ||
|
7 changes: 7 additions & 0 deletions
7
pkg/chartutil/testdata/chart-with-dependency-aliased-twice/charts/child/templates/dummy.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Chart.Name }} | ||
data: | ||
{{- toYaml .Values | nindent 2 }} | ||
|
7 changes: 7 additions & 0 deletions
7
pkg/chartutil/testdata/chart-with-dependency-aliased-twice/values.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
foo: | ||
grandchild: | ||
from: foo | ||
bar: | ||
grandchild: | ||
from: bar | ||
|