diff --git a/client/driver/env/env.go b/client/driver/env/env.go index 9ae838d08..56f1cf322 100644 --- a/client/driver/env/env.go +++ b/client/driver/env/env.go @@ -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 diff --git a/website/source/docs/runtime/environment.html.md b/website/source/docs/runtime/environment.html.md index c5823820c..88bdd4267 100644 --- a/website/source/docs/runtime/environment.html.md +++ b/website/source/docs/runtime/environment.html.md @@ -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_=` -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