-
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
Nomad Constructor Jobs and Dispatch #2128
Conversation
Change the generated name to timestamp + 8 characters of UUID Add Snappy compression to the input
Children object is always initialized instead of lazily. `nomad status` outputs children summaries and has specialized view for constructor jobs.
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.
this look super amazing
} | ||
alloc.Job.Constructor = &structs.ConstructorConfig{} | ||
|
||
// Add an encrypted payload |
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.
is it encrypted? isn't snappy a compression library?
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.
Yeah good catch!
|
||
func (c *JobDispatchCommand) Help() string { | ||
helpText := ` | ||
Usage: nomad job dispatch [options] <constructor> [input source] |
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.
oh, this is super cool! :)
|
||
// Check that we got exactly one node | ||
args = flags.Args() | ||
if l := len(args); l < 1 || l > 2 { |
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.
why this logic rather than l != 1
?
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 can be one or two but no less and no more :)
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.
the comment says "exactly one node" ? :)
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 introduces:
nomad dispatch
command and API to create an instance of a constructor job.