diff --git a/website/source/docs/commands/validate.html.md.erb b/website/source/docs/commands/validate.html.md.erb index cfbb1ebe3..22ee372f2 100644 --- a/website/source/docs/commands/validate.html.md.erb +++ b/website/source/docs/commands/validate.html.md.erb @@ -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 diff --git a/website/source/docs/job-specification/service.html.md b/website/source/docs/job-specification/service.html.md index 50b29d50e..0d34b5a74 100644 --- a/website/source/docs/job-specification/service.html.md +++ b/website/source/docs/job-specification/service.html.md @@ -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: )` - Specifies the label of the port on which this service is running. Note this is the _label_ of the port and not the port