You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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>
Copy file name to clipboardExpand all lines: hips/hip-0029.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,6 +97,7 @@ The `--release-history-max` flag controls how many historical releases to retrie
97
97
98
98
-**Different Chart Names:** Still populates `.Release.History` even if chart names differ—templates can detect and handle this
99
99
-**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.
100
101
-**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.
101
102
-**Opt-In by Default:** Default max of 0 requires explicit user choice, preventing accidental performance impact
102
103
@@ -123,6 +124,7 @@ type HistoricalRelease struct {
123
124
Revisionint// Revision number
124
125
Statusstring// Release status (deployed, superseded, failed, etc.)
125
126
ChartChart// Chart metadata (same structure as .Chart)
127
+
Valuesmap[string]interface{} // Optional: only included when --include-history-values is set
126
128
FirstDeployed time.Time// When this release was first deployed
127
129
LastDeployed time.Time// When this release was last deployed
128
130
}
@@ -206,6 +208,8 @@ The following table shows what values are available in template context for diff
206
208
207
209
**Note:** Use `.Release.Revision` to distinguish installs (revision=1) from upgrades (revision>1).
208
210
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
+
209
213
## Backwards Compatibility
210
214
211
215
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