Skip to content

Commit

Permalink
docs: add some extra documentation around client host environment var…
Browse files Browse the repository at this point in the history
…iables (#11208)

Co-authored-by: Michael Schurter <mschurter@hashicorp.com>
  • Loading branch information
lgfa29 and schmichael committed Sep 21, 2021
1 parent 2c607fc commit 4eb902d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions website/content/docs/job-specification/meta.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Metadata is merged up the job specification, so metadata defined at the job
level applies to all groups and tasks within that job. Metadata defined at the
group layer applies to all tasks within that group.

Meta values are made available inside tasks as [runtime environment variables][env_meta].

## `meta` Parameters

The "parameters" for the `meta` stanza can be any key-value. The keys and values
Expand Down Expand Up @@ -93,3 +95,4 @@ meta = {
[group]: /docs/job-specification/group 'Nomad group Job Specification'
[task]: /docs/job-specification/task 'Nomad task Job Specification'
[interpolation]: /docs/runtime/interpolation 'Nomad interpolation'
[env_meta]: /docs/runtime/environment#meta
8 changes: 8 additions & 0 deletions website/content/docs/runtime/environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ Currently there is no enforcement that the meta keys be lowercase, but using
multiple keys with the same uppercased representation will lead to undefined
behavior.

## Host environment variables

Nomad passes the environment variables defined in the client host to tasks when
using the `exec`, `raw_exec`, and `java` task drivers. The variables that are
passed to the tasks can be controlled using the client configuration
[`env.denylist`][].

[jobspec]: /docs/job-specification 'Nomad Job Specification'
[vault]: /docs/vault-integration 'Nomad Vault Integration'
[filesystem internals]: /docs/internals/filesystem
[`env.denylist`]: /docs/configuration/client#env-denylist

0 comments on commit 4eb902d

Please sign in to comment.