Documentation
¶
Overview ¶
Package main demonstrates wiring Parti's OnDegraded hook to a k8s readiness probe.
When NATS data loss is sustained long enough for the manager to enter Degraded mode (e.g. a bucket wipe while the worker is running), the readiness probe flips unhealthy. Kubernetes then stops routing traffic to this pod and, depending on your Deployment's updateStrategy, may restart it — which is the correct recovery, since Parti's restart path recreates missing buckets via ensureKVBucket.
The probe endpoint is GET /readyz:
- 200 OK while the manager is Stable / Scaling / Rebalancing / Emergency
- 503 Service Unavailable while in Degraded or Shutdown
See docs/OPERATIONS.md "Live NATS data loss" for the underlying runbook.
Click to show internal directories.
Click to hide internal directories.