feat: expose release version as .Release.Version for templating

Signed-off-by: Simske <mail@simske.com>
This commit is contained in:
Simske 2025-06-13 15:20:17 +02:00 committed by yxxhero
parent c03f86de0f
commit 17caf1d3cd
3 changed files with 5 additions and 0 deletions

View File

@ -52,6 +52,7 @@ releases:
- `Release.Labels`: The labels to be applied to the release
- `Release.Chart`: The chart name of the release
- `Release.KubeContext`: The kube context to be used for the release
- `Release.Version`: The version of the current chart
- `Values`: Values passed into the environment.
- `StateValues`: alias for `Values`.
- `Environment`: The information about the environment. This is set by the

View File

@ -33,6 +33,7 @@ func (st *HelmState) createReleaseTemplateData(release *ReleaseSpec, vals map[st
Namespace: release.Namespace,
Labels: release.Labels,
KubeContext: release.KubeContext,
Version: release.Version,
},
}
tmplData.StateValues = &tmplData.Values

View File

@ -64,6 +64,9 @@ type releaseTemplateDataRelease struct {
// Chart is ReleaseSpec.Chart
Chart string
// Version is ReleaseSpec.Version
Version string
// KubeContext is ReleaseSpec.KubeContext
KubeContext string
}