Skip to content

feat: let ad-hoc chart dependencies override their condition - #214

Merged
yxxhero merged 3 commits into
helmfile:masterfrom
Cayan:chart-dependency-condition
Oct 20, 2026
Merged

yxxhero merged 3 commits into
helmfile:masterfrom
Cayan:chart-dependency-condition

Conversation

@Cayan

@Cayan Cayan commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Part A of helmfile/helmfile#1258.

ChartDependency gets an optional Condition. It is written to the dependency's condition in the generated Chart.yaml; when it is empty, the current <alias or chart name>.enabled is kept, so nothing changes for existing callers.

The new case in TestReadAdhocDependencies uses an aliased local chart with Condition: "global.mydb.enabled"; it fails without the change. The existing case already covers the default.

Part B will add condition to the release dependencies: in helmfile and bump chartify once this is released.

Cayan and others added 3 commits October 1, 2026 14:05
- ChartDependency gains an optional Condition, written to the dependency's `condition` in the
  generated Chart.yaml. Left empty, it keeps the current `<alias or chart name>.enabled`, so
  existing callers see no change.
- A test covers an aliased local dependency with an explicit condition.

Signed-off-by: Cayan <1619617+Cayan@users.noreply.github.com>
Signed-off-by: Cayan <1619617+Cayan@users.noreply.github.com>
Exercise ChartDependency.Condition through the full chartify pipeline
(UpdateRequirements writes it to Chart.yaml, helm template evaluates it)
so the new override is proven beyond ReadAdhocDependencies unit tests.

The rendered snapshots match the default-condition cases because neither
the db nor the log test chart references .Values.global.

Signed-off-by: yxxhero <aiopsclub@163.com>
@yxxhero
yxxhero merged commit 6e04076 into helmfile:master Oct 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants