about summary refs log tree commit diff
path: root/docs/templates.md
diff options
context:
space:
mode:
authorJude Venn <judev@cuttlefish.com>2019-04-29T22·13+0100
committerVincent Ambo <github@tazj.in>2019-05-01T22·30+0100
commit6353ed9d142412ee2c9c656c47459c56b3cdf698 (patch)
tree2ca35bd912b7d5e232f9d6fd9963f45ce9ebf6db /docs/templates.md
parent8abe03de3c75dd1dc1f2f65ff71b1ec3888208c2 (diff)
feat(templater): Add insertTemplate function
Similar to insertFile, but runs the templating against the file before
inserting.

This is useful for sharing common config between yaml files, e.g. volume
mounts in a deployment.yaml and cronjob.yaml, and it's useful to be able
to use the `configHash` annotation pattern with a templated
configmap.yaml
Diffstat (limited to 'docs/templates.md')
-rw-r--r--docs/templates.md4
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/templates.md b/docs/templates.md
index 6c44035d0967..32da205108de 100644
--- a/docs/templates.md
+++ b/docs/templates.md
@@ -72,13 +72,15 @@ right.
 
 Some template functions come from Go's standard library and are listed in the
 [Go documentation][]. In addition the functions declared by [sprig][] are
-available in kontemplate, as well as three custom functions:
+available in kontemplate, as well as five custom functions:
 
 * `json`: Encodes any supplied data structure as JSON.
 * `gitHEAD`: Retrieves the commit hash at Git `HEAD`.
 * `passLookup`: Looks up the supplied key in [pass][].
 * `insertFile`: Insert the contents of the given file in the resource
   set folder as a string.
+* `insertTemplate`: Insert the contents of the given template in the resource
+  set folder as a string.
 
 ## Examples: