caelum0x 2d2b15c7fe feat: full guardrail-alpha system + CLI modularization + Vercel deploy config
- Rust engine: real bootstrap/wiring preflight (guardrail-agent), execution layer (retry/router/pre-trade/post-trade/reconciliation), guardrail-doctor diagnostics with allowlist-drift guard.

- guardrail-cli: extracted pure helpers into util.rs (split in progress).

- 6 Track-2 skills + ensemble; python-lab analytics (regime/drawdown/montecarlo/dossier/ensemble/journal/seed); clients (ts/py/go/mcp/langchain/web-lite/proof-verifier); alert relay; scenarios; helm/k8s/compose; docs.

- dashboard/vercel.json + docs/VERCEL_DEPLOY.md for Vercel deployment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 11:02:22 +03:00
..

Kubernetes deployment

Production manifests for Guardrail Alpha. For local/dev, prefer docker compose (see repo root docker-compose.yml).

Topology

The agent and its read-only sidecars (api, exporter, monitor) share the SQLite event log + run report, so they run as one pod (guardrail-core) with a shared data volume. The agent is the sole writer — never scale it horizontally (replicas: 1, Recreate). The dashboard runs as its own Deployment and talks to the API over the guardrail-api Service.

Resource Purpose
namespace.yaml guardrail namespace
core-deployment.yaml agent + api + exporter + monitor (shared data)
services.yaml guardrail-api (8080), guardrail-exporter (9100)
dashboard.yaml dashboard Deployment + Service (3000)
kustomization.yaml bundles the above

Build & push images

for s in agent api exporter monitor dashboard; do
  docker build -f infra/Dockerfile.$s -t guardrail/$s:latest .
  docker push guardrail/$s:latest   # to your registry
done

Apply

kubectl apply -k deploy/k8s/
kubectl -n guardrail get pods
kubectl -n guardrail port-forward svc/guardrail-api 8080:8080
kubectl -n guardrail port-forward svc/guardrail-dashboard 3000:3000

Notes

  • The data volume is an emptyDir (ephemeral). Swap it for a PersistentVolumeClaim to retain the event log across restarts.
  • Mount real configs/ and secrets via a ConfigMap/Secret (the deployment references an optional guardrail-configs ConfigMap).
  • Prometheus + Grafana: deploy via their upstream Helm charts and point Prometheus at the guardrail-exporter Service (:9100/metrics); reuse the scrape rules + dashboards under infra/prometheus and infra/grafana.