Production-ready

The checklist the cart and the catalog meet, and how they meet each item, with the page that builds it. Check your own API against it.

The cart and the catalog meet each item. Check your own API against them:

ItemHowWhere
Every setting sourced and checked; a bad one exits 78, naming its variableconfig.Struct and the packages’ checks, in the cart, the catalog and migrateThe cart’s settings, The other checks, migrate’s settings
No secret in the environment, the logs or the spansthe database URLs and the keys are files, read through s.Host.FS. No token is recorded, which a test of the App checksThe secrets, as files, Their log records
Certificates renewed without a restartinternal/certfile, on the kubernetes.io/tls Secrets that cert-manager renews. Its unit tests rewrite the files under a running serverThe certificates, read again when renewed
Two replicas of each servicea PodDisruptionBudget of minAvailable: 1, and a rolling update of maxUnavailable: 0The Deployments, The disruption budgets
Ready only once it has reached its dependencies, and still ready through their outagesthe latching monitors, on PostgreSQL and on the catalog’s readinessReadiness, The catalog’s probes, The cart’s readiness
A rollout loses no requesthttpserver.Main’s 5s drain, in both services, and a terminationGracePeriodSeconds above the drain, the grace period and the telemetry’s shutdownThe drain
The schema is current before the code that needs it servesthe migrate init container, under tern’s lock, with backwards-compatible migrationsThe migrations, The job, The init container
Least privilegethe services’ roles read and write their tables and change no schema. A non-root, read-only container. No service account token mountedThe grant, The roles, The Deployments
A caller sees only their own cartsthe owner, from the token’s subject, and a 404 for anyone elseA cart’s owner
Prices can’t be set by a clientthe cart asks the catalog for each price, over mTLS. Only a token with catalog:write changes oneThe bodies, mTLS, The operations
Observabletraces across both services, logs and metrics over OTLP, the alerts in deploy/alerts.yaml, deploy/dashboard.json, and alerts on each Deployment from the Collector’s Kubernetes cluster receiverObserving
Failures say whya 503 for a dependency that is down, a 422 for an unknown product, and problem details throughoutThe answers, The catalog’s answers
Failures are rehearsedthe failure injection cases, in CI, and against an end user’s staging through its own TargetThe shared cases, The failure injection cases
Safe by defaultFAULT_TRUST_SCOPE empty, so no scenario is trusted. The OpenAPI document is the only open path besides the probesTrustScenario, Requiring it