---
id: w1/m23/t001
title: Wire spec.healthCheckPath into a ReadinessProbe (or drop the field)
worker: worker1
status: todo
estimate: 45m
depends_on: []
---

## Objective

Make `spec.healthCheckPath` real or remove it. The `App` CRD accepts `healthCheckPath` (default `/`) but the operator never reads it — Running gates purely on Deployment replica readiness. Either set an HTTP `ReadinessProbe` on the container from the field (which makes replica-readiness gating real health gating for free), or drop the field from the contract.

## Context

- `lego/operator/internal/controller/app_controller.go` — `reconcileKubernetes` builds the container; add the probe here.
- The CRD comment was corrected in the 2026-07-08 audit to say the field is unused today.
- Render parity: `healthCheckPath` is a Render field — wiring it is the parity-preserving choice.

## Steps

1. Prefer wiring: set `ReadinessProbe` (HTTP GET `healthCheckPath`) on the app container in `reconcileKubernetes`.
2. Update `docs/ADR004-deployment.md` so the health-gating story is true.
3. (Alternative, only if wiring is rejected) remove the field from `lego/types/` + CRD and note why.

## Files

- `lego/operator/internal/controller/app_controller.go`
- `docs/ADR004-deployment.md` (and `lego/types/…` if dropping the field)

## Acceptance criteria

- [ ] The Deployment's container carries a ReadinessProbe derived from `healthCheckPath` (or the field is gone), verified by envtest.
- [ ] `make test` green.

## Out of scope

- Any new health-related API surface — the field already exists in the contract.
