warehouse-systems fleet · executive briefing

warehouse-infra

One script puts the whole warehouse platform onto an existing k3s cluster
eight capabilitys11 recorded decisions

This project is a domain-driven design study. It is not associated with, endorsed by or affiliated with any company, and it uses no company's code, data, logos or trademarks. All names, figures and examples are illustrative or synthetic. · November 2026

the short version · read this if nothing else

Warehouse-infra gives all 45 registered applications one reproducible runtime with data and dashboards

1

Adding a context is one registry entry plus its helm-values; each service keeps its own chart.

2

Images are built on GitHub and pinned: nothing is built locally and an unpinned app never deploys.

3

Traces, metrics and logs meet in Grafana, with a dashboard for each context.

The ask

Wire an alert receiver, redo the connection budget for 40 databases, and derive the chart lists from the registry.

why it exists

Every team needs the same warehouse to run, reproducibly

Give the warehouse-systems estate a reproducible runtime on an existing k3s cluster (kube context k3s-multipass, ADR 0011): scripts/up.sh applies three Terraform layers — cluster, platform (Postgres + PgBouncer, Kafka, Istio, ArgoCD, observability, Kong and an Nginx web gateway) and one state per application…

Today

Three Terraform layers, a shared Postgres, Kafka, two gateways and an observability plane host the fleet; ArgoCD installs each chart.

The catch

Postgres, PgBouncer and Kafka are single points of failure, alerts reach nobody, and hand-kept lists drift behind the registry.

what it does

One script delivers the cluster, data, events and dashboards

One-script platform

One script applies the cluster, platform and per-application Terraform layers.

One application registry

Each entry in apps.yaml is one module instance and one ArgoCD application.

Images from GitHub only

Arm64 images are built on GitHub and pinned; apply never builds locally.

Two separate gateways

Kong serves APIs, Nginx serves screens, and a test keeps the two apart.

Shared data plane

One Postgres with a database and role per application, pooled, plus one Kafka broker.

Observability plane

One collector feeds Jaeger, Prometheus and Loki into Grafana, with 46 dashboards.

the shared language

One registry file decides which contexts the platform runs

THE LANGUAGEOF THE DOMAINApplication registryLayers and statesImage lockHelm valuesProcess-path catalogueTwo-edge exposure topologyEvent planeAnalytics data product
RESTNo REST of its own — publishes the route table: Kong…
MCPNo MCP server of its own: charts deploy <service>-mcp…
how it is built

Terraform builds it, ArgoCD keeps it, Kong and Nginx expose it

BUILDING BLOCKS · TOP-LEVEL COMPOSITIONterraform/{00-cluster,10-…modules/{application,data…apps.yamltargets/k3s.{images.yaml…TECHNOLOGY STACKTerraform >= 1.5 (layers…k3s cluster k3s-multipass (2…ArgoCD (chart 7.7.11, auth…PostgreSQL 17.5 (Bitnami chart…Kafka 4.0.0 (Bitnami chart…Istio 1.30.3 (control plane…Kong chart 3.4.1 (DB-less…OpenTelemetry Collector (chart…GitHub Actions: ci.yml…Python stdlib scripts, shell…
how we know it is healthy

Grafana ties metrics, traces and logs together, but alerts go nowhere

Every contextOTLP · stdout · /metricsOTel Collectorone ingest pointAlloytails stdout, zero codeJaeger v2tracesPrometheusmetrics + exemplarsLokilogsGrafanafleet, Kong, logs + per-context boardsPlus Kiali (mesh topology), Kong Prometheus plugin (edge RED metrics) and metrics-server (makes HPAs work)
by the numbers

31 alert rules, 46 dashboards and 11 decisions describe the platform

11
Architecture decisions
#33 of 45 in the fleet

Ranked against all 45 briefed repositories (dot = one repository, highest on the left).

One-command workflows (make)

helptf-fmt-checktf-validatehelm-lintshellcheckchart-selector-checkobservability-checkalert-rules-checkseed-scripts-testmcp-conformance-testcheckcheck-allcheck-fastsecret-files-check
competitive position

Against the market leaders, we cover part of the ground

PartialPlatform, Observability & Delivery vs Blue Yonder, Manhattan (zero-downtime CD, multi-AZ failover), SSI Schäfer (KPI telemetry)

Where we match or lead

  • Open, correlated telemetry: OTel Collector, Jaeger, Prometheus, Grafana, Loki + Alloy, Kiali, Kong metrics
  • Metric exemplars link to traces; log lines link to traces (two-way navigation)
  • Generated per-context Grafana dashboards: edge RED, business counters, Go runtime, logs
  • Harness engineering: mutation gates, architecture fitness tests, black-box e2e and soak

Gaps to close

  • High No alerting: Alertmanager disabled; no SLOs or error budgets
  • High Telemetry is ephemeral: Jaeger in-memory, Prometheus 24 h emptyDir, Loki no persistence
  • High Local kind cluster: no HA, multi-AZ failover or zero-downtime rollout evidence
  • Medium /healthz does not check the database

Leader capabilities are vendor-published; gaps reflect repo docs reviewed in November 2026.

what comes next

Next: settle one decision, fix the registry gaps, then the pooling

NOW1Settle ADR 0009 onnetwork-fulfillmentSettle ADR 0009(network-fulfillmentlive against thein-cluster retailnetwork): the indexstill lists it asProposed (2026-10-24)NEXT2Bring the chartlint list in linewith the registryBring the MakefileCHARTS list (43 charts)in line withterraform/apps.yaml (45applications):customer-returns andnetwork-fulfillment arenot helm-linted; the …NEXT3Derive chart anddashboard listsfrom the registryDerive the chart listand the dashboardcontexts from theregistry instead ofhand-editing them (theMakefile says to keep itin sync with apps.yaml)LATER4Redo the PgBouncerconnection budgetRe-do the PgBouncerconnection budget:pgbouncer.tf budgets 14databases (168 of 250connections), apps.yamlnow has 40database-backedapplicationsLATER5Pool analyticsconnections viaPgBouncerRoute analytics DBconnections throughPgBouncer and considerPgBouncer replicas > 1plus aPodDisruptionBudget ifreplica counts ornode-failure tolerance …
what could go wrong · and what we do about it

Our biggest risk is one exposure mistake publishing open data

Auth is off by decision; edges must stay loopback-only

Every REST and MCP endpoint and ArgoCD are unauthenticated BY DECISION (auth reverted 2026-09-11)…

→

Both edges stay loopback-bound and the exposure-policy test keeps them separate.

Postgres, PgBouncer and Kafka are single points

Single Postgres, single PgBouncer replica and a single Kafka broker are deliberate single points of failure…

→

Deliberate single points; PgBouncer replicas and a disruption budget are noted if needed.

Deploys depend on GitHub image builds and pins

Deploys depend on GitHub: an image reaches the cluster only after publish-images ran on the merged develop and the pin is committed…

→

No mitigation on the roadmap yet: this one needs an owner.

Databases outlive removed apps; manual cleanup needed

Roles and databases come from Jobs and survive removal of an application: dropping a database is a manual step needing the owner's OK…

→

No mitigation on the roadmap yet: this one needs an owner.

the decision we need

Wire an alert receiver, redo the connection budget for 40 databases, and derive the chart lists from the registry.

WHAT ISThree Terraform layers, a sharedPostgres, Kafka, two gateways and anobservability plane host the fleet;ArgoCD installs each chart.THE CATCHPostgres, PgBouncer and Kafka aresingle points of failure, alertsreach nobody, and hand-kept listsdrift behind the registry.WHAT COULD BEAlerts reach a person, theconnection budget matches theregistry, and chart and dashboardlists derive from it automatically.
Why it matters

Warehouse-infra gives all 45 registered applications one reproducible runtime with data and dashboards

appendix · for the engineers in the room

The fine print: how it is put together

StyleKubernetes platform-as-code on an existing k3s cluster — Terraform in three layers plus per-application Helm values, GitOps via ArgoCD, Kong and Nginx edges…
Layoutterraform/{00-cluster,10-platform,20-apps}/ + modules/{application,database}/ + apps.yaml + targets/k3s.{images.yaml,tfvars.json} + alerting/ + dashboards/ + templates/…
StorageSingle Bitnami PostgreSQL 17.5 release in ns warehouse-data (max_connections=250): one database + owner role per application…
Testingmake check mirrors ci.yml: terraform fmt -check, terraform validate in the three layers, helm lint on the 43 charts of the Makefile CHARTS list, shellcheck…
RESTNo REST of its own — publishes the route table: Kong (localhost:8000) strips /api/<context> and proxies through Gateway API HTTPRoutes to each…
Terraform >= 1.5k3s cluster k3s-multipassArgoCDPostgreSQL 17.5Kafka 4.0.0Istio 1.30.3Kong chart 3.4.1OpenTelemetry CollectorGitHub ActionsPython stdlib scripts