CSCI-GA-2820-FA24-003 / recommendations

NYU DevOps Recommendations Service Fall 2024
Apache License 2.0
0 stars 1 forks source link

Add /health Endpoint for Health Check #67

Closed ddeerrrriicckk closed 6 days ago

ddeerrrriicckk commented 6 days ago

Description

It adds a /health endpoint. The endpoint provides a simple JSON response indicating the health status of the service, allowing Kubernetes to monitor if the service is running properly.

Implementation Details

Acceptance Criteria

Testing

  1. Manually tested the /health endpoint to verify it returns the correct JSON response and status code.
  2. Automated tests added in tests/test_routes.py to ensure the /health endpoint behaves as expected.
  3. Verified the Kubernetes probes work as expected by observing the Pod behavior during testing.
codecov[bot] commented 6 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Files with missing lines Coverage Δ
service/routes.py 98.07% <100.00%> (+0.05%) :arrow_up: