From 156975c62f9d5ac6dd3e1d23c6c3967be1e3db9a Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 8 Dec 2016 10:35:40 -0800 Subject: [PATCH 1/2] Client meta is a map[string]string --- website/source/docs/agent/configuration/client.html.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/source/docs/agent/configuration/client.html.md b/website/source/docs/agent/configuration/client.html.md index 601a255c6..f3bfd2dbe 100644 --- a/website/source/docs/agent/configuration/client.html.md +++ b/website/source/docs/agent/configuration/client.html.md @@ -46,7 +46,7 @@ client { job is allowed to wait to exit. Individual jobs may customize their own kill timeout, but it may not exceed this value. -- `meta` ([Meta][]: nil) - Specifies a key-value map that annotates +- `meta` `(map[string]string: nil)` - Specifies a key-value map that annotates with user-defined metadata. - `network_interface` `(string: "lo | lo0")` - Specifies the name of the From 5a593da3cd2703642b4705d64f5f1e2965fb516d Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Thu, 8 Dec 2016 10:45:33 -0800 Subject: [PATCH 2/2] Fix broken meta links --- website/source/docs/agent/configuration/client.html.md | 2 -- .../source/docs/job-specification/constraint.html.md | 10 +++++----- website/source/docs/job-specification/job.html.md | 1 - website/source/docs/runtime/interpolation.html.md | 4 ++-- 4 files changed, 7 insertions(+), 10 deletions(-) diff --git a/website/source/docs/agent/configuration/client.html.md b/website/source/docs/agent/configuration/client.html.md index f3bfd2dbe..e06b05aab 100644 --- a/website/source/docs/agent/configuration/client.html.md +++ b/website/source/docs/agent/configuration/client.html.md @@ -299,5 +299,3 @@ client { } } ``` - -[meta]: /docs/job-specification/meta.html "Nomad meta Job Specification" diff --git a/website/source/docs/job-specification/constraint.html.md b/website/source/docs/job-specification/constraint.html.md index eb7c87014..bbafbb7d6 100644 --- a/website/source/docs/job-specification/constraint.html.md +++ b/website/source/docs/job-specification/constraint.html.md @@ -24,9 +24,9 @@ description: |- The `constraint` allows restricting the set of eligible nodes. Constraints may -filter on [attributes][interpolation] or [metadata][meta]. Additionally -constraints may be specified at the [job][job], [group][group], or [task][task] -levels for ultimate flexibility. +filter on [attributes][interpolation] or [client metadata][client-meta]. +Additionally constraints may be specified at the [job][job], [group][group], or +[task][task] levels for ultimate flexibility. ```hcl job "docs" { @@ -46,7 +46,7 @@ job "docs" { task "server" { # All tasks must run where "my_custom_value" is greater than 3. constraint { - attribute = "${meta.my_custom_value}" + attribute = "${node.meta.my_custom_value}" operator = ">" value = "3" } @@ -217,6 +217,6 @@ constraint { [job]: /docs/job-specification/job.html "Nomad job Job Specification" [group]: /docs/job-specification/group.html "Nomad group Job Specification" -[meta]: /docs/job-specification/meta.html "Nomad meta Job Specification" +[client-meta]: /docs/agent/configuration/client.html#meta "Nomad meta Job Specification" [task]: /docs/job-specification/task.html "Nomad task Job Specification" [interpolation]: /docs/runtime/interpolation.html "Nomad interpolation" diff --git a/website/source/docs/job-specification/job.html.md b/website/source/docs/job-specification/job.html.md index e703aed1c..844dba133 100644 --- a/website/source/docs/job-specification/job.html.md +++ b/website/source/docs/job-specification/job.html.md @@ -219,5 +219,4 @@ $ VAULT_TOKEN="..." nomad run example.nomad [task]: /docs/job-specification/task.html "Nomad task Job Specification" [update]: /docs/job-specification/update.html "Nomad update Job Specification" [vault]: /docs/job-specification/vault.html "Nomad vault Job Specification" -[meta]: /docs/job-specification/meta.html "Nomad meta Job Specification" [scheduler]: /docs/runtime/schedulers.html "Nomad Scheduler Types" diff --git a/website/source/docs/runtime/interpolation.html.md b/website/source/docs/runtime/interpolation.html.md index e8da3a22c..531dcb92a 100644 --- a/website/source/docs/runtime/interpolation.html.md +++ b/website/source/docs/runtime/interpolation.html.md @@ -92,12 +92,12 @@ driver. linux-64bit - ${attr.<property>} + ${node.attr.<property>} Property given by property on the client ${attr.arch} => amd64 - ${meta.<key>} + ${node.meta.<key>} Metadata value given by key on the client ${meta.foo} => bar