Skip to content

Add health check endpoints for k8s liveness and readiness probes #10

@treblereel

Description

@treblereel

Context

Part of epic #1 — Build production-ready REST microservice with k8s deployment on top of casehub-engine. Kubernetes needs liveness and readiness probes to manage pod lifecycle and traffic routing.

What

Configure health check endpoints using Quarkus SmallRye Health:

  • /q/health/live — liveness probe (is JVM running?)
  • /q/health/ready — readiness probe (can service handle traffic?)
  • Custom readiness checks for database connectivity and case engine initialization

Acceptance Criteria

  • Liveness probe returns 200 when application is running (JVM alive)
  • Readiness probe returns 200 when database is reachable and case engine is initialized
  • Readiness probe returns 503 during startup or when database is unreachable
  • Custom readiness check verifies CaseEngine is initialized and ready
  • Custom readiness check verifies database connection pool is healthy
  • Health check responses include component details (database: UP/DOWN, engine: UP/DOWN)
  • Integration tests verify health endpoints behavior and state transitions

Notes

  • Use quarkus-smallrye-health extension
  • Implement @Readiness check for database using datasource health check
  • Implement @Readiness check for case engine initialization state
  • Liveness should be simple (process alive), readiness should verify dependencies
  • File paths: custom health check implementations in /health package

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions