feat: include func support (#1187)

* feat: include func support

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-12-04 21:51:01 +08:00
committed by GitHub
parent 06504477f6
commit 7d6ed97333
20 changed files with 380 additions and 53 deletions
+8
View File
@@ -133,3 +133,11 @@ The `expandSecretRefs` function takes an object as the argument and expands ever
```yaml
{{ $expandSecretRefs := $value | expandSecretRefs }}
```
#### `include`
The 'include' function allows including and rendering nested templates. The function returns the created template or an error if any occurred. It will load functions from `_*.tpl` files in the directory where the helmfile.yaml is located.
For nested helmfile.yaml files, it will load `_*.tpl` files in the directory where each nested helmfile.yaml is located. example: [include](https://github.com/helmfile/helmfile/tree/main/test/integration/test-cases/include-template-funch/input)
```yaml
{{ include "my-template" . }}
```