Skip to content

fix(helm): add the global key unrestricted - #2289

Merged
jhrozek merged 1 commit into
stacklok:mainfrom
rrey:add-chart-global-key
Oct 14, 2026
Merged

jhrozek merged 1 commit into
stacklok:mainfrom
rrey:add-chart-global-key

Conversation

@rrey

@rrey rrey commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Helm injects a global key into a subchart's values when the chart is used as a
dependency of another chart. values.schema.json sets additionalProperties: false
and had no global property, so installing a parent chart that depends on mecak8s
failed schema validation.

This adds global to the schema as an unrestricted object. Helm owns the contents
of global and shares them across all subcharts, so the schema deliberately does not
constrain its keys.

Issue relationship

Fixes #2287

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe):

Test plan

Baseline checks

  • Linting (task lint)
  • Fast offline test suite (task test)
  • Pre-review race suite (task test:race)
  • Offline demo (go run ./cmd/mecademo)
  • Markdown changed: docs generation/link checks (task docs)
  • User docs/user-facing behavior changed: site build (task site:build)
  • Guarded engine API affected: compatibility check (task api:check)
  • Intentional engine API change: task api:update + engine/CHANGELOG.md

Changes

File Change
deploy/helm/mecak8s/values.schema.json Add global (type object) to the allowed top-level properties

User-facing change

The mecak8s chart can now be used as a dependency of another chart. Before, the
injected global values made helm install or helm lint fail on the parent chart.

Special notes for reviewers

  • global is intentionally unconstrained (type: object only). By Helm convention,
    its keys are defined by the parent chart, not by the subchart.
  • The chart does not read .Values.global, so there is no template change.

Helm dependency mechanism would inject a `global` key if the chart is used
as a dependency.
Without the key in the schema, this would break the capability to use the
chart as another chart dependency.

@jhrozek jhrozek left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@jhrozek
jhrozek marked this pull request as ready for review October 14, 2026 10:18
@jhrozek
jhrozek merged commit 42b933f into stacklok:main Oct 14, 2026
35 of 36 checks passed
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 20, 2026
2 tasks
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.

Cannot use mecatl chart as dependency

2 participants