Skip to content

feat: Helm chart values.schema.json generated from backend config schemas#1729

Merged
dimitri-tombroff merged 3 commits into
swiftfrom
add-chart-schema
Jun 15, 2026
Merged

feat: Helm chart values.schema.json generated from backend config schemas#1729
dimitri-tombroff merged 3 commits into
swiftfrom
add-chart-schema

Conversation

@florian-muller

Copy link
Copy Markdown
Contributor

Summary

  • Adds scripts/generate_chart_schema.py which inlines all three backend Pydantic-generated config schemas into a single self-contained values.schema.json (JSON Schema draft-07, no $ref), describing the full Helm chart values structure including all 6 applications
  • Adds scripts/check_chart_values.py to validate values.yaml against the schema (strips x-* YAML anchor keys that Helm resolves transparently before schema validation)
  • Adds scripts/makefiles/chart-schema.mk with three targets: generate-chart-schema, check-chart-schema-drift, check-chart-values; included in the root Makefile only (not per-backend, since these are repo-wide concerns)
  • make generate-config-schema in any backend app now tail-calls generate-chart-schema so any Pydantic model change automatically keeps values.schema.json in sync
  • Adds check-chart-schema CI job to Check-config-schema.yml — runs after per-app schema checks, installs only jsonschema + pyyaml, runs both drift check and values validation from the repo root
  • Removes stale fields from values.yaml caught by the new validation: storage.catalog_store, storage.prompt_store, storage.task_store, and embedding_model.type
  • Fixes unquoted {YOUR-URL} YAML placeholders in ingress hosts (were parsed as flow mappings instead of strings)

Test plan

  • make generate-chart-schema at repo root produces deploy/charts/fred/values.schema.json
  • make check-chart-schema-drift passes (committed schema matches freshly generated one)
  • make check-chart-values passes against values.yaml
  • Modifying a Pydantic config model and running make generate-config-schema in any backend app also updates values.schema.json
  • helm lint deploy/charts/fred passes (Helm validates values against the schema)
  • CI Check Config JSON Schemas workflow passes on this branch
  • IDE (VS Code with Red Hat YAML plugin) shows autocompletion and validation when editing values.yaml

…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
@florian-muller florian-muller requested a review from simcariou June 12, 2026 14:50
@florian-muller florian-muller self-assigned this Jun 12, 2026
Comment thread scripts/generate_chart_schema.py Fixed
Comment thread scripts/generate_chart_schema.py Fixed
- 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
@dimitri-tombroff dimitri-tombroff merged commit f75cb65 into swift Jun 15, 2026
62 checks passed
@dimitri-tombroff dimitri-tombroff deleted the add-chart-schema branch June 15, 2026 04:54
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