-
Notifications
You must be signed in to change notification settings - Fork 2k
Open
Labels
stage/needs-investigationtheme/docsDocumentation issues and enhancementsDocumentation issues and enhancementstype/bug
Description
Nomad version
v1.9.3
Issue
The information at
nomad/website/content/docs/job-specification/template.mdx
Lines 672 to 710 in 2eb2b6c
| #### As individual files | |
| For templates, all dependencies are mapped into a single list. This means that | |
| multiple templates watching the same path return the same data. | |
| ```hcl | |
| template { | |
| data = <<EOH | |
| {{ with pkiCert "pki/issue/foo" "common_name=foo.service.consul" "ip_sans=127.0.0.1" }} | |
| {{- .Cert -}} | |
| {{ end }} | |
| EOH | |
| destination = "${NOMAD_SECRETS_DIR}/certificate.crt" | |
| change_mode = "restart" | |
| } | |
| template { | |
| data = <<EOH | |
| {{ with pkiCert "pki/issue/foo" "common_name=foo.service.consul" "ip_sans=127.0.0.1" }} | |
| {{- .CA -}} | |
| {{ end }} | |
| EOH | |
| destination = "${NOMAD_SECRETS_DIR}/ca.crt" | |
| change_mode = "restart" | |
| } | |
| template { | |
| data = <<EOH | |
| {{ with pkiCert "pki/issue/foo" "common_name=foo.service.consul" "ip_sans=127.0.0.1" }} | |
| {{- .Key -}} | |
| {{ end }} | |
| EOH | |
| destination = "${NOMAD_SECRETS_DIR}/private_key.key" | |
| change_mode = "restart" | |
| } | |
| ``` | |
| These are three different input templates, but when run under the Nomad job, | |
| they are compressed into a single call, sharing the resulting data. |
This part of the documentation as been changed in 1eb1dbf#diff-2e97a76f1d2de1fec74a5033b6be6625127e85de0c991ce328535bd384659807L654. Previously the example used the secret function which does save its result across invocations so the text was correct.
The change to this part of the documentation should be rollbacked for now and caching support could be added to pkiCert in a second time.
Freddo3000, jinnatar, zintrepid and kasefuchs
Metadata
Metadata
Assignees
Labels
stage/needs-investigationtheme/docsDocumentation issues and enhancementsDocumentation issues and enhancementstype/bug
Type
Projects
Status
Needs Roadmapping