Repository navigation
feat(chart): allow app probe overrides - #642
Conversation
Let operators replace the app container's startup, readiness and liveness probes, as they can for the worker. Without an override, rendering only differs in a comment. No new endpoints. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Reviewer's GuideThe chart now supports independently overriding application startup, readiness, and liveness probes by rendering supplied Kubernetes probe specs verbatim, while omitted or empty values retain the existing probePath-based defaults; schemas, examples, tests, snapshots, and deployment documentation are updated accordingly. Flow diagram for application probe renderingflowchart TD
Values[Application values] --> ProbeSelection{Probe override set?}
ProbeSelection -->|Yes| Override[Render supplied Kubernetes probe spec]
ProbeSelection -->|No or empty map| Default[Render default probe using probePath]
Override --> Deployment[Application Deployment]
Default --> Deployment
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #642 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 56 56
Lines 7119 7119
=========================================
Hits 7119 7119
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Hey - I've found 1 issue
Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments
### Comment 1
<location path="docs/helm-chart.md" line_range="809" />
<code_context>
+So setting only `failureThreshold`, without `httpGet`, fails when the
+Deployment is applied. Helm merges values files, also these maps: to switch the
+kind of check over a probe set in another values file, set the probe to `null`
+in a file in between.
+
+FOCA has no health endpoints yet, so choose a path that needs no
</code_context>
<issue_to_address>
**Null probe resets fail validation**
When an app chart omits the optional probe key from its defaults and a later values file sets it to null to clear an earlier override, helm retains the null when the app chart has no default for that optional probe, and the added schema requires an object, so the values-file layering fails schema validation instead of restoring the default probe.
Allow null for the probe schema properties, or document that app charts must define empty probe maps in their defaults for this reset pattern.
</issue_to_address>Linked issues
#603 feat(chart): allow app probe overrides · 6 of 7 met · 1 to check by hand
| # | Requirement | Status | Notes |
|---|---|---|---|
| 1 | Allow overrides for startupProbe, readinessProbe and livenessProbe. | ✅ Met | Each app probe uses the supplied non-empty map in place of its default. |
| 2 | Keep the current defaults for empty maps and render defaults unchanged for existing values. | ✅ Met | Empty maps fall back to the defaults; the snapshots change only in comments. |
| 3 | Add schema, docs with a slow-start example, and the Petstore example. | ✅ Met | Both schemas include the probe fields, and the docs and Petstore values show their use. |
| 4 | Make no FOCA code change and add no new endpoints. | ✅ Met | The changes are limited to chart templates, values, schemas, docs and tests. |
| 5 | Test unchanged defaults and full replacement for each probe type. | ✅ Met | Parameterized tests cover all three overrides and default probes. |
| 6 | Pass helm lint and chart unit tests. | ✅ Met | The PR verification reports both passed. |
| 7 | Pass the kind install. | 👀 Check by hand (runtime) | Check the CI kind-install result; the PR verification says this runs in CI only. |
Sourcery assessment
Approval pending. 1 finding to address first.
Blocking findings: docs/helm-chart.md:809
App charts without defaults for the probes keep a null of a values file, which the documented way to clear an override relies on. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Closes #603
Summary
Adds
<valuesKey>.startupProbe,readinessProbeandlivenessProbeto foca-common: a probe that is set replaces the default onprobePathentirely, rendered as is, as for the worker; an empty map keeps the default. No FOCA code change and no new endpoints. Schema, petstore example and docs (a "Probes" section in the deployment notes, with an example for slow starts).Without overrides, rendering differs only in a comment (see the snapshots).
Verification
pytest charts/foca-common/testswith Helm 3.22.1, the version of CI: passedhelm lint --strict charts/foca-common: passesruff check,ruff format,mkdocs build --strict: passDeclined review findings
docs/helm-chart.mdasks for one new version for all changes up to the next release;chart-v0.4.0isn't tagged yet (latestchart-v0.3.0), so 0.4.0 still is that version. CI's chart version check agrees.🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqMUX3EU35poH13xMgG
Summary by Sourcery
Add configurable application probe overrides to the common Helm chart while preserving default probe behavior.
New Features:
Enhancements:
Documentation:
Tests: