-
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
Add "distinctHost" constraint #321
Conversation
@@ -237,6 +237,14 @@ The `constraint` object supports the following keys: | |||
the attribute. This sets the operator to "regexp" and the `value` | |||
to the regular expression. | |||
|
|||
* `unique` - Unique accepts a boolean value and can be used to mark a Job or | |||
a Task Group as requiring placement on unique nodes. If the `unique` | |||
constraint is placed on a Job, all of it's Task Groups must be placed on |
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.
it's
should not have an apostrophe
* `distinctHosts` - `distinctHosts` accepts a boolean `true`. The default is | ||
`false`. | ||
|
||
When `distinctHosts is `true` at the Job level, each instance of all Task |
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.
Missing backtick on distinctHosts
@@ -256,6 +257,20 @@ func parseConstraints(result *[]*structs.Constraint, obj *hclobj.Object) error { | |||
m["RTarget"] = constraint | |||
} | |||
|
|||
if value, ok := m["distinctHosts"]; ok { |
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.
Nothing in HCL uses camal case
LGTM other than changes |
Add leveled logging
I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions. |
This PR adds a distinctHost constraint that can be applied to either Task Groups or Jobs.