about summary refs log tree commit diff
path: root/templater/templater.go
diff options
context:
space:
mode:
Diffstat (limited to 'templater/templater.go')
-rw-r--r--templater/templater.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/templater/templater.go b/templater/templater.go
index e842daeba0a2..55b64766ce8c 100644
--- a/templater/templater.go
+++ b/templater/templater.go
@@ -205,6 +205,14 @@ func templateFuncs(c *context.Context, rs *context.ResourceSet) template.FuncMap
 
 		return string(data), nil
 	}
+	m["insertTemplate"] = func(file string) (string, error) {
+		data, err := templateFile(c, rs, path.Join(rs.Path, file))
+		if err != nil {
+			return "", err
+		}
+
+		return data.Rendered, nil
+	}
 	m["default"] = func(defaultVal interface{}, varName string) interface{} {
 		if val, ok := rs.Values[varName]; ok {
 			return val