From fe40326723fd0808a97ffb32ac76f972780e9014 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Wed, 28 Jan 2026 11:50:16 +0100 Subject: [PATCH] Adapt configSchema to match Config struct Remove cc-backend fields that don't exist in this project and add missing fields (debug object with dump-to-file/gops, jwt-public-key). Co-Authored-By: Claude Opus 4.5 --- internal/config/schema.go | 120 ++++++-------------------------------- 1 file changed, 18 insertions(+), 102 deletions(-) diff --git a/internal/config/schema.go b/internal/config/schema.go index 64b02f1..29e3723 100644 --- a/internal/config/schema.go +++ b/internal/config/schema.go @@ -10,126 +10,42 @@ var configSchema = ` "type": "object", "properties": { "addr": { - "description": "Address where the http (or https) server will listen on (for example: 'localhost:80').", - "type": "string" - }, - "api-allowed-ips": { - "description": "Addresses from which secured API endpoints can be reached", - "type": "array", - "items": { - "type": "string" - } - }, - "user": { - "description": "Drop root permissions once .env was read and the port was taken. Only applicable if using privileged port.", - "type": "string" - }, - "group": { - "description": "Drop root permissions once .env was read and the port was taken. Only applicable if using privileged port.", - "type": "string" - }, - "disable-authentication": { - "description": "Disable authentication (for everything: API, Web-UI, ...).", - "type": "boolean" - }, - "embed-static-files": { - "description": "If all files in web/frontend/public should be served from within the binary itself (they are embedded) or not.", - "type": "boolean" - }, - "static-files": { - "description": "Folder where static assets can be found, if embed-static-files is false.", - "type": "string" - }, - "db": { - "description": "Path to SQLite database file (e.g., './var/job.db')", - "type": "string" - }, - "enable-job-taggers": { - "description": "Turn on automatic application and jobclass taggers", - "type": "boolean" - }, - "validate": { - "description": "Validate all input json documents against json schema.", - "type": "boolean" - }, - "session-max-age": { - "description": "Specifies for how long a session shall be valid as a string parsable by time.ParseDuration(). If 0 or empty, the session/token does not expire!", + "description": "Address where the http (or https) server will listen on (for example: 'localhost:8080').", "type": "string" }, "https-cert-file": { - "description": "Filepath to SSL certificate. If also https-key-file is set use HTTPS using those certificates.", + "description": "Filepath to SSL certificate. If also https-key-file is set, use HTTPS.", "type": "string" }, "https-key-file": { - "description": "Filepath to SSL key file. If also https-cert-file is set use HTTPS using those certificates.", + "description": "Filepath to SSL key file. If also https-cert-file is set, use HTTPS.", "type": "string" }, - "redirect-http-to": { - "description": "If not the empty string and addr does not end in :80, redirect every request incoming at port 80 to that url.", + "user": { + "description": "Drop root permissions once the port was taken. Only applicable if using privileged port.", "type": "string" }, - "stop-jobs-exceeding-walltime": { - "description": "If not zero, automatically mark jobs as stopped running X seconds longer than their walltime. Only applies if walltime is set for job.", - "type": "integer" + "group": { + "description": "Drop root permissions once the port was taken. Only applicable if using privileged port.", + "type": "string" }, - "short-running-jobs-duration": { - "description": "Do not show running jobs shorter than X seconds.", - "type": "integer" - }, - "emission-constant": { - "description": ".", - "type": "integer" - }, - "cron-frequency": { - "description": "Frequency of cron job workers.", + "debug": { + "description": "Debug options.", "type": "object", "properties": { - "duration-worker": { - "description": "Duration Update Worker [Defaults to '5m']", + "dump-to-file": { + "description": "Path to file for dumping internal state.", "type": "string" }, - "footprint-worker": { - "description": "Metric-Footprint Update Worker [Defaults to '10m']", - "type": "string" + "gops": { + "description": "Enable gops agent for debugging.", + "type": "boolean" } } }, - "enable-resampling": { - "description": "Enable dynamic zoom in frontend metric plots.", - "type": "object", - "properties": { - "minimum-points": { - "description": "Minimum points to trigger resampling of time-series data.", - "type": "integer" - }, - "trigger": { - "description": "Trigger next zoom level at less than this many visible datapoints.", - "type": "integer" - }, - "resolutions": { - "description": "Array of resampling target resolutions, in seconds.", - "type": "array", - "items": { - "type": "integer" - } - } - }, - "required": ["trigger", "resolutions"] - }, - "api-subjects": { - "description": "NATS subjects configuration for subscribing to job and node events.", - "type": "object", - "properties": { - "subject-job-event": { - "description": "NATS subject for job events (start_job, stop_job)", - "type": "string" - }, - "subject-node-state": { - "description": "NATS subject for node state updates", - "type": "string" - } - }, - "required": ["subject-job-event", "subject-node-state"] + "jwt-public-key": { + "description": "Ed25519 public key for JWT verification.", + "type": "string" } } }`