fix(k8s): use lightweight api probes
Some checks failed
CD Pipeline / tests (push) Successful in 6m51s
Code Review / ai-code-review (push) Successful in 13s
CD Pipeline / build-and-deploy (push) Failing after 4m11s
CD Pipeline / post-deploy-checks (push) Has been skipped

This commit is contained in:
Your Name
2026-05-24 10:11:20 +08:00
parent 6d2b0ed4cd
commit 8558ac2d20

View File

@@ -25,7 +25,9 @@ spec:
type: RollingUpdate
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
# 2026-05-24 Codex: allow one unavailable replica so rollout can replace
# a bad old ReplicaSet instead of deadlocking at 1/2 when probes regress.
maxUnavailable: 1
template:
metadata:
labels:
@@ -137,7 +139,10 @@ spec:
memory: "1Gi"
livenessProbe:
httpGet:
path: /api/v1/health
# 2026-05-24 Codex: K8s probes must stay lightweight. The full
# health endpoint checks Ollama/OpenClaw/SigNoz and can exceed
# kubelet timeout when an external provider is degraded.
path: /api/v1/health/live
port: 8000
initialDelaySeconds: 30
periodSeconds: 10
@@ -145,7 +150,7 @@ spec:
failureThreshold: 3
readinessProbe:
httpGet:
path: /api/v1/health
path: /api/v1/health/ready
port: 8000
initialDelaySeconds: 5
periodSeconds: 5
@@ -154,7 +159,7 @@ spec:
# Phase K0.5: Startup Probe (允許最多 60 秒啟動時間)
startupProbe:
httpGet:
path: /api/v1/health
path: /api/v1/health/live
port: 8000
initialDelaySeconds: 5
periodSeconds: 5