Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't force uppercase meta keys in env vars #2338

Merged
merged 1 commit into from
Feb 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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