Merge pull request #6688 from hashicorp/docs-fix-constraint-link

[docs] Fix link; discuss meta; lint fixes
This commit is contained in:
Charlie Voiselle 2019-11-13 09:34:42 -05:00 committed by GitHub
commit 637a0c003e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 10 deletions

View File

@ -64,7 +64,7 @@ driver) but will be removed in a future release.
- `network_interface` `(string: varied)` - Specifies the name of the interface
to force network fingerprinting on. When run in dev mode, this defaults to the
loopback interface. When not in dev mode, the interface attached to the
default route is used. The scheduler chooses from these fingerprinted IP
default route is used. The scheduler chooses from these fingerprinted IP
addresses when allocating ports for tasks.
If no non-local IP addresses are found, Nomad could fingerprint link-local IPv6
@ -152,12 +152,12 @@ driver) but will be removed in a future release.
which the client will use to allocate IP addresses from.
- `template` <code>([Template](#template-parameters): nil)</code> - Specifies
controls on the behavior of task [`template`](/docs/job-specification/template.html) stanzas.
controls on the behavior of task
[`template`](/docs/job-specification/template.html) stanzas.
- `host_volume` <code>([host_volume](#host_volume-stanza): nil)</code> - Exposes
paths from the host as volumes that can be mounted into jobs.
### `chroot_env` Parameters
Drivers based on [isolated fork/exec](/docs/drivers/exec.html) implement file
@ -340,7 +340,6 @@ see the [drivers documentation](/docs/drivers/index.html).
reserve on all fingerprinted network devices. Ranges can be specified by using
a hyphen separated the two inclusive ends.
### `template` Parameters
- `function_blacklist` `([]string: ["plugin"])` - Specifies a list of template
@ -356,7 +355,7 @@ see the [drivers documentation](/docs/drivers/index.html).
The `host_volume` stanza is used to make volumes available to jobs.
The key of the stanza corresponds to the name of the volume for use in the
The key of the stanza corresponds to the name of the volume for use in the
`source` parameter of a `"host"` type [`volume`](/docs/job-specification/volume.html)
and ACLs.
@ -418,7 +417,9 @@ client {
### Custom Metadata, Network Speed, and Node Class
This example shows a client configuration which customizes the metadata, network
speed, and node class.
speed, and node class. The scheduler can use this information while processing
[constraints][metadata_constraint]. The metadata is completely user configurable;
the values below are for illustrative purposes only.
```hcl
client {
@ -428,9 +429,13 @@ client {
meta {
"owner" = "ops"
"cached_binaries" = "redis,apache,nginx,jq,cypress,nodejs"
"rack" = "rack-12-1"
}
}
```
[plugin-options]: #plugin-options
[plugin-stanza]: /docs/configuration/plugin.html
[server-join]: /docs/configuration/server_join.html "Server Join"
[metadata_constraint]: /docs/job-specification/constraint.html#user-specified-metadata "Nomad User-Specified Metadata Constraint Example"

View File

@ -138,7 +138,7 @@ constraint {
must be 1 or greater and if omitted, defaults to 1. When specified as a job
constraint, it applies to all groups in the job. When specified as a group
constraint, the effect is constrained to that group. This constraint can not
be specified at the task level.
be specified at the task level.
```hcl
constraint {
@ -203,7 +203,7 @@ constraint {
before checking for equality. The default behavior for `"!="` is to include
nodes that don't have that attribute set.
- `"is_not_set"` - Specifies that a given attribute must not be present.
- `"is_not_set"` - Specifies that a given attribute must not be present.
## `constraint` Examples
@ -227,7 +227,7 @@ constraint {
A potential use case of the `distinct_property` constraint is to spread a
service with `count > 1` across racks to minimize correlated failure. Nodes can
be annotated with which rack they are on using [client
be annotated with which rack they are on using [custom client
metadata][client-meta] with values such as "rack-12-1", "rack-12-2", etc.
The following constraint would assure that an individual rack is not running
more than 2 instances of the task group.
@ -273,7 +273,7 @@ constraint {
This example restricts the task to running on nodes where the binaries for
redis, cypress, and nginx are all cached locally. This particular example is
utilizing node [metadata][meta].
utilizing [custom client metadata][client-meta].
```hcl
constraint {
@ -288,3 +288,4 @@ constraint {
[task]: /docs/job-specification/task.html "Nomad task Job Specification"
[interpolation]: /docs/runtime/interpolation.html "Nomad interpolation"
[node-variables]: /docs/runtime/interpolation.html#node-variables- "Nomad interpolation-Node variables"
[client-meta]: /docs/configuration/client.html#custom-metadata-network-speed-and-node-class "Nomad Custom Metadata, Network Speed, and Node Class"