Skip to content

Instantly share code, notes, and snippets.

@jrboelens
Last active February 27, 2020 19:15
Show Gist options
  • Save jrboelens/c39d841c434062f762d1e0a00e4571b1 to your computer and use it in GitHub Desktop.
Save jrboelens/c39d841c434062f762d1e0a00e4571b1 to your computer and use it in GitHub Desktop.
ytt data/values example
#@data/values
---
pop:
name: iad #! this is configured and meant to be reusable by anyone that needs iad specific data
nodes:
foo:
autostart: true
pop: #! I want this value to be overridden from an overlay OR be able to reference pop.name from above
bar:
autostart: true
pop:
#@data/values
---
nodes:
foo:
autostart: true
pop: par #! data.values.pop.name <-- I'd like to use this reference here
bar:
autostart: false
pop: iad #! data.values.pop.name
#!/bin/bash
./ytt -f iad_default.yaml -f overlay.yaml -f sample.tmpl.yaml
#@ load("@ytt:data", "data")
nodes:
foo:
pop: #@ data.values.nodes.foo.pop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment