Skip to main content

Configuration

All configuration is environment variables, read once at boot; a missing mandatory variable is a boot error naming it (every problem is reported at once, before a connection opens or the listener binds). There is no config file and no *_MODE toggle anywhere — the chart refuses to render one.

cmd/api​

VariableRequiredDefaultMeaning
DATABASE_URLyes—Postgres DSN. Real Postgres only; no in-memory mode
KAFKA_BROKERSyes—comma-separated broker list. Real Kafka only
HTTP_ADDRno:8080REST listen address
LOG_LEVELnoinfodebug | info | warn (warning accepted) | error, JSON to stdout
OUTBOX_RELAY_INTERVALno1sGo duration or plain seconds; malformed/non-positive falls back with a WARN
OUTBOX_MAX_ATTEMPTSno20times one outbox row may fail before the relay excludes it (ADR 0005); 0 = unlimited
SLA_SWEEP_INTERVALno1mSLA sweeper tick; malformed/non-positive falls back with a WARN (a typo never silently disables it)
SHUTDOWN_DRAIN_DELAYno5swait after /readyz flips before the listener closes; 0 disables

The consumer-group variables​

All eleven are mandatory even though each names a group the binary's consumers use — the boot check fails closed so a deployment cannot go live missing a pinned group id. They are stable names, fixed in .claude/rules/integration-events.md; renaming one in a running environment re-reads the topic from the start.

VariableConsumes
FULFILLMENT_EXCEPTIONS_CONSUMER_GROUPwarehouse.fulfillment.events
WORK_PLANNING_EXCEPTIONS_CONSUMER_GROUPwarehouse.work-planning.events
NETWORK_FULFILLMENT_EXCEPTIONS_CONSUMER_GROUPwarehouse.network-fulfillment.events
ORDER_CORRELATION_CONSUMER_GROUPwarehouse.order-management.events (auto-resolve correlation)
INVENTORY_EXCEPTIONS_CONSUMER_GROUPwarehouse.inventory.events
HELD_STOCK_EXCEPTIONS_CONSUMER_GROUPwarehouse.inventory.events — the topic's second group, held-stock facts (ADR 0012)
RETURNS_EXCEPTIONS_CONSUMER_GROUPwarehouse.returns-processing.events
CARTON_DISCREPANCY_CONSUMER_GROUPwarehouse.inbound-receiving.events (ADR 0006)
YARD_MANAGEMENT_EXCEPTIONS_CONSUMER_GROUPwarehouse.yard-management.events (ADR 0010)
DOCK_SCHEDULING_EXCEPTIONS_CONSUMER_GROUPwarehouse.dock-scheduling.events (ADR 0010)
OUTBOUND_SHIPPING_EXCEPTIONS_CONSUMER_GROUPwarehouse.outbound-shipping.events (ADR 0011)

cmd/mcp​

VariableRequiredDefaultMeaning
DATABASE_URLyes—same Postgres as cmd/api
MIGRATIONS_DATABASE_URLnoDATABASE_URLdirect (non-pooled) DSN used only for the boot migrations — golang-migrate's session-scoped pg_advisory_lock cannot pass through PgBouncer transaction pooling
MCP_ADDRno:8090Streamable HTTP listen address (paths / and /mcp, plus open GET /healthz)
LOG_LEVELnoinfoas above

The MCP binary reads no Kafka variable: it never dials Kafka, never starts the relay, the consumers or the sweeper.

cmd/a2a​

VariableRequiredDefaultMeaning
DATABASE_URLyes—same Postgres as cmd/api
MIGRATIONS_DATABASE_URLnoDATABASE_URLdirect (non-pooled) DSN used only for the boot migrations, as for cmd/mcp
A2A_AGENT_URLyes—absolute http(s) URL of this agent's JSON-RPC endpoint, advertised on the Agent Card (the chart defaults it to the in-cluster Service DNS http://<release>-a2a.<ns>.svc.cluster.local:8093/); the binary refuses to boot without it
A2A_ADDRno:8093listen address (JSON-RPC at / and /a2a, the card at /.well-known/agent-card.json, open GET /healthz)
LOG_LEVELnoinfoas above

Like the MCP binary, the A2A agent is read-only and reads no Kafka variable: it never dials Kafka, never starts the relay, the consumers or the sweeper (ADR 0007).

cmd/exceptions-projector​

VariableRequiredDefaultMeaning
ANALYTICS_DATABASE_URLyes—the analytical Postgres DSN (direct, the projector runs the embedded analytical migrations through it); the projector never opens the OLTP database
KAFKA_BROKERSyes—comma-separated broker list
ANALYTICS_CONSUMER_GROUPyes—the projector's fixed consumer group, no default in the binary
ADMIN_ADDRno:8091/healthz and /readyz listen address
LOG_LEVELnoinfoas above

cmd/exceptions-reports​

VariableRequiredDefaultMeaning
ANALYTICS_DATABASE_URLyes—the analytical Postgres DSN, opened through a read-only pool; the reader never opens the OLTP database or Kafka
HTTP_ADDRno:8092reports API listen address
LOG_LEVELnoinfoas above

Observability variables (all five binaries)​

Every binary reads the same four variables; the chart renders them on every component that runs a binary (see Observability and ADR 0014). None is required: with nothing set the binary exports to localhost:4317, which drops the telemetry when no Collector listens, and never blocks or fails to boot.

VariableDefaultMeaning
OTEL_EXPORTER_OTLP_ENDPOINTlocalhost:4317Collector OTLP/gRPC endpoint, host:port or a full URL (https:// keeps TLS)
OTEL_SERVICE_NAMEper binary: exception-management (api), exception-management-mcp, exception-management-a2a, exception-management-projector, exception-management-reportsservice.name of every span and metric
SERVICE_VERSIONdevservice.version
ENVIRONMENTlocaldeployment.environment.name (read by telemetry.Setup)

Helm​

charts/exception-management/values.yaml maps every key 1:1 to an env var (config.outboxRelayInterval → OUTBOX_RELAY_INTERVAL, config.slaSweepInterval → SLA_SWEEP_INTERVAL, …) and the chart refuses to render without database.url / database.existingSecret and kafka.brokers. The observability variables come from environment (ENVIRONMENT) and otel.* (otel.endpoint → OTEL_EXPORTER_OTLP_ENDPOINT, otel.serviceName → OTEL_SERVICE_NAME with -mcp, -a2a, -projector or -reports appended per component, otel.serviceVersion → SERVICE_VERSION, falling back to image.tag and then the chart's appVersion); otel.enabled=false stops the chart rendering the endpoint and the service name. An extraEnv entry naming one of the four is refused at render time. The MCP server is a separate component, disabled by default:

mcp:
enabled: true # component=mcp, Service <fullname>-mcp:8090
a2a:
enabled: true # component=a2a, Service <fullname>-a2a:8093 (A2A_AGENT_URL defaults to its DNS name)

Probe wiring and the shutdown budget are on the Runbook page.