Skip to content

helm: generate values.schema.json from values.yaml - #565

Open
kriyanshii wants to merge 5 commits into
temporalio:mainfrom
kriyanshii:main
Open

helm: generate values.schema.json from values.yaml#565
kriyanshii wants to merge 5 commits into
temporalio:mainfrom
kriyanshii:main

Conversation

@kriyanshii

Copy link
Copy Markdown
Contributor

Generate values.schema.json from values.yaml instead of hand-editing it. Related to #563.

What was changed

Added hack/helm-values-schema, a small Go tool that infers a JSON Schema from helm/temporal-worker-controller/values.yaml (types plus descriptions from comments) and deep-merges hack/helm-values-schema/overlay.json for constraints that cannot be inferred (image.pullPolicy enums, CPU/memory patterns, extraEnv requiring name, etc.).

make helm-values-schema writes values.schema.json. The Helm Validation workflow regenerates the file and fails if git is dirty, so the committed schema cannot drift.

The regenerated schema now includes keys that were missing from the hand-written file (podSecurityContext, containerSecurityContext, workerResourceTemplate, certmanager.install / caBundle) and drops unused crds.

Why?

values.schema.json was maintained by hand and fell behind values.yaml (#536 / #563). Generating it from values, plus a small overlay for real validation rules, keeps the schema in sync without relying on helm schema quirks.

Checklist

  1. Closes Generate values.schema.json file automatically #563

  2. How was this tested:

    • make helm-values-schema is idempotent
    • helm lint --strict helm/temporal-worker-controller passes
    • helm template with extraEnv[0] missing name is still rejected by the schema
  3. Any docs updates needed?
    No. Run make helm-values-schema after changing values.yaml or hack/helm-values-schema/overlay.json.

@kriyanshii
kriyanshii requested review from a team, eniko-dif and jlegrone as code owners September 1, 2026 19:34
@tomba7

tomba7 commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Hey @kriyanshii Thanks for submitting this PR. We'll get this reviewed once you fix the linter errors.

@kriyanshii

Copy link
Copy Markdown
Contributor Author

@tomba7 fixed the lint errors.

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.

Generate values.schema.json file automatically

2 participants