feat: Helm chart values.schema.json generated from backend config schemas#1729
Merged
Conversation
…emas
Extends the JSON schema pipeline to also cover the Helm chart values.
After generating any backend's Pydantic config schema, the chart-level
values.schema.json is automatically rebuilt by inlining all three
backend schemas into a complete, self-contained draft-07 schema that
describes the full values.yaml structure (global + all 6 applications).
- Add scripts/generate_chart_schema.py: resolves all $ref/$defs and
assembles the chart schema from the three backend schemas
- Add scripts/check_chart_values.py: validates values.yaml, stripping
x-* YAML anchor keys that Helm resolves transparently
- Add scripts/makefiles/chart-schema.mk with three targets:
generate-chart-schema, check-chart-schema-drift, check-chart-values;
included in the root Makefile (not per-backend)
- generate-config-schema tail-calls generate-chart-schema so any
backend Pydantic change keeps the chart schema in sync
- Add check-chart-schema CI job to Check-config-schema.yml
- Remove stale storage fields (catalog_store, prompt_store, task_store)
and embedding_model.type from values.yaml (caught by new validation)
- Fix unquoted {YOUR-URL} YAML placeholders in ingress hosts
- Replace {YOUR-URL}/{YOUR-REALM} placeholders with valid URI-format
defaults (your.host, your.keycloak.host) so the Pydantic-generated
format:uri constraints pass helm template validation
- Allow x-* keys at the schema root via patternProperties so YAML
anchors used for DRY value reuse don't fail schema validation
- Regenerate knowledge-flow-backend config schema to pick up new
filesystem_read_*_limit / *_chars fields added to AppConfig
- Regenerate values.schema.json from updated backend schemas
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
scripts/generate_chart_schema.pywhich inlines all three backend Pydantic-generated config schemas into a single self-containedvalues.schema.json(JSON Schema draft-07, no$ref), describing the full Helm chart values structure including all 6 applicationsscripts/check_chart_values.pyto validatevalues.yamlagainst the schema (stripsx-*YAML anchor keys that Helm resolves transparently before schema validation)scripts/makefiles/chart-schema.mkwith three targets:generate-chart-schema,check-chart-schema-drift,check-chart-values; included in the rootMakefileonly (not per-backend, since these are repo-wide concerns)make generate-config-schemain any backend app now tail-callsgenerate-chart-schemaso any Pydantic model change automatically keepsvalues.schema.jsonin synccheck-chart-schemaCI job toCheck-config-schema.yml— runs after per-app schema checks, installs onlyjsonschema+pyyaml, runs both drift check and values validation from the repo rootvalues.yamlcaught by the new validation:storage.catalog_store,storage.prompt_store,storage.task_store, andembedding_model.type{YOUR-URL}YAML placeholders in ingress hosts (were parsed as flow mappings instead of strings)Test plan
make generate-chart-schemaat repo root producesdeploy/charts/fred/values.schema.jsonmake check-chart-schema-driftpasses (committed schema matches freshly generated one)make check-chart-valuespasses againstvalues.yamlmake generate-config-schemain any backend app also updatesvalues.schema.jsonhelm lint deploy/charts/fredpasses (Helm validates values against the schema)Check Config JSON Schemasworkflow passes on this branchvalues.yaml