Repository navigation
Description
Problem
The Deployment devops/crawl4ai (k8s/devops/crawl4ai/deployment.yaml) has a startup probe and a readiness probe on /health, but no liveness probe. If the app stops answering after its start, Kubernetes does not start the pod again. The kube-linter row of devops ci (#6068) reports no-liveness-probe for it, and the Deployment holds the exception annotation ignore-check.kube-linter.io/no-liveness-probe until this item.
Rule RL2 of docs/SERVICE_PATTERNS.md asks for a liveness probe that checks only that the process makes progress. The latency of /health while Chromium renders a slow page is not measured, so a short timeout could start the pod again during a render.
Expected behavior
- Measure the latency of
/healthduring renders of slow pages. - Add a liveness probe whose period, timeout and failure threshold are above the measured latency.
- Remove the annotation
ignore-check.kube-linter.io/no-liveness-probefrom the Deployment, anduv run devops k8s lintpasses.
Related
Alternatives check of 2026-11-24: partly.
Tool: prometheus/blackbox_exporter (https://github.com/prometheus/blackbox_exporter), Apache-2.0, last activity 2026-11-16, maintained.
Reason: Searches found no tool that adds or tunes a Kubernetes liveness probe; the blackbox exporter probes HTTP endpoints from outside and returns timing metrics, so it measures /health latency during renders but writes no probe into the Deployment.
Covers:
- HTTP probes of the
/healthroute from outside the pod - Timing metrics that measure how long
/healthtakes probe_successto show whether the route answers
Lacks:
- No liveness probe added to the Deployment
- No removal of the kube-linter exception annotation
- No period, timeout or failure-threshold values
Proposed design
Problem statement
Add a liveness probe to the container crawl4ai of k8s/devops/crawl4ai/deployment.yaml, and remove the annotation ignore-check.kube-linter.io/no-liveness-probe. The Deployment has a startup probe and a readiness probe on /health, but no liveness probe. Without one, Kubernetes never starts again a pod whose app stops answering. The latency of /health during a slow render is not measured, so this change sets safe first values and issue #6320 sizes them from a measurement.
Acceptance criteria
Requirement: Liveness probe on the health route
The container crawl4ai MUST have a liveness probe that calls /health on port 11235 with periodSeconds: 20, timeoutSeconds: 10 and failureThreshold: 3.
Scenario: kube-linter finds the liveness probe
- WHEN
uv run devops ci --check --only kube-linterruns on the change - THEN the command exits 0 and reports no
no-liveness-probefinding fork8s/devops/crawl4ai/deployment.yaml.
Requirement: The k8s folder renders with the new probe
The change MUST pass the checks of the k8s row of devops ci.
Scenario: The k8s row passes
- WHEN
uv run devops ci --check --only k8sruns on the change - THEN the command exits 0.
Requirement: Pending a person after the merge
The live Deployment devops/crawl4ai MUST NOT hold the annotation ignore-check.kube-linter.io/no-liveness-probe.
Scenario: The live Deployment shows the probe and no exception
- WHEN
kubectl -n devops get deployment crawl4ai -o yamlruns after Argo CD syncs the change - THEN the output holds no
ignore-check.kube-linter.io/no-liveness-probe.
Existing Tool Considered
prometheus/blackbox_exporter, verdict partly. The alternatives check of 2026-11-24 in the issue body lists what the tool covers and what it lacks. This change does what the tool lacks: it sets periodSeconds: 20, timeoutSeconds: 10 and failureThreshold: 3 on a liveness probe in k8s/devops/crawl4ai/deployment.yaml, and it removes the exception annotation. The tool stays the way to record the /health latency, and issue #6320 uses it for that measurement.
Key questions
- Which period, timeout and failure threshold keep a slow render from a restart?: Set
periodSeconds: 20,timeoutSeconds: 10andfailureThreshold: 3. The timeout is twice the readiness timeout of 5 s, and three failures give 60 s before a restart. The startup probe gates the liveness probe, so the probe needs noinitialDelaySeconds. (best practice) [sources: k8s/devops/crawl4ai/deployment.yaml, docs/SERVICE_PATTERNS.md]- Chosen: Twice the readiness timeout, three failures (period 20 s, timeout 10 s, failureThreshold 3). The timeout of 10 s stays above the 5 s that the readiness probe already allows, and three failures give 60 s before a restart.
- Rejected: Kubernetes defaults (period 10 s, timeout 1 s, failureThreshold 3). The 1 s timeout is below the readiness timeout of 5 s, so a slow render starts the pod again.
- Rejected: Long probe (period 30 s, timeout 10 s, failureThreshold 5). A dead process waits 150 s, and a long wait hides a real stop of the app.
- Which route and port does the liveness probe call?: Call
/healthon port 11235. It is the only route of the image that needs no token, and the startup probe and the readiness probe already call it. Redis runs in the same pod, so the route names no dependency outside the pod. (best practice) [sources: k8s/devops/crawl4ai/deployment.yaml, docs/SERVICE_PATTERNS.md]- Chosen:
/healthon port 11235. The startup probe and the readiness probe use this route, and the image needs no token for it. - Rejected: A
tcpSocketprobe on port 11235. It shows only that the port accepts a connection, not that the app answers, so a hung worker stays undetected. Rule RL2 asks for progress. - Rejected: A new
/healthzroute. The image is upstream and pinned by digest, so a new route needs a change outside this repository.
- Chosen:
- Which check proves the change?: The
kube-linterrow ofdevops ci, withuv run devops ci --check --only kube-linter. It reportsno-liveness-probefor this Deployment. No pytest test reads the probe fields, because CT1 ofdocs/SERVICE_PATTERNS.mdgives a manifest value to a schema or policy tool. (best practice) [sources: docs/SERVICE_PATTERNS.md, k8s/devops/crawl4ai/deployment.yaml]- Chosen: The
kube-linterrow ofdevops ci. It is the row that reportsno-liveness-probe, and it runs again on each change. - Rejected: A pytest test that reads the probe fields. CT1 of
docs/SERVICE_PATTERNS.mdgives a manifest value to a schema or policy tool, not to a test of the source code.
- Chosen: The
- Does this change wait on the measured
/healthlatency?: No. This change sets first values now, and issue fix(k8s): Size crawl4ai liveness probe from /health latency #6320 replaces them with measured ones. The Deployment already follows this order for its resources:First limits, from the compose file of the project. Measure, then change.(best practice) [sources: k8s/devops/crawl4ai/deployment.yaml, docs/SERVICE_PATTERNS.md]- Chosen: Set first values now and tune them in fix(k8s): Size crawl4ai liveness probe from /health latency #6320. The exception annotation goes now, and the measured values arrive with the blackbox exporter in fix(k8s): Size crawl4ai liveness probe from /health latency #6320.
- Rejected: Wait for the
/healthlatency measurement. The wait keepsno-liveness-probeopen, and a dead app stays down until a person restarts the pod.
Fit
Fits in one pull request.
Suspected block
None.
Dependencies
None.
Activity
dan-petty commentedon Nov 17, 2026
Both add a liveness probe to a k8s Deployment, but dan-petty/homelab#365 targets Qdrant while this targets Crawl4AI.devops-cli-service commentedon Nov 18, 2026
The result in the alternatives block of the issue body changed. Before this check: no check. A person decides what the new result means for the item.
Searches (8)
Tools considered:
Searches run:
Sources:
devops-cli-service commentedon Nov 18, 2026
Status set to Ready at 4ddf77e (see proposed design in issue body).
Moved to new items: #6320.
devops-cli-service commentedon Nov 27, 2026
Next step: the stage job writes the plan of the item. See Moved to new items in the section Proposed design of the body.
devops-cli-service commentedon Nov 29, 2026
Released in v0.246.0: https://github.com/dan-petty/devops-cli/releases/tag/v0.246.0
devops-cli-service commentedon Nov 29, 2026
Live since 2026-11-29 11:55 UTC