Skip to main content

Configuration

Every binary is configured only through environment variables. They are read in the binary's composition root (cmd/<binary>/main.go), with two exceptions read inside adapters: CORS_ALLOWED_ORIGINS (internal/adapters/inbound/http/server.go) and ENVIRONMENT (internal/adapters/outbound/telemetry/telemetry.go). There are no config files and no flags.

An empty value is treated the same as an unset value for every variable below: each binary uses a getenv(key, fallback) helper that returns the fallback when os.Getenv returns "".

pathmgmt (REST API, outbox relay, sweeper)​

Source: cmd/pathmgmt/main.go unless noted.

VariableDefaultRequiredMeaning
HTTP_ADDR:8080noListen address of the REST API (/process-paths, /sites/{siteId}/cpt-schedule, /healthz, /readyz).
DATABASE_URLrequiredyesOLTP Postgres DSN for the runtime pgxpool (10 connections, statement_timeout=5s). Unset stops the boot: DATABASE_URL is required: this context runs on real Postgres (ADR 0037).
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoDSN used only by the golang-migrate step at boot. Set it to a direct (non-PgBouncer) connection when DATABASE_URL goes through PgBouncer in transaction mode, because golang-migrate takes a session-scoped advisory lock (ADR 0015).
MIGRATIONS_PATHmigrationsnoDirectory of the OLTP *.up.sql files, opened as file://<path> (internal/adapters/outbound/postgres/migrate.go). Relative to the working directory.
EVENT_PUBLISHERkafkanoKept only because the chart and warehouse-infra set it: unset or kafka (case-insensitive); log or any other value stops the boot. There is no log publisher and no direct fan-out (ADR 0037).
KAFKA_BROKERSrequiredyesComma-separated broker list for the integration and analytics writers. Unset stops the boot: KAFKA_BROKERS is required: this context runs on real Kafka. There is no localhost:9092 default.
OUTBOX_RELAY_INTERVAL1snoIdle poll interval of the (always-on) outbox relay (Go duration). Malformed, zero or negative values fall back to 1s.
OUTBOX_MAX_ATTEMPTS20noFailed sends after which the outbox relay stops claiming a row (ADR 0030). 0 = unlimited (the pre-cap behaviour); an unparseable or negative value falls back to 20 with a warning. The parked row stays in outbox_events; re-arm it with UPDATE outbox_events SET attempts = 0 WHERE id = ... (Runbook). Only used with the outbox (Postgres + Kafka).
HOUSEKEEPING_INTERVAL1hnoHow often the housekeeping sweeper runs (Go duration). Only used when DATABASE_URL is set. 0 (or any zero/negative duration) disables the sweeper.
IDEMPOTENCY_KEY_TTL24hnoAge after which an idempotency_keys row is deleted by the sweeper. It is also how long a client retry with the same Idempotency-Key is still replayed. 0 keeps the rows forever.
OUTBOX_RETENTION168h (7 days)noAge after which a published outbox_events row is deleted. Unpublished rows are never deleted. 0 keeps published rows forever.
LOG_LEVELinfonodebug, warn (or warning), error; anything else means info. JSON logs to stdout.
OTEL_SERVICE_NAMEprocess-path-managementnoOTel service.name, also the otelchi span/metric server name (DefaultServiceName in internal/adapters/inbound/http/server.go).
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noOTLP/gRPC endpoint (insecure) for traces and metrics. Export is non-blocking: an unreachable Collector only drops telemetry.
SERVICE_VERSIONdevnoOTel service.version. A build-time -ldflags "-X main.version=..." value takes precedence.
ENVIRONMENTlocalnoOTel deployment.environment.name resource attribute (internal/adapters/outbound/telemetry/telemetry.go).
CORS_ALLOWED_ORIGINShttp://localhost:5173,http://localhost:5189noComma-separated browser origins allowed by the CORS middleware (methods GET/POST/PUT/DELETE, headers Content-Type, Authorization, Idempotency-Key, max-age 300 s). Read in internal/adapters/inbound/http/server.go.
Zero durations disable the sweeper

HOUSEKEEPING_INTERVAL, IDEMPOTENCY_KEY_TTL and OUTBOX_RETENTION are parsed by housekeepingDurationEnv (cmd/pathmgmt/main.go), which keeps a zero or negative duration as is: HOUSEKEEPING_INTERVAL=0 turns the whole job off, IDEMPOTENCY_KEY_TTL=0 / OUTBOX_RETENTION=0 turn off that half (ADR 0018). A malformed value falls back to the default (1h / 24h / 168h). The startup line housekeeping sweeper configured logs the values in effect. Before gap fix D15 a zero value silently meant the default.

mcp (MCP server)​

Source: cmd/mcp/main.go unless noted.

VariableDefaultRequiredMeaning
MCP_ADDR:8090noListen address. MCP Streamable HTTP is mounted at /, /mcp and /mcp/; GET /healthz is the probe target.
DATABASE_URLrequiredyesSame OLTP database as pathmgmt. Unset stops the boot: DATABASE_URL is required: this context runs on real Postgres (ADR 0037); there is no in-memory store. Both repositories share one pool of 10 connections.
MIGRATIONS_DATABASE_URLvalue of DATABASE_URLnoSame meaning as for pathmgmt: cmd/mcp also runs migrations/ at boot.
MIGRATIONS_PATHmigrationsnoSame as pathmgmt.
REPORTS_BASE_URLunsetnoBase URL of pathmgmt-reports (for example http://<release>-reports.<ns>.svc.cluster.local:80). When set, the get_catalogue_growth_report tool is registered; when unset only the three OLTP read tools exist.
LOG_LEVELinfonoAs for pathmgmt.
OTEL_SERVICE_NAMEprocess-path-management-mcpnoOTel service.name.
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noAs for pathmgmt.
SERVICE_VERSIONdevnoOTel service.version (no ldflags override in this binary).
ENVIRONMENTlocalnoAs for pathmgmt.

cmd/mcp never reads EVENT_PUBLISHER, KAFKA_BROKERS or the housekeeping variables: it wires only the read use cases.

a2a (A2A agent)​

Source: cmd/a2a/main.go unless noted (ADR 0039).

VariableDefaultRequiredMeaning
A2A_ADDR:8093noListen address. The JSON-RPC endpoint is mounted at / and /a2a, the Agent Card at /.well-known/agent-card.json; GET /healthz is the probe target.
A2A_AGENT_URLrequiredyesAbsolute http(s) URL of the JSON-RPC endpoint, advertised on the Agent Card. Unset or not absolute stops the boot: A2A_AGENT_URL is required: .... The chart defaults it to http://<release>-a2a.<ns>.svc.cluster.local:8093/ (a2a.agentUrl overrides).
DATABASE_URLrequiredyesSame OLTP database as pathmgmt; unset stops the boot as for mcp (ADR 0037).
MIGRATIONS_DATABASE_URL, MIGRATIONS_PATHDATABASE_URL, migrationsnoAs for mcp: cmd/a2a also runs migrations/ at boot.
LOG_LEVEL, OTEL_SERVICE_NAME, OTEL_EXPORTER_OTLP_ENDPOINT, SERVICE_VERSION, ENVIRONMENTinfo, process-path-management-a2a, localhost:4317, dev, localnoAs for mcp. SERVICE_VERSION is also the Agent Card version.

cmd/a2a is read-only like cmd/mcp: it never reads EVENT_PUBLISHER or KAFKA_BROKERS, writes no outbox row and calls no other context.

pathmgmt-projector (analytics writer)​

Source: cmd/pathmgmt-projector/main.go.

VariableDefaultRequiredMeaning
ANALYTICS_DATABASE_URLnoneyesRead-write DSN of the analytical database. The process exits with ANALYTICS_DATABASE_URL is required when it is unset. Pool: 5 connections, statement_timeout=10s (internal/adapters/outbound/analyticsstore/pool.go).
ANALYTICS_MIGRATIONS_PATHmigrations/analyticsnoDirectory of the analytical *.up.sql files, applied at boot (the projector owns this schema).
KAFKA_BROKERSrequiredyesComma-separated broker list for the warehouse.process-path-management.analytics reader and the .dlq writer. Unset stops the boot (KAFKA_BROKERS is required: this context runs on real Kafka); no localhost:9092 default.
ADMIN_ADDR:8091noListen address of the admin server (/healthz, /readyz).
LOG_LEVELinfonodebug, warn/warning, error; anything else means info.
OTEL_SERVICE_NAMEpathmgmt-projectornoOTel service.name.
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noAs for pathmgmt.
SERVICE_VERSIONdevnoOTel service.version.
ENVIRONMENTlocalnoAs for pathmgmt.

Since gap fix D21 (ADR 0029) the projector calls telemetry.Setup like pathmgmt. It exits 1 when its analytics consumer loop stops on its own (gap fix D13), so Kubernetes restarts it instead of leaving a Ready pod that projects nothing.

pathmgmt-reports (analytics reader)​

Source: cmd/pathmgmt-reports/main.go.

VariableDefaultRequiredMeaning
ANALYTICS_DATABASE_URLnoneyesDSN of the analytical database. Opened read-only (default_transaction_read_only=on, 5 connections, statement_timeout=15s). Exits with ANALYTICS_DATABASE_URL is required when unset. In the chart this is fed from the secret key ANALYTICS_READER_DATABASE_URL.
HTTP_ADDR:8092noListen address of /reports/catalogue-growth, /reports/catalogue-growth/freshness and /healthz.
LOG_LEVELinfonoAs for the projector.
OTEL_SERVICE_NAMEpathmgmt-reportsnoOTel service.name.
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317noAs for pathmgmt.
SERVICE_VERSIONdevnoOTel service.version.
ENVIRONMENTlocalnoAs for pathmgmt.

Like the projector, the reports binary calls telemetry.Setup (gap fix D21). Its routes are specified in apis/openapi-reports.yaml.

pathmgmt-seed (catalogue seed hook Job, ADR 0044)​

Source: cmd/pathmgmt-seed. Run by the chart's catalogue-seed-job.yaml hook Job (post-install/post-upgrade) only when catalogueSeed.enabled is true (default false, until an image carrying the binary is live). It embeds catalogue/paths.json, waits for the service's GET /readyz (bounded, 120 s), converges the declared catalogue over the REST API with the semantics of scripts/seed_catalogue.py and exits 0 only when every entry is converged; a non-zero exit fails the Helm release. Stdlib only: no Postgres, no Kafka, no OpenTelemetry.

VariableDefaultRequiredMeaning
SEED_BASE_URLnoneyesBase URL of this release's own process-path-management Service (the chart renders http://<fullname>:<service.port>). Must be absolute http(s); unset or malformed exits at boot: SEED_BASE_URL is required .... There is no localhost default on purpose: the binary is a cluster Job, not a developer tool.
LOG_LEVELinfonoAs for pathmgmt.

Boot-time retry​

Every binary dials Postgres eagerly at boot (migrations, then pool.Ping) through bootretry.Do (internal/adapters/outbound/bootretry/retry.go): 5 attempts with exponential backoff starting at 1 s. The process sleeps only between attempts (1 + 2 + 4 + 8 s), so a database that never answers fails the boot after roughly 15 s plus the dial time of each attempt. This is not configurable.

How the Helm chart maps values to variables​

Chart: charts/process-path-management. The api Deployment mounts the chart ConfigMap with envFrom: configMapRef (gap fix D14: every ConfigMap key is read by cmd/pathmgmt) and also sets most variables inline (env:), which win over the ConfigMap for the same key; the ConfigMap's checksum annotates the api pod so a change rolls it. The mcp, projector and reports Deployments set their variables inline only and do not mount the ConfigMap. charts/process-path-management/tests/render_test.sh (CI job chart-tests) asserts this wiring.

Helm valueVariableBinary
config.httpAddr (:8080)HTTP_ADDRpathmgmt
config.migrationsPath (migrations)MIGRATIONS_PATHpathmgmt, mcp
config.logLevel (info)LOG_LEVELall four
config.corsAllowedOriginsCORS_ALLOWED_ORIGINSpathmgmt
config.eventPublisher (kafka, the only accepted value)EVENT_PUBLISHERpathmgmt
config.outboxMaxAttempts ("20")OUTBOX_MAX_ATTEMPTSpathmgmt
config.housekeeping.interval / .idempotencyKeyTtl / .outboxRetentionHOUSEKEEPING_INTERVAL / IDEMPOTENCY_KEY_TTL / OUTBOX_RETENTIONpathmgmt
environment (local)ENVIRONMENTall four (always set, independent of otel.enabled)
image.tag or chart appVersionSERVICE_VERSIONall four (always set)
otel.endpoint, otel.serviceName (when otel.enabled)OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_SERVICE_NAMEall four; mcp, projector and reports get the fixed names process-path-management-mcp, pathmgmt-projector, pathmgmt-reports
secret database.existingSecretKey (DATABASE_URL)DATABASE_URLpathmgmt, mcp (always; the render fails without database.url or database.existingSecret)
secret database.migrationsExistingSecretKey (MIGRATIONS_DATABASE_URL, optional: true)MIGRATIONS_DATABASE_URLpathmgmt, mcp
kafka.brokers (required, no default)KAFKA_BROKERSpathmgmt, projector (always; the render fails when empty)
mcp.httpAddr (:8090)MCP_ADDRmcp
mcp.reportsBaseUrl, else the in-cluster reports Service when analytics.enabledREPORTS_BASE_URLmcp
analytics.projector.adminAddr (:8091)ADMIN_ADDRprojector
analytics.migrationsPath (migrations/analytics)ANALYTICS_MIGRATIONS_PATHprojector
analytics secret key ANALYTICS_DATABASE_URLANALYTICS_DATABASE_URLprojector
analytics secret key ANALYTICS_READER_DATABASE_URLANALYTICS_DATABASE_URLreports
analytics.reports.httpAddr (:8092)HTTP_ADDRreports

extraEnv (api) and mcp.extraEnv append arbitrary variables, which is how you set OUTBOX_RELAY_INTERVAL in a cluster: the chart has no dedicated value for it.

The chart refuses to render, naming the value, without database.url or database.existingSecret, without kafka.brokers, with kafka.enabled=false (the key is still accepted as true because warehouse-infra sets it, but it is no longer a switch), with config.eventPublisher other than kafka, with an EVENT_PUBLISHER or *_MODE entry in extraEnv, and with a terminationGracePeriodSeconds under 20 (ADR 0037).