docs(templates): fix misleading/broken examples

pull/3076/head
Joan Rieu 8 years ago committed by GitHub
parent ca4d543151
commit e464479cb2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,11 +18,11 @@ We also added two special template functions: `include` and `required`. The `inc
function allows you to bring in another template, and then pass the results to other function allows you to bring in another template, and then pass the results to other
template functions. template functions.
For example, this template snippet includes a template called `mytpl.tpl`, then For example, this template snippet includes a template called `mytpl`, then
lowercases the result, then wraps that in double quotes. lowercases the result, then wraps that in double quotes.
```yaml ```yaml
value: {{include "mytpl.tpl" . | lower | quote}} value: {{include "mytpl" . | lower | quote}}
``` ```
The `required` function allows you to declare a particular The `required` function allows you to declare a particular
@ -144,7 +144,7 @@ spec:
template: template:
metadata: metadata:
annotations: annotations:
checksum/config: {{ include (print $.Template.BasePath "/secret.yaml") . | sha256sum }} checksum/config: {{ .Files.Get "path/to/config" | sha256sum }}
[...] [...]
``` ```

Loading…
Cancel
Save