diff --git a/charts/helm/checkmate/templates/api/deployment.yaml b/charts/helm/checkmate/templates/api/deployment.yaml index 63bafc625..ec2e05d99 100644 --- a/charts/helm/checkmate/templates/api/deployment.yaml +++ b/charts/helm/checkmate/templates/api/deployment.yaml @@ -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 }} diff --git a/charts/helm/checkmate/values.yaml b/charts/helm/checkmate/values.yaml index 900159b49..42c98f73c 100644 --- a/charts/helm/checkmate/values.yaml +++ b/charts/helm/checkmate/values.yaml @@ -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