From bfd34bb1e81940aac81afa52e5af6d0758889aff Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Mon, 20 Feb 2017 19:51:24 -0800 Subject: [PATCH] Don't force uppercase meta keys in env vars --- client/driver/env/env.go | 1 + website/source/docs/runtime/environment.html.md | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/driver/env/env.go b/client/driver/env/env.go index 9ae838d0883..56f1cf322da 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 c5823820cbe..88bdd42670f 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