Skip to content

feat(service,cron-job): add UI category to values.schema.json for schema-driven settings#292

Merged
arunesh-j merged 3 commits into
mainfrom
feat/service-schema-ui-category
Jul 10, 2026
Merged

feat(service,cron-job): add UI category to values.schema.json for schema-driven settings#292
arunesh-j merged 3 commits into
mainfrom
feat/service-schema-ui-category

Conversation

@arunesh-j

Copy link
Copy Markdown
Contributor

What

Adds a category key to each mutable top-level property in the service and cron-job chart schemas (values.schema.json).

Why

The ZopDay Helm-import Settings UI renders an editable form for imported helm.zop.dev services. We want that form grouped into tabs (Runtime / Compute / Environment / Advanced) without hardcoding field lists in the frontend. Instead, each chart property declares which tab it belongs to via category, helm-manager passes it through, and the UI is a generic transformer that groups by category.

Shared category vocabulary (same across all charts)

Category service cron-job
runtime image, httpPort, metricsPort, ports, heartbeatURL, readinessProbe, livenessProbe image, schedule, suspend, concurrencyPolicy, httpPort, metricsPort
compute minCPU, minMemory, maxCPU, maxMemory, minReplicas, maxReplicas, hpa_enable, hpaCPU, hpaMemory minCPU, minMemory, maxCPU, maxMemory
environment envFrom, env, envList, appSecrets envFrom, env, envList, appSecrets
advanced nginx, command, alerts command, alerts

The vocabulary is intentionally a fixed shared set — cron reuses the same four tabs, placing its schedule fields under runtime and simply omitting the scaling/ingress/probe fields it does not have. No chart-specific categories.

Non-mutable leaf properties (e.g. name) are left unannotated — helm-manager already drops them (it only emits fields with mutable: true or nested mutable properties), so no hidden marker is needed.

Safety

  • Purely additive metadata. category is an unknown (and therefore ignored) JSON Schema keyword under draft-07, so helm lint passes and rendered manifests are byte-identical — zero functional change to deployed services.
  • No version bump / no re-release. helm-manager fetches these schemas raw from the configured branch (raw.githubusercontent.com/zopdev/helm-charts/refs/heads/main/charts/<name>/values.schema.json), not from the packaged chart. Once merged to main the new category keys are live; Chart.yaml versions are unchanged.

Follow-ups (separate PRs, not in this repo)

  • helm-manager — add Category to the FormField model and read props["category"] in createFormFieldFromProperties so the key reaches the UI (backward-compatible; charts without category omit it).
  • frontend (zopday) — rebuild the Helm settings panel as a generic transformer that groups fields into tabs by category.

Annotate each mutable top-level property in the service and cron-job chart
schemas with a `category` key so the ZopDay Helm-import Settings UI can group
fields into tabs, driven entirely by the schema (no hardcoding in the UI).

Shared vocabulary across charts: runtime, compute, environment, advanced.
Cron-specific fields (schedule/suspend/concurrencyPolicy) fall under runtime;
cron simply omits the scaling/ingress/probe fields it does not have.

Purely additive metadata: `category` is an unknown (ignored) JSON Schema
keyword, so `helm lint` passes and rendered manifests are byte-identical.
helm-manager reads these files raw from the branch, so no chart version bump
or re-release is needed.
arunesh-j added 2 commits July 8, 2026 23:19
… settings UI

The container image is managed by the deploy/redeploy pipeline, not hand-edited
in the Helm-import Settings form. Leaving image uncategorized (it stays mutable)
keeps it out of the settings tabs — the UI renders only categorized fields when a
chart declares any categories.
Set mutable:false on fields the ZopDay platform manages outside the chart, so
helm-manager drops them from the schema-driven settings form:
- command / alerts.custom: not used by zop services
- nginx.* (host, annotations, tlsHost, tlsSecretName): ingress is provisioned by
  the opentofu namespace module (ingress_list → nginx Ingress + cert-manager TLS),
  not the chart's nginx block
@arunesh-j arunesh-j merged commit e7df050 into main Jul 10, 2026
1 check passed
@arunesh-j arunesh-j deleted the feat/service-schema-ui-category branch July 10, 2026 09:44
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.

3 participants