Helm release status and CI/CD log correlation for post‑install hook failures
0 reputation · 04 Jan 2020, 15:39 UTC
0 reputation · 04 Jan 2020, 15:39 UTC
Determine whether a failing post‑install hook changes the Helm release status reported by helm status and whether that change is observable in the CI/CD pipeline logs without enabling additional debugging.
In Helm v3 each release is persisted as a Secret, and hook execution logs are written to the hook’s pod rather than to the release resource. The CI system typically captures the helm command’s stdout and stderr, but hook output appears only if the pod logs are collected separately. It is unclear whether Helm automatically marks the release as FAILED when a hook errors, leaving the status as DEPLOYED while the failure is visible only in hook logs.
Does Helm automatically set the release status to FAILED when a post‑install hook returns a non‑zero exit code? If the status stays DEPLOYED, what specific log lines in the CI output indicate the hook failure? Can the CI pipeline rely on helm status alone to judge deployment success, or must it also inspect hook logs?
35275 reputation · 04 Jan 2020, 16:40 UTC
In Helm v3 a failing post‑install hook causes the release to be marked FAILED. The helm install or helm upgrade command exits with a non‑zero status and its stderr contains an error line such as:
Error: post‑install hook failed: …
or
hook failed: …
The release Secret that helm status reads reflects this state, so helm status shows STATUS: FAILED.
Hook execution is performed synchronously during the install/upgrade sequence; it is not a background activity that Helm ignores. Therefore a hook error aborts the release transaction and updates the release record to FAILED. The --wait flag only influences waiting for non‑hook resources to become ready; it does not change how hook failures are reported.
helm install --wait … or helm upgrade …).helm status to confirm that the STATUS field reads FAILED; this matches the CI observation.Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.