markround.com

DevOps, Sound Engineering and other things of interest...

Tiller 0.7.6 and Environment JSON V2

| Comments

I recently released Tiller 0.7.6 with a new feature for the environment_json plugin. This can be used to provide dynamic configuration for Docker containers, using JSON in an environment variable. I previously posted a complete example of how you’d make use of this. However, most Tiller plugins provide values as “global” sources, which will be over-ridden by local, template-specific values. The documentation makes note of this in the “Gotchas” section, but there’s now another alternative to using global plugins all the way through.

If your JSON structure contains a "_version" : 2 key:value pair, Tiller will source global values from a global key, and treat other keys as being template-specific. For example :

tiller_json
1
2
3
4
5
6
7
8
9
{
  "_version" : 2,
  "global" : {
    "global_value" : "This is a global value available to all templates"
  },
  "template.erb" : {
    "local_value" : "This will create or over-ride the 'local_value' only on template.erb"
  }
}

Only a minor update, but hopefully it should add some flexibility around value precedence :)

Comments