add readiness and liveness checks to API

This commit is contained in:
Alex Holliday committed 2026-06-29 14:14:42 -07:00
1 parent 35c9618d59
commit a39792cf0b
2 files changed
+33 -1

No files matched your search

@@ -24,10 +24,30 @@ spec:
- name: api
image: {{ .Values.api.image }}
ports:
- containerPort: {{ .Values.api.port }}
- name: http
containerPort: {{ .Values.api.port }}
envFrom:
- secretRef:
name: checkmate-secrets
# Probes hit the Express /api/v1/health endpoint — proves the HTTP server is responsive.
# NOTE: this does NOT detect a wedged job loop when queuePrimaryProcesses=true (the API is
# also a worker). Worker-aware health for that mode is a follow-up — see worker-health-checks.md §7.5.
livenessProbe:
httpGet:
path: /api/v1/health
port: http
initialDelaySeconds: {{ .Values.api.probes.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.api.probes.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.api.probes.liveness.timeoutSeconds }}
failureThreshold: {{ .Values.api.probes.liveness.failureThreshold }}
readinessProbe:
httpGet:
path: /api/v1/health
port: http
initialDelaySeconds: {{ .Values.api.probes.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.api.probes.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.api.probes.readiness.timeoutSeconds }}
failureThreshold: {{ .Values.api.probes.readiness.failureThreshold }}
{{- with .Values.api.resources }}
resources:
{{- tpl ( . | toYaml) $ | nindent 12 }}
+12
View File
@@ -24,6 +24,18 @@ api:
# false: API only schedules, the worker tier processes jobs (requires workers deployed).
# true: API also processes jobs (all-in-one; no separate worker needed).
queuePrimaryProcesses: false
# Liveness/readiness probes hit GET /api/v1/health on the api port (proves the HTTP server is up).
probes:
liveness:
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
readiness:
initialDelaySeconds: 5
periodSeconds: 10
timeoutSeconds: 3
failureThreshold: 3
ingress:
enabled: true
host: change_me