docs(deployment-operator): clarify CustomHealth scripts - #4000
Conversation
There was a problem hiding this comment.
This PR was generated by the codex Plural Agent Runtime. Here's some useful information you might want to know to evaluate the ai's perfomance:
| Name | Details |
|---|---|
| 💬 Prompt | Create one focused PR updating the authoritative CustomHealth CRD documentation in this repository. Do not modify pluralsh/documentation.... |
| 🔗 Run history | View run history |
Soffi AI SummaryThis PR improves the developer and operator experience for the Key behavioral contract now documented:
Commits
Updated: 2026-08-13 20:00 UTC |
Greptile SummaryThe PR documents the authoritative CustomHealth Lua script contract and propagates the description into the generated CRD schema and API reference.
Confidence Score: 5/5The PR appears safe to merge because it changes documentation only and the documented Lua contract matches the existing evaluator and status-conversion behavior. The source GoDoc and both generated documentation surfaces are consistent, and the documented globals, output shape, and health-state mappings agree with the implementation.
|
| Filename | Overview |
|---|---|
| go/deployment-operator/api/v1alpha1/customhealth_types.go | Adds accurate GoDoc for the CustomHealth Lua globals, output table, status mappings, and canonical guide. |
| go/deployment-operator/config/crd/bases/deployments.plural.sh_customhealths.yaml | Propagates the authoritative Script description into the generated CustomHealth CRD schema without changing validation or runtime behavior. |
| go/deployment-operator/docs/api.md | Regenerates the API reference with content consistent with the source GoDoc and CRD description. |
Reviews (1): Last reviewed commit: "docs(deployment-operator): clarify custo..." | Re-trigger Greptile
| // The script must assign a Lua table to the global `healthStatus`; a Lua `return { ... }` is not consumed. | ||
| // The table uses `status` and an optional `message`, for example: `healthStatus = { status = "Healthy", message = "resource is ready" }`. | ||
| // | ||
| // Supported/intended status values are `Healthy` (console Running), `Degraded` (console Failed), `Paused` |
There was a problem hiding this comment.
don't include the translation results here, the values themselves are pretty self-explanatory.
Summary
CustomHealthSpec.ScriptLua contract and regenerate the checked-in CRD reference docs.Lua output semantics
Obj.healthStatus;return { ... }is not consumed and is insufficient.statusand optionalmessage, e.g.healthStatus = { status = "Healthy", message = "resource is ready" }.Healthy→ Running;Degraded→ Failed;Paused→ Paused;Unknown,Progressing,Suspended, andMissing→ Pending.Canonical guide
https://docs.plural.sh/plural-features/continuous-deployment/deployment-operator/custom-health
Changed files
go/deployment-operator/api/v1alpha1/customhealth_types.go— authoritative Script GoDoc.go/deployment-operator/docs/api.md— generated CRD reference Markdown frommake crd-docs.go/deployment-operator/config/crd/bases/deployments.plural.sh_customhealths.yaml— controller-gen output for the Script description.Generation and validation
make crd-docsfromgo/deployment-operator(run in the pinnedgolang:1.26.5-alpine3.23container because the host has no Go toolchain).crd-ref-docsemitted its existing max-recursion-depth warnings but generateddocs/api.mdsuccessfully.make manifestswas attempted.controller-gengenerated the CustomHealth CRD description, thencodegen-chart-crdsfailed with exit 2 becausecpcould not create the missing destination../../charts/deployment-operator/crds. No generated YAML was hand-edited; only the legitimate CustomHealth controller-gen output is included, and unrelated regeneration output was reverted.gofmtwith the pinned Go container,git diff --check, and a generated-document content check covering all required semantics and the exact guide URL.go test ./pkg/luacompiled but its GinkgoBeforeSuitefailed before specs because envtestetcdis absent at../../bin/k8s/1.28.3-linux-amd64/etcd.