Make Chart's IsRoot available to templates

Signed-off-by: Kai Takac <kai.takac@gmail.com>
pull/9993/head
Kai Takac 3 years ago committed by Kai Takac
parent 4a0b3d8c3d
commit 06ae6f933a

@ -345,8 +345,13 @@ func allTemplates(c *chart.Chart, vals chartutil.Values) map[string]renderable {
// As it recurses, it also sets the values to be appropriate for the template // As it recurses, it also sets the values to be appropriate for the template
// scope. // scope.
func recAllTpls(c *chart.Chart, templates map[string]renderable, vals chartutil.Values) { func recAllTpls(c *chart.Chart, templates map[string]renderable, vals chartutil.Values) {
chartMetaData := struct {
chart.Metadata
IsRoot bool
}{*c.Metadata, c.IsRoot()}
next := map[string]interface{}{ next := map[string]interface{}{
"Chart": c.Metadata, "Chart": chartMetaData,
"Files": newFiles(c.Files), "Files": newFiles(c.Files),
"Release": vals["Release"], "Release": vals["Release"],
"Capabilities": vals["Capabilities"], "Capabilities": vals["Capabilities"],

Loading…
Cancel
Save