Add liveness probe, README, and harden Dockerfile#51
Closed
jenting wants to merge 1 commit into
Closed
Conversation
- Serve a /healthz liveness probe on a configurable -health-addr (default :8081). - Add a README documenting behaviour, flags, the probe, and the deployment requirements (shared process namespace, root, RBAC). - Pin the runtime image to alpine:3.21 instead of :latest, EXPOSE 8081, and document why the process runs as root. - Add a unit test for the health handler. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
84a65f9 to
b6f00c1
Compare
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.
Summary
Adds a liveness probe, project documentation, and hardens the runtime image.
Liveness probe
-health-addr(default:8081) exposingGET /healthz, returning200once running.README
Documents what the helper does, how it works, all flags, the probe endpoint, and — importantly — the deployment requirements that aren't obvious from the code: shared process namespace, running as root (needed to signal the other container), and the RBAC it requires.
Dockerfile hardening
alpine:3.21instead of:latestfor reproducible, supply-chain-friendly builds.EXPOSE 8081.Verification (local)
gofmt -l .→ cleango vet ./...✅make test✅make build(-race) ✅🤖 Generated with Claude Code