Move service validation explanation doc

This commit is contained in:
Preetha Appan
2017-11-16 16:58:37 -06:00
parent 800c6e346d
commit 436a5f77cb
2 changed files with 6 additions and 6 deletions

View File

@@ -29,12 +29,6 @@ On successful validation, exit code 0 will be returned, otherwise an exit code
of 1 indicates an error.
Service names are validated according to [RFC-1123](https://tools.ietf.org/html/rfc1123).
Any environment variables in the name are ignored, because some environment variables can only
be resolved at run time. Invalid characters outside of environment variable names will not pass
validation.
For example, if the service name is set to `my_service${NOMAD_NODE_NAME}` it will fail
validation. However, if a service name is set to `myservice${NOMAD_NODE_NAME}` and the node name
contains an invalid character, it will only be caught at run time and nomad validate will succeed.
## Examples

View File

@@ -89,6 +89,12 @@ does not automatically enable service discovery.
- `${GROUP}` - the name of the group
- `${TASK}` - the name of the task
- `${BASE}` - shorthand for `${JOB}-${GROUP}-${TASK}`
Any environment variables in the name are ignored during validation, because some environment variables can only
be resolved at run time. Invalid characters outside of environment variable names will not pass
validation. For example, if the service name is set to `my_service${NOMAD_NODE_NAME}` it will fail
validation. However, if a service name is set to `myservice${NOMAD_NODE_NAME}` and the node name
contains an invalid character, it will only be caught at run time and nomad validate will succeed.
- `port` `(string: <required>)` - Specifies the label of the port on which this
service is running. Note this is the _label_ of the port and not the port