mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 18:05:42 +03:00
Rkt driver clears task environment variables
This commit is contained in:
@@ -114,6 +114,11 @@ func (d *RktDriver) Start(ctx *ExecContext, task *structs.Task) (DriverHandle, e
|
||||
|
||||
// Inject the environment variables.
|
||||
envVars := TaskEnvironmentVariables(ctx, task)
|
||||
|
||||
// Clear the task directories as they are not currently supported.
|
||||
envVars.ClearTaskLocalDir()
|
||||
envVars.ClearAllocDir()
|
||||
|
||||
for k, v := range envVars.Map() {
|
||||
cmd_args = append(cmd_args, fmt.Sprintf("--set-env=%v=%v", k, v))
|
||||
}
|
||||
|
||||
@@ -30,7 +30,8 @@ hash, ACI address or docker registry.
|
||||
|
||||
The `Rkt` driver does not currently support mounting the `alloc/` and `local/`
|
||||
directory. It is currently blocked by this [Rkt
|
||||
issue](https://github.com/coreos/rkt/issues/761).
|
||||
issue](https://github.com/coreos/rkt/issues/761). As such the coresponding
|
||||
[environment variables](/docs/jobspec/environment.html#task_dir) are not set.
|
||||
|
||||
## Client Requirements
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ exported as environment variables for consistency, e.g. `NOMAD_PORT_5000`.
|
||||
|
||||
Please see the relevant driver documentation for details.
|
||||
|
||||
### Task Directories
|
||||
<a id="task_dir">### Task Directories</a>
|
||||
|
||||
Nomad makes the following two directories available to tasks:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user