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.
This commit is contained in:
parent
9ffa49a8f2
commit
196c9473a4
1 changed files with 7 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue