Skip to content

Operations

1. Deployment

PropertyValue
Imageregistry/outreach:<tag>
Replicas (default)1 (low traffic; stateless API)
Resources (req/lim)small — CPU/memory per cluster baseline
HPA targetCPU (optional; traffic is bursty on campaigns)
ProbesGET /healthz (live), GET /readyz (ready)
Snowflake ID10 (APP_ENV_NODE_ID)
Migration modebun run migrate:dev / boot job; seeds are idempotent (alwaysRun)

Traefik labels

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

Multiple replicas are safe: the WebSocket emitter is Redis-backed, so any replica can broadcast to all subscribers. Snowflake worker 10 must be unique per running process if scaling beyond one — coordinate APP_ENV_NODE_ID.

2. Observability

SignalSourceWhere to look
Logsstdout (structured key-value)kubectl logs <pod> / Loki
MetricsPrometheus /metrics (if enabled)Grafana
Tracesno-op (no tracer wired)
HealthGET /healthz, GET /readyzGateway portal
API specGET /v1/api/outreach/doc/openapi.json, /doc (Scalar)Browser

Key log fields

FieldSourceNotes
requestIdheader X-Request-IdPropagated cross-service
inquiryIdWS notifyInquiry SENT | inquiryId: %s | rooms: %j
roomsWS notifyTarget observation rooms

3. Security

ConcernMitigation
AuthNJWT (ES256, JWKS from identity) on CRUD + statistics
Public endpoints/inquiries/submit, /subscribers/subscribe, /subscribers/unsubscribe are unauthenticated by design
Abuse / spamNo built-in rate limit — rely on Traefik middleware + WAF in front of public submit/subscribe
Unsubscribe tokenSnowflake unsubscribeToken, hidden from API responses; only valid token can deactivate — see ADR-0001
AuthZCasbin permissions seeded for OWNER/EMPLOYEE/CASHIER
SecretsK8s Secret mounted as env (DB, Redis password)
TLSTerminated at gateway
Network policyCilium — allow gateway + identity JWKS + Redis + Postgres
Soft-deletedeletedAt; no hard-delete by default

4. Runbook

4.1 Alert classes

AlertTriggerCheckFixEscalate
outreachHighErrorRate5xx >5% over 5mlogs level=errorinspect DB / Redis connectivityon-call backend
outreachSubmitFloodsubmit RPS spikeTraefik metricsenable/raise rate limit at gatewayon-call SRE
outreachWSNotReadyrepeated Socket event service not ready warnsRedis healthrestart pod / check Redison-call backend

4.2 Common operations

OperationCommand
Tail logskubectl logs -n <ns> -f deploy/outreach
Re-run seedsrun migration (seeds alwaysRun, idempotent) — operator-run only
Verify spec liveopen /v1/api/outreach/doc
Spam triagemark offending inquiries CANCELLED via admin CRUD

No Kafka replay and no BullMQ queue exist for this service — there is nothing to drain or replay.

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