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