Skip to content

Add liveness probe, README, and harden Dockerfile#51

Closed
jenting wants to merge 1 commit into
refactor/lister-context-loggingfrom
feat/health-probes-docker-readme
Closed

Add liveness probe, README, and harden Dockerfile#51
jenting wants to merge 1 commit into
refactor/lister-context-loggingfrom
feat/health-probes-docker-readme

Conversation

@jenting

@jenting jenting commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

Adds a liveness probe, project documentation, and hardens the runtime image.

Stacked on #50. Base branch is refactor/lister-context-logging; the diff here is only this change. Retarget to main once #50 merges.

Liveness probe

  • New HTTP server on -health-addr (default :8081) exposing GET /healthz, returning 200 once running.
  • Unit test for the handler.

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

  • Pin the runtime base image to alpine:3.21 instead of :latest for reproducible, supply-chain-friendly builds.
  • EXPOSE 8081.
  • Documented why the process is intentionally left running as root.

Verification (local)

  • gofmt -l . → clean
  • go vet ./...
  • make test
  • make build (-race) ✅

🤖 Generated with Claude Code

- 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>
@jenting jenting force-pushed the feat/health-probes-docker-readme branch from 84a65f9 to b6f00c1 Compare June 11, 2026 12:39
@jenting jenting changed the title Add health/readiness probes, README, and harden Dockerfile Add liveness probe, README, and harden Dockerfile Jun 11, 2026
@jenting jenting closed this Jun 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant