Skip to content

Commit 22f112f

Browse files
committed
docs: calling out the relationship between "helm history" and ".Release.History" and showing that the values are there and only included when the flag is set
Signed-off-by: Andrew Shoell <mrlunchbox777@gmail.com>
1 parent a6368f9 commit 22f112f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

hips/hip-0029.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ The `--release-history-max` flag controls how many historical releases to retrie
9797

9898
- **Different Chart Names:** Still populates `.Release.History` even if chart names differ—templates can detect and handle this
9999
- **Helm's Record:** Reflects Helm's stored release record, not actual cluster state (use `lookup()` for that)
100+
- **Relationship to `helm history`:** `.Release.History` is derived from the same release records used by `helm history <release>`, but exposed as a reverse-chronological, template-friendly projection with field filtering and `--release-history-max` limits.
100101
- **Dry-Run Behavior:** `helm template` and `--dry-run=client` always return an empty array (cluster-agnostic). `--dry-run=server` follows live command behavior and can populate history when available.
101102
- **Opt-In by Default:** Default max of 0 requires explicit user choice, preventing accidental performance impact
102103

@@ -123,6 +124,7 @@ type HistoricalRelease struct {
123124
Revision int // Revision number
124125
Status string // Release status (deployed, superseded, failed, etc.)
125126
Chart Chart // Chart metadata (same structure as .Chart)
127+
Values map[string]interface{} // Optional: only included when --include-history-values is set
126128
FirstDeployed time.Time // When this release was first deployed
127129
LastDeployed time.Time // When this release was last deployed
128130
}
@@ -206,6 +208,8 @@ The following table shows what values are available in template context for diff
206208

207209
**Note:** Use `.Release.Revision` to distinguish installs (revision=1) from upgrades (revision>1).
208210

211+
**Note:** `.Release.History` and `helm history <release>` both come from Helm's stored release records. For template ergonomics, `.Release.History` is reverse chronological (most recent first), filtered to HIP-defined fields, and capped by `--release-history-max`. During rollback, Helm creates a new revision; prior revisions remain in history.
212+
209213
## Backwards Compatibility
210214

211215
Fully backwards compatible. The `.Release.History` field is purely additive—existing charts work unchanged. Go templates handle empty arrays safely; the recommended `{{ if gt (len .Release.History) 0 }}` pattern works in all scenarios. Default max of 0 means existing behavior is unchanged unless users explicitly opt in.

0 commit comments

Comments
 (0)