mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Move service validation explanation doc
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user