mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
Fix documentation for interpolating attrs/meta
This PR fixes the website documentation to correctly present the way of specifying constraints on node meta and attributes.
This commit is contained in:
@@ -46,7 +46,7 @@ job "docs" {
|
||||
task "server" {
|
||||
# All tasks must run where "my_custom_value" is greater than 3.
|
||||
constraint {
|
||||
attribute = "${node.meta.my_custom_value}"
|
||||
attribute = "${meta.my_custom_value}"
|
||||
operator = ">"
|
||||
value = "3"
|
||||
}
|
||||
@@ -210,7 +210,7 @@ utilizing node [metadata][meta].
|
||||
|
||||
```hcl
|
||||
constraint {
|
||||
attribute = "${node.meta.cached_binaries}"
|
||||
attribute = "${meta.cached_binaries}"
|
||||
set_contains = "redis,cypress,nginx"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -92,12 +92,12 @@ driver.
|
||||
<td><tt>linux-64bit</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>${node.attr.<property>}</tt></td>
|
||||
<td><tt>${attr.<property>}</tt></td>
|
||||
<td>Property given by <tt>property</tt> on the client</td>
|
||||
<td><tt>${attr.arch} => amd64</tt></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><tt>${node.meta.<key>}</tt></td>
|
||||
<td><tt>${meta.<key>}</tt></td>
|
||||
<td>Metadata value given by <tt>key</tt> on the client</td>
|
||||
<td><tt>${meta.foo} => bar</tt></td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user