From 196c9473a4e5ec5411867e1b71bb40c3d019650b Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Wed, 20 May 2026 12:22:53 -0500 Subject: [PATCH] ops(k8s): point liveness/startup at /health/live, scale to 2 replicas Now that the image serving /health/live is live, switch liveness and startup probes to the shallow endpoint so transient db/redis blips can't kill or block a healthy pod; readiness stays on the deep /health. Run 2 replicas so a single pod restart no longer means full downtime. --- k8s/deployment.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml index b8e9870c..38679e32 100644 --- a/k8s/deployment.yaml +++ b/k8s/deployment.yaml @@ -4,7 +4,7 @@ metadata: name: towerops namespace: towerops spec: - replicas: 1 + replicas: 2 strategy: type: RollingUpdate rollingUpdate: @@ -269,9 +269,13 @@ spec: limits: memory: "3Gi" cpu: "2000m" + # Startup and liveness use the shallow /health/live (no db/redis) so a + # transient dependency outage can't prevent boot or kill a running + # pod. Readiness uses the deep /health so the pod is pulled from the + # load balancer (but NOT restarted) while db/redis are unreachable. startupProbe: httpGet: - path: /health + path: /health/live port: 4000 initialDelaySeconds: 10 periodSeconds: 5 @@ -279,7 +283,7 @@ spec: failureThreshold: 24 # 10s + (24 * 5s) = 130s max startup time livenessProbe: httpGet: - path: /health + path: /health/live port: 4000 periodSeconds: 10 timeoutSeconds: 3