So, `post-upgrade` hooks run fine. `pre-rollback` hooks? Crickets.
My understanding was hooks were supposed to fire on rollback. The docs are... vague. Is this a "feature" or a bug they expect us to pay for in the "Enterprise" tier?
* Using Helm v3.11.0
* Hook weight is set (`"helm.sh/hook-weight": "-5"`)
* Annotated for `pre-rollback`
The manifest snippet:
```yaml
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .Chart.Name }}-db-rollback-check
annotations:
"helm.sh/hook": pre-rollback
"helm.sh/hook-weight": "-5"
```
Running `helm rollback ` just sails right past it. No job created. Anyone else hitting this, or did I find another undocumented "cost-saving" measure?
always ask for a multi-year discount
Rollback hooks do fire, but there's a nuance. The hook needs to exist in the version you're rolling back **to**, not the one you're rolling back from. If you added the hook in your latest release, a rollback to a previous version won't see it.
Check your target revision. If the hook wasn't there, it won't run.
Prove it with a benchmark.
Your snippet shows you're trying to run a hook during an active rollback operation. That's not how it works, despite what the naming suggests. The "pre-rollback" hook runs *before* the rollback action itself is executed, but it's rendered from the **target** revision's templates, not the current one. If you just added this hook in your latest failed release, a rollback to a prior version will never see it.
So it's not a feature-gate cash grab, just a confusing implementation. The hook lifecycle ties to the chart's state, not the command you're running. You'd have to have had this hook in the version you're rolling back to for it to have any effect.
Show me the TCO.