From 45ef545e7c5073bf7e2839cfafa941497eca7db2 Mon Sep 17 00:00:00 2001 From: "promptless[bot]" Date: Sat, 18 Jul 2026 11:53:38 +0000 Subject: [PATCH] docs: clarify alias interaction with dependency conditions and tags Document that when a chart dependency uses an alias, its condition path and enabling values in the top parent's values must be keyed by the alias name, that nested aliased chains accumulate the alias at each level, and that tags are matched by their labels rather than the alias name. Applied to both the version-3 and next (v4) charts guide. Signed-off-by: promptless[bot] --- docs/topics/charts.mdx | 22 ++++++++++++++++++++++ versioned_docs/version-3/topics/charts.md | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/docs/topics/charts.mdx b/docs/topics/charts.mdx index f9fdd55a89..43a61fec07 100644 --- a/docs/topics/charts.mdx +++ b/docs/topics/charts.mdx @@ -339,6 +339,25 @@ new-subchart-2 The manual way of achieving this is by copy/pasting the same chart in the `charts/` directory multiple times with different names. +When a dependency uses an `alias`, the alias becomes the dependency's name for +the purposes of `condition` evaluation. The `condition` path and any enabling +values in the top parent's values must therefore be keyed by the alias name +rather than the original chart name. For example, with the `new-subchart-1` +alias above you would use `condition: new-subchart-1.enabled` in `Chart.yaml` +and set the value in the top parent's values: + +```yaml +# parentchart/values.yaml +new-subchart-1: + enabled: true +``` + +For a chart reached through an aliased dependency chain, the values path +accumulates the alias name at each level (for example, +`outer-alias.inner-alias.enabled`). Tags are not affected by an alias: they are +matched by the labels listed in the dependency's `tags` field, not by the chart +or alias name. + #### Tags and Condition fields in dependencies In addition to the other fields above, each requirements entry may contain the @@ -414,6 +433,9 @@ helm install --set tags.front-end=true --set subchart2.enabled=false - Tags and conditions values must be set in the top parent's values. - The `tags:` key in values must be a top level key. Globals and nested `tags:` tables are not currently supported. +- When a dependency uses an `alias`, its `condition` path is keyed by the alias + name rather than the original chart name. Tags are not affected by aliasing; + they are matched by the labels in the dependency's `tags` field. #### Importing Child Values via dependencies diff --git a/versioned_docs/version-3/topics/charts.md b/versioned_docs/version-3/topics/charts.md index 2a40bb8984..0cd4019698 100644 --- a/versioned_docs/version-3/topics/charts.md +++ b/versioned_docs/version-3/topics/charts.md @@ -335,6 +335,25 @@ new-subchart-2 The manual way of achieving this is by copy/pasting the same chart in the `charts/` directory multiple times with different names. +When a dependency uses an `alias`, the alias becomes the dependency's name for +the purposes of `condition` evaluation. The `condition` path and any enabling +values in the top parent's values must therefore be keyed by the alias name +rather than the original chart name. For example, with the `new-subchart-1` +alias above you would use `condition: new-subchart-1.enabled` in `Chart.yaml` +and set the value in the top parent's values: + +```yaml +# parentchart/values.yaml +new-subchart-1: + enabled: true +``` + +For a chart reached through an aliased dependency chain, the values path +accumulates the alias name at each level (for example, +`outer-alias.inner-alias.enabled`). Tags are not affected by an alias: they are +matched by the labels listed in the dependency's `tags` field, not by the chart +or alias name. + #### Tags and Condition fields in dependencies In addition to the other fields above, each requirements entry may contain the @@ -410,6 +429,9 @@ helm install --set tags.front-end=true --set subchart2.enabled=false - Tags and conditions values must be set in the top parent's values. - The `tags:` key in values must be a top level key. Globals and nested `tags:` tables are not currently supported. +- When a dependency uses an `alias`, its `condition` path is keyed by the alias + name rather than the original chart name. Tags are not affected by aliasing; + they are matched by the labels in the dependency's `tags` field. #### Importing Child Values via dependencies