Skip to content

Add health check endpoints (/health and /ready) for container orchestration liveness and readiness probes.#104

Merged
lxowalle merged 3 commits intosipeed:mainfrom
fahadahmadansari111:feature/health
Feb 16, 2026
Merged

Add health check endpoints (/health and /ready) for container orchestration liveness and readiness probes.#104
lxowalle merged 3 commits intosipeed:mainfrom
fahadahmadansari111:feature/health

Conversation

@fahadahmadansari111
Copy link
Contributor

Summary

Add health check endpoints (/health and /ready) for container orchestration (Docker/Kubernetes) liveness and readiness probes.


Changes

  • New: pkg/health/server.go — HTTP server with health endpoints
  • Modified: cmd/picoclaw/main.go — Integrated health server into gateway
  • Modified: Dockerfile — Added HEALTHCHECK directive

Details

Endpoint Purpose Response
GET /health Liveness probe — is the container running? Always 200 if up
GET /ready Readiness probe — is the app ready to receive traffic? 200 when ready, 503 otherwise

Usage

Docker health check

docker inspect --format='{{.State.Health.Status}}' picoclaw-gateway

Why

  • Enables Docker to detect hung or crashed containers
  • Supports rolling updates by checking readiness before routing traffic
  • Required for production deployments

@lxowalle
Copy link
Collaborator

Hi @fahadahmadansari111 , thanks for the PR. Could you please run go fmt ./... and then submit again to ensure the PR check passes?

@fahadahmadansari111
Copy link
Contributor Author

@lxowalle - I have ran go fmt ./.... Can you check now?

@lxowalle
Copy link
Collaborator

Good! Thanks!

@lxowalle lxowalle merged commit 341dbd3 into sipeed:main Feb 16, 2026
3 checks passed
edgargomero pushed a commit to edgargomero/kntorclaw that referenced this pull request Feb 16, 2026
…ration liveness and readiness probes. (sipeed#104)

* added health endpoint

* formatted files

---------

Co-authored-by: lxowalle <83055338+lxowalle@users.noreply.github.com>
emadomedher pushed a commit to emadomedher/picoclaw that referenced this pull request Feb 17, 2026
…ration liveness and readiness probes. (sipeed#104)

* added health endpoint

* formatted files

---------

Co-authored-by: lxowalle <83055338+lxowalle@users.noreply.github.com>
@Orgmar
Copy link
Contributor

Orgmar commented Feb 19, 2026

@fahadahmadansari111 Health check endpoints are super useful for anyone running PicoClaw in Kubernetes or Docker, nice addition with both liveness and readiness probes covered.

We're forming the PicoClaw Dev Group on Discord to keep contributors connected. If you're interested, send an email to support@sipeed.com with the subject [Join PicoClaw Dev Group] + Your GitHub account and we'll get you the invite!

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.

3 participants