mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 01:45:44 +03:00
add ability to specify user for rkt
This commit is contained in:
@@ -26,6 +26,7 @@ IMPROVEMENTS:
|
||||
* driver/docker: Adds support for `ulimit` and `sysctl` options [GH-3568]
|
||||
* driver/docker: Adds support for StopTimeout (set to the same value as
|
||||
kill_timeout [GH-3601]
|
||||
* driver/rkt: Add support for passing through user [GH-3612]
|
||||
* driver/qemu: Support graceful shutdowns on unix platforms [GH-3411]
|
||||
* template: Updated to consul template 0.19.4 [GH-3543]
|
||||
* core/enterprise: Return 501 status code in Nomad Pro for Premium end points
|
||||
|
||||
@@ -569,6 +569,11 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (*StartResponse,
|
||||
|
||||
}
|
||||
|
||||
// If a user has been specified for the task, pass it through to the user
|
||||
if task.User != "" {
|
||||
prepareArgs = append(prepareArgs, fmt.Sprintf("--user=%s", task.User))
|
||||
}
|
||||
|
||||
// Add user passed arguments.
|
||||
if len(driverConfig.Args) != 0 {
|
||||
parsed := ctx.TaskEnv.ParseAndReplace(driverConfig.Args)
|
||||
|
||||
Reference in New Issue
Block a user