Skip to content

[FEATURE] Add Health Check Endpoints #158

@JoshuaAFerguson

Description

@JoshuaAFerguson

Objective

Add health check endpoints for Kubernetes liveness and readiness probes.

Requirements

  • Add GET /health/live endpoint (pod is alive)
  • Add GET /health/ready endpoint (dependencies ready: DB, Redis)
  • Add GET /metrics endpoint (Prometheus metrics)

Implementation

// api/internal/handlers/health.go
func LivenessCheck(c *gin.Context) {
    c.JSON(200, gin.H{"status": "ok"})
}

func ReadinessCheck(c *gin.Context) {
    // Check DB, Redis connections
    c.JSON(200, gin.H{"status": "ready"})
}

Acceptance Criteria

  • /health/live returns 200 OK
  • /health/ready returns 200 when healthy, 503 when not
  • K8s manifests updated with probes
  • Unit tests added

Files to Create/Modify

  • api/internal/handlers/health.go (NEW)
  • api/cmd/main.go (add routes)
  • manifests/api-deployment.yaml (add probes)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions