Skip to content

Commit

Permalink
Don't force uppercase meta keys in env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Feb 21, 2017
1 parent 1d910e9 commit bfd34bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/driver/env/env.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ func (t *TaskEnvironment) Build() *TaskEnvironment {
// Build the meta
for k, v := range t.TaskMeta {
t.TaskEnv[fmt.Sprintf("%s%s", MetaPrefix, strings.ToUpper(k))] = v
t.TaskEnv[fmt.Sprintf("%s%s", MetaPrefix, k)] = v
}

// Build the ports
Expand Down
4 changes: 3 additions & 1 deletion website/source/docs/runtime/environment.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ The job specification also allows you to specify a `meta` block to supply arbitr
configuration to a task. This allows you to easily provide job-specific
configuration even if you use the same executable unit in multiple jobs. These
key-value pairs are passed through to the job as `NOMAD_META_<key>=<value>`
environment variables, where `key` is UPPERCASED from the job specification.
environment variables. Prior to Nomad 0.5.5 the key was uppercased and since
then both the original case and an uppercased version are injected. The
uppercased version will be deprecated in a future release.

Currently there is no enforcement that the meta keys be lowercase, but using
multiple keys with the same uppercased representation will lead to undefined
Expand Down

0 comments on commit bfd34bb

Please sign in to comment.