Add /healthz and /healthz/sync, and probe over HTTP #27
No reviewers
Labels
No labels
bug
enhancement
epic
needs-info
needs-triage
ready-for-agent
ready-for-human
svd:go
svd:hold
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
dev/mail-mind-mcp!27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/healthz"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #15 (epic #7).
What changed
GET /healthzneeds no token and answersok lag_seconds=Nwhile the process runs and the mirror opens. Both the readiness and the liveness probe use it.GET /healthz/syncanswers 503 (stale lag_seconds=… max_lag_seconds=…) once any account's last successful sync is older thansync.max_lag_seconds. The default is 10 ×interval_seconds, so 1200 s at the default interval. Use it for external monitoring.never.Host: localhost.tcpSockettohttpGet. The README has a Health section, andconfig.example.tomllists the new key.One change from the issue
The issue asked for readiness to fail on sync lag. I did not do that: an unready pod drops out of the Service, so Grok would get 502s even though the stale mirror is still readable. Lag is reported on
/healthzand judged on/healthz/syncinstead. Say if you want readiness gated anyway.Deploy note
Both starbase ConfigMaps already list
localhostinallowed_hosts, so the new probes pass there. Any other deployment must list it too, or the pod never becomes ready.Checks
make check: clean; 42 tests pass (3 new).kubectl kustomize deploy/k8s/overlays/examplerenders both probes with the Host header.🤖 Generated with Claude Code