-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make validate command ignore environment variables in service name #3558
Changes from 1 commit
05d52b6
f630ae3
38798c8
800c6e3
436a5f7
24f9632
f75e4c1
800f5cb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about: Validation of the name occurs in two parts. When the job is registered, an initial validation pass checks that the service name adheres to RFC-1123 §2.1 and the length limit, excluding any variables requiring interpolation. Once the client receives the service and all interpretable values are available, the service name will be interpolated and revalidated. This can cause certain service names to pass validation at submit time but fail at runtime. |
||
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 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove from here and instead add to: https://www.nomadproject.io/docs/job-specification/service.html#name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not a fan of any specific validation details on this page since then we will end up documenting validation details here and on the specific stanzas.