Skip to content

fix(chart): allow 'enabled' and 'global' in values schema - #97

Open
ecthelion77 wants to merge 2 commits into
yoda-digital:mainfrom
forterro:fix/schema-subchart-upstream
Open

fix(chart): allow 'enabled' and 'global' in values schema#97
ecthelion77 wants to merge 2 commits into
yoda-digital:mainfrom
forterro:fix/schema-subchart-upstream

Conversation

@ecthelion77

Copy link
Copy Markdown
Contributor

Problem

When gitlab-mcp is used as a sub-chart dependency in an umbrella chart, Helm injects two additional top-level properties into the sub-chart's values:

  • enabled — from the condition: field in the parent's Chart.yaml
  • global — inherited global values from the parent chart

Since values.schema.json has "additionalProperties": false at the root level, helm template fails with:

at '': additional properties 'enabled', 'global' not allowed

This blocks any ArgoCD or Flux deployment using this chart as a dependency.

Fix

Add both properties to the schema's root properties:

  • enabled: {"type": "boolean"}
  • global: {"type": "object", "additionalProperties": true}

This is a standard pattern for Helm sub-charts with strict schemas (see Helm docs on subcharts and global values).

Testing

helm template test chart/ --set secret.GITLAB_PERSONAL_ACCESS_TOKEN=ok --set enabled=true --set global.imageRegistry=foo

Passes without error after the fix.

When the chart is used as a subchart dependency, Helm injects 'global'
values from the parent and passes the 'enabled' condition flag. The
strict additionalProperties:false schema rejects these, causing
helm template to fail even when the subchart is disabled.

Add both properties to the root schema to allow standard Helm subchart
usage patterns.

Signed-off-by: Olivier Gintrand <olivier.gintrand@forterro.com>
@ecthelion77
ecthelion77 requested a review from nalyk as a code owner May 25, 2026 10:18

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the values.schema.json file by adding enabled and global properties to support the chart's use as a sub-chart. The reviewer recommends also adding these keys to the values.yaml file to improve discoverability and ensure they are included in generated documentation.

Comment thread chart/values.schema.json
Per review feedback: declare sub-chart injected properties in values.yaml
so they appear in helm show values and helm-docs generated README.

Signed-off-by: Olivier Gintrand <olivier.gintrand@forterro.com>
@ecthelion77

Copy link
Copy Markdown
Contributor Author

@nalyk Friendly ping — this fix is now blocking our upgrade path from 0.5.1 (forked) to 0.9.1 (upstream). Created issue #104 with full context.

The PR is a 17-line additive change with zero behavioral impact — just the two properties Helm requires for sub-chart usage (enabled, global). Would you be able to review/merge this soon? Thanks!

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.

1 participant