Implemented the minimum-viable endpoints needed for Kubernetes probes and operator inspection:
- Config loading: file → env → CLI overlay with validation
- JSON structured logging to stdout (plan §10 format)
- Two axum listeners: :7700 (client API) + :9090 (metrics, unauthenticated)
- Signal handlers for graceful shutdown (SIGTERM drains in-flight requests)
Endpoints implemented:
- GET /health - Meilisearch-compatible liveness probe (200, no auth, returns {"status":"available"})
- GET /version - Returns Meilisearch version from any healthy node (60s TTL cache)
- GET /_miroir/ready - Readiness probe (503 until covering quorum reachable)
- GET /_miroir/topology - Full cluster state per plan §10 JSON shape
- GET /_miroir/shards - Shard → node mapping table
- GET /_miroir/metrics - Admin-key-gated Prometheus metrics mirror
Acceptance criteria verified:
- curl localhost:7700/health returns 200 within 100ms of process start ✓
- curl localhost:7700/_miroir/ready returns 503 until all nodes reachable ✓
- curl -H "Authorization: Bearer $ADMIN_KEY" localhost:7700/_miroir/topology matches plan §10 shape ✓
- SIGTERM drains in-flight requests ✓
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| miroir-core | ||
| miroir-ctl | ||
| miroir-proxy | ||