Commit Graph

35 Commits

Author SHA1 Message Date
Michael Smithhisler
4c8257d0c7 client: add once mode to template block (#25922) 2025-05-28 11:45:11 -04:00
Aimee Ukasick
986f3c727a Docs: SEO job spec section (#25612)
* action page

* change all page_title fields

* update title

* constraint through migrate pages

* update page title and heading to use sentence case

* fix front matter description

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-05-19 09:02:07 -05:00
Piotr Kazmierczak
f7a4ded2c0 security: add CT executeTemplate to default function_denylist (#24541)
This PR adds Consul Template's executeTemplate function to the denylist by
default, in order to prevent accidental or malicious infinitely recursive
execution.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-11-22 19:33:56 +01:00
Adrian Todorov
6589d7130b docs: remove mentions of 'new in Nomad X version' where X is an older version (#23552) 2024-07-11 13:43:28 -04:00
Tim Gross
a71632e3a4 docs: recommendation for maximum number of template dependencies (#20259) 2024-04-04 11:08:49 -04:00
Adrian Todorov
044eb0e048 docs: warnings about template dependencies, HCL2 clarifications (#19779) 2024-01-19 14:07:15 -05:00
Adrian Todorov
1eb1dbfa36 docs: update PKI example in template block with the new pkiCert function (#19394) 2023-12-08 14:23:12 -05:00
Tim Gross
694a5ec19d docs: remove stale note about generate_lease from template docs (#18895)
Prior to `consul-template` v0.22.0, automatic PKI renewal wouldn't work properly
based on the expiration of the cert. More recent versions of `consul-template`
can use the expiry to refresh the cert, so it's no longer necessary (and in fact
generates extra load on Vault) to set `generate_lease`. Remove this
recommendation from the docs.

Fixes: #18893
2023-10-27 11:09:09 -04:00
Gunnar
76ebb3fe55 docs: added accessor info to Tuples in template.mdx (#18101) 2023-07-31 11:03:12 -04:00
Roman Zipp
22f5217b85 docs: remove unneeded brackets from job specification template docs (#17219) 2023-05-17 16:45:00 -04:00
Tim Gross
03d6a8c70a docs: note that secrets dir is usually mounted noexec (#16363) 2023-03-07 11:57:15 -05:00
Glen Yu
813fd6ed98 docs: removed extra 'end' in one of the code blocks in template stanza documentation (#15963) 2023-01-31 13:55:10 -05:00
Piotr Kazmierczak
949a6f60c7 renamed stanza to block for consistency with other projects (#15941) 2023-01-30 15:48:43 +01:00
Ashlee M Boyer
3444ece549 docs: Migrate link formats (#15779)
* Adding check-legacy-links-format workflow

* Adding test-link-rewrites workflow

* chore: updates link checker workflow hash

* Migrating links to new format

Co-authored-by: Kendall Strautman <kendallstrautman@gmail.com>
2023-01-25 09:31:14 -08:00
Cyrille Colin
f6ebb66c86 Update template.mdx (#15737)
fix typo issue in variable url : remove unwanted "r"
2023-01-10 10:42:33 +01:00
Seth Hoenig
106dce9c9f docs: clarify how to access task meta values in templates (#15212)
This PR updates template and meta docs pages to give examples of accessing
meta values in templates. To do so one must use the environment variable form
of the meta key name, which isn't obvious and wasn't yet documented.
2022-11-10 16:11:53 -06:00
Charlie Voiselle
52a254ba22 template: error on missing key (#15141)
* Support error_on_missing_value for templates
* Update docs for template stanza
2022-11-04 13:23:01 -04:00
Bryce Kalow
67d39725b1 website: content updates for developer (#14473)
Co-authored-by: Geoffrey Grosenbach <26+topfunky@users.noreply.github.com>
Co-authored-by: Anthony <russo555@gmail.com>
Co-authored-by: Ashlee Boyer <ashlee.boyer@hashicorp.com>
Co-authored-by: Ashlee M Boyer <43934258+ashleemboyer@users.noreply.github.com>
Co-authored-by: HashiBot <62622282+hashibot-web@users.noreply.github.com>
Co-authored-by: Kevin Wang <kwangsan@gmail.com>
2022-09-16 10:38:39 -05:00
Tim Gross
6574717c55 docs: update template for Nomad Variables (#14527) 2022-09-12 16:36:18 -04:00
Piotr Kazmierczak
34e4b080f6 template: custom change_mode scripts (#13972)
This PR adds the functionality of allowing custom scripts to be executed on template change. Resolves #2707
2022-08-24 17:43:01 +02:00
Luiz Aoqui
934bafb922 template: use pointer values for gid and uid (#14203)
When a Nomad agent starts and loads jobs that already existed in the
cluster, the default template uid and gid was being set to 0, since this
is the zero value for int. This caused these jobs to fail in
environments where it was not possible to use 0, such as in Windows
clients.

In order to differentiate between an explicit 0 and a template where
these properties were not set we need to use a pointer.
2022-08-22 16:25:49 -04:00
dgotlieb
1d9e6f94f8 doc typo fix
docker and podman don't suck 🤣
2022-08-10 15:04:07 +03:00
Luiz Aoqui
a37ef39b8f template: set default UID/GID to -1 (#13998)
UID/GID 0 is usually reserved for the root user/group. While Nomad
clients are expected to run as root it may not always be the case.

Setting these values as -1 if not defined will fallback to the pervious
behaviour of not attempting to set file ownership and use whatever
UID/GID the Nomad agent is running as. It will also keep backwards
compatibility, which is specially important for platforms where this
feature is not supported, like Windows.
2022-08-04 11:26:08 -04:00
Piotr Kazmierczak
2e0b875b14 client: enable specifying user/group permissions in the template stanza (#13755)
* Adds Uid/Gid parameters to template.

* Updated diff_test

* fixed order

* update jobspec and api

* removed obsolete code

* helper functions for jobspec parse test

* updated documentation

* adjusted API jobs test.

* propagate uid/gid setting to job_endpoint

* adjusted job_endpoint tests

* making uid/gid into pointers

* refactor

* updated documentation

* updated documentation

* Update client/allocrunner/taskrunner/template/template_test.go

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>

* Update website/content/api-docs/json-jobs.mdx

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>

* propagating documentation change from Luiz

* formatting

* changelog entry

* changed changelog entry

Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2022-08-02 22:15:38 +02:00
Tim Gross
f295396ef8 docs: rename Internals to Concepts (#13696) 2022-07-11 16:55:33 -04:00
Seth Hoenig
142918ac9f docs: fixup from cr comments 2022-07-07 08:37:10 -05:00
Seth Hoenig
39fd91fe2e docs: add docs for simple load balancing nomad services
This PR adds a section to template docs for simple load balancing with nomad servicse.
2022-07-06 17:34:30 -05:00
Chetan Sarva
76e6b5d27e docs: add version note to nomad services template (#12910) 2022-05-06 17:39:27 +02:00
Tim Gross
1f1c970135 docs: fix broken link from template to client config (#12733) 2022-04-21 11:04:04 -04:00
James Rasell
52acfcd867 docs: add nomad services template jobspec example. (#12514) 2022-04-08 17:29:19 +02:00
Derek Strickland
43edd0e709 Expose Consul template configuration parameters (#11606)
This PR exposes the following existing`consul-template` configuration options to Nomad jobspec authors in the `{job.group.task.template}` stanza.

- `wait`

It also exposes the following`consul-template` configuration to Nomad operators in the `{client.template}` stanza.

- `max_stale`
- `block_query_wait`
- `consul_retry`
- `vault_retry` 
- `wait` 

Finally, it adds the following new Nomad-specific configuration to the `{client.template}` stanza that allows Operators to set bounds on what `jobspec` authors configure.

- `wait_bounds`

Co-authored-by: Tim Gross <tgross@hashicorp.com>
Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
2022-01-10 10:19:07 -05:00
Luiz Aoqui
15db86a6af docs: add more references and examples to the template block (#11691) 2021-12-16 14:14:01 -05:00
Bryce Kalow
ee79587a67 feat(website): migrates to new nav data format (#10264) 2021-03-31 08:43:17 -05:00
Karan Sharma
06744e0f9d fix: docs/job-specification change mounts to mount
Since [mounts](https://www.nomadproject.io/docs/drivers/docker#mounts) is deprecated,
switch to newer `mount` in `task.config` for `docker` driver.
2021-02-10 08:24:58 -05:00
Jeff Escalante
0eae603a86 implement mdx remote 2021-01-05 19:02:39 -05:00