feat(health): /healthz + /readyz + gRPC health (land on main)#63
Merged
Conversation
…ploys Adds first-class liveness/readiness for Docker/Kubernetes deployment. - pkg/health: process-wide readiness flag + HTTP handlers. /healthz is liveness (200 once the server is up); /readyz is readiness (200 only after the daemon passes its DestinationReady + netlinkers-up gate, 503 otherwise and on shutdown). Registered on the existing metrics listener. - gRPC: register the standard grpc.health.v1 service on the gRPC port, starting NOT_SERVING and flipping to SERVING on the same readiness condition (for native k8s gRPC probes). - The poller flips readiness (x.setReady) once it passes the DestinationReady gate — the moment xtcp2 starts polling — and back on return; setReady drives both the HTTP flag and the gRPC status from one place. - Bump goVendorHash for the new google.golang.org/grpc/health import. - Tests: pkg/health handlers via httptest; docs/observability.md section. No new flags — the endpoints are always on, on the existing listeners. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
feat(health): /healthz + /readyz + gRPC health for container deploys
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Re-targets the health/readiness work onto
main.#62 was merged into its stacked base branch (
feat/listener-ip-ttl) rather thanmain, somaincurrently has #61 (listener TTL) but is missing thepkg/healthwork from #62. This PR brings that delta tomain.Contents = the #62 feature (already reviewed there):
/healthz(liveness) +/readyz(readiness, backed by the daemon'sDestinationReady/netlinker gate) on the metrics listener.grpc.health.v1service on the gRPC port (SERVINGon the same readiness condition).pkg/health+ pollersetReadywiring;goVendorHashbump forgoogle.golang.org/grpc/health.The listener-TTL commits are already in
mainvia #61, so the diff here is only the health feature. Verified green before (test-cmd-xtcp2,test-go-flavor-s3parquet,pkg/healthunit tests,nix build .#xtcp2-s3parquet).🤖 Generated with Claude Code