diff --git a/backend/src/routes/health.js b/backend/src/routes/health.js index ddff301..257ea8d 100644 --- a/backend/src/routes/health.js +++ b/backend/src/routes/health.js @@ -102,7 +102,8 @@ router.get('/', async (req, res) => { }; } - const statusCode = health.status === 'ok' ? 200 : 503; + // Only return 503 if the server itself is broken — degraded means optional services are down + const statusCode = health.status === 'error' ? 503 : 200; res.status(statusCode).json(health); }); diff --git a/k8s/app.yaml b/k8s/app.yaml index 8bebd1a..8129d56 100644 --- a/k8s/app.yaml +++ b/k8s/app.yaml @@ -26,14 +26,16 @@ spec: httpGet: path: /health port: 3010 - initialDelaySeconds: 15 + initialDelaySeconds: 30 periodSeconds: 20 + failureThreshold: 5 readinessProbe: httpGet: path: /health port: 3010 - initialDelaySeconds: 5 + initialDelaySeconds: 15 periodSeconds: 10 + failureThreshold: 6 --- apiVersion: v1 kind: Service