All your YAML shaping in one tool
Template and patch as needed to easily make your configuration reusable and extensible. Works with your own and third-party YAML configuration.
ytt templates are plain YAML documents made from nodes such as maps and arrays. ytt allows you to set values and attach statements (such as if and for loops) on those nodes. This eliminates text insertion concerns like manual escaping and allows for easy structure reuse, thus, increasing readability.
Weave ytt templating into your own configuration, externalize values to variables, extract repeated snippets to functions, and make whole sections conditional. Patch on top of any configuration using ytt overlays. Express precise structural edits and invariant declaratively.
ytt execution environment is hermetic and side-effect free, with no access to filesystem, network, time, randomness, or the operating system interfaces. This guarantees that templates produce identical output with the same inputs. Your configuration changes only when you change it.
Makes template code look familiar by including a sandboxed Pythonic language.
"-listen=:" + str(data.values.port).
Patch YAML structures via the builtin
Template any YAML content, including, Kubernetes configuration, Concourse pipelines, AWS CloudFormation configurations, etc.
# Configurations picked up from a directory $ ytt -f playground/basics/example-demo/ | kubectl apply -f- # Input customized on command line or file configuration $ ytt -f playground/basics/example-demo/ --data-value-yaml service.enabled=false | ... # Give as many configuration files as needed $ ytt -f playground/basics/example-demo/ -f values-staging.yml -f overlay-env-1.yml | ...
Edit files on the left, and see template results on the right. Alternatively, click through above examples to see different features. We do not store or use content entered into playground.