Skip to content

Operations

1. Deployment

PropertyValue
Imageregistry/pricing:<tag>
Container Port3000 (external 31070)
ProbesGET /healthz (live), GET /readyz (ready)
Snowflake ID7 (APP_ENV_NODE_ID)
Run modesapi (REST + CDC consumer at boot) · migrate (run-once seed)
Dependencies at bootPostgreSQL (pricing schema), Redis (auth cache), Kafka (binding throws if APP_ENV_KAFKA_BROKERS empty)

Kafka is a hard boot dependency: ApplicationKafkaComponent.binding() throws InternalServerError if brokers are unset, even though pricing only consumes (does not produce). A pod with no reachable broker will not start.

Traefik labels

yaml
labels:
  - "traefik.enable=true"
  - "traefik.http.routers.pricing.rule=PathPrefix(`/v1/api/pricing`)"
  - "traefik.http.services.pricing.loadbalancer.server.port=3000"

2. Observability

SignalSourceWhere to look
Logsstdout (IGNIS structured key-value)kubectl logs <pod> / Loki
HealthGET /healthz, GET /readyzGateway portal
OpenAPIGET /doc (Scalar), /doc/openapi.jsonLive API explorer

Key log markers

MarkerSourceMeaning
SKIP — FareSet already existsPricingWorkerServiceCDC idempotency hit (expected on RETRIEVE replays)
DONE FareSet + SALE Fare seeded via CDCPricingWorkerServiceNew variant priced
DONE FBT override seededPricingWorkerServiceFBT override child fare created
Received message | Topic: %sApplicationKafkaComponentCDC message ingested
Unknown topic — subscribed but no handlerApplicationKafkaComponentMisconfigured subscription

3. Security

ConcernMitigation
AuthNJWT (ES256, JWKS from identity); BASIC for service-to-service (sale → pricing)
AuthZCasbin via PolicyDefinition; resource-based per controller; cached in Redis
SecretsK8s Secret mounted as env (DB URL, Kafka SASL, basic-auth)
TLSTerminated at gateway; Kafka SASL optional
Network policyCilium — allow gateway + sale + Kafka + Postgres + Redis only
Soft-deletedeletedAt — no hard-delete by default

4. Runbook

4.1 Alert classes

AlertTriggerCheckFixEscalate
pricingHighErrorRate5xx >5% over 5mlogs level=errorinspect calculator errors / DB reachabilityon-call backend
pricingCheckoutRejectsspike in 4xx on /simulation*logs for "no active fare set"confirm CDC worker is seeding FareSetson-call backend
pricingCdcStalledCDC offset not advancingbroker reachability + consumer group lagrestart pod / check Debeziumon-call SRE
pricingBootCrashLooppod restartslogs Cannot start Kafka — env ... emptyset APP_ENV_KAFKA_BROKERSon-call SRE

4.2 Common operations

OperationCommand / action
Tail logskubectl logs -n <ns> -f deploy/pricing
Re-seed a variant's fareRe-emit its ProductVariant row (CDC RETRIEVE) — worker is idempotent
Inspect winning farePOST /simulation-v2/calculate with the variant + context; read the fareSource on the PRICE applied-rule
Run migration manuallybun run migrate (in pod) — seeds permissions + role-permissions
Verify CDC consumptionCheck consumer group lag for PRICING_CONSUMER_GROUP on PRODUCT_VARIANT

DB writes / migrations are operator-run. Diagnose read-only via the calculate endpoints.

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.