Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

Support global env parameters #421

Merged
merged 7 commits into from Apr 6, 2018

Conversation

bryanl
Copy link
Member

@bryanl bryanl commented Apr 6, 2018

Adds env globals.

ks param set department engineering --env default

creates

COMPONENT INDEX PARAM      VALUE
========= ===== =====      =====
unit      0     data       {"key1":"value1","key2":"value2"}
unit      0     department "engineering"
unit      0     name       "unit"
unit2     0     data       {"key1":"value1","key2":"value2"}
unit2     0     department "engineering"
unit2     0     name       "unit2"

Then you can update the department: ks param set department engineering-advanced --env default

COMPONENT INDEX PARAM      VALUE
========= ===== =====      =====
unit      0     data       {"key1":"value1","key2":"value2"}
unit      0     department "engineering-advanced"
unit      0     name       "unit"
unit2     0     data       {"key1":"value1","key2":"value2"}
unit2     0     department "engineering-advanced"
unit2     0     name       "unit2"

And finally you can remove environment globals: ks param delete department --env=default

COMPONENT INDEX PARAM VALUE
========= ===== ===== =====
unit      0     data  {"key1":"value1","key2":"value2"}
unit      0     name  "unit"
unit2     0     data  {"key1":"value1","key2":"value2"}
unit2     0     name  "unit2"

Fixes #420

Signed-off-by: bryanl <bryanliles@gmail.com>
* Adds env param globals. These can be used to attach metadata labels to
every component in an environment.
* Print more debugging info for jsonnet vm invocations

Fixes ksonnet#378

Signed-off-by: bryanl <bryanliles@gmail.com>
Signed-off-by: bryanl <bryanliles@gmail.com>
updating for:

* print object comprehensions
* handle sugar for object fields with string ids

Signed-off-by: bryanl <bryanliles@gmail.com>
Fixes ksonnet#420

Signed-off-by: bryanl <bryanliles@gmail.com>
Signed-off-by: bryanl <bryanliles@gmail.com>
Signed-off-by: bryanl <bryanliles@gmail.com>
@bryanl bryanl force-pushed the support-global-env-parameters branch from 841154f to e79264c Compare April 6, 2018 15:07
@bryanl bryanl merged commit 68d8f75 into ksonnet:master Apr 6, 2018
@bryanl bryanl deleted the support-global-env-parameters branch April 6, 2018 15:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants