Carvel Logo

Playground Examples Index


How Plain YAML is parsed

Datatypes in Starlark are encoded in YAML

Local variables within a template

Surrounding YAML with an if statement

Looping or Generating YAML with a for loop

Making a mini-template or extracting a chunk of YAML using a function

Including helper functions from another file using load()

Encoding or hashing a string

Including a function from a library

Asserting on a particular value or condition

Declaring and using Data Values

Loading and including data from a text or CSV file

Templating strings and key names using text templating

Inserting a YAML fragment or a value using template.replace()

Modifying or editing a YAML fragment with an overlay

Writing an overlay that applies over all the other documents

Splitting data values into multiple files

Grouping and using multiple templates as a set using libraries

Simple Kubernetes example with a Pod and a Service

Kubernetes example producing multiple applications from data values

Helm Chart like output from ytt

A complete working example of many ytt features


Overlay matching on all documents

Overlay matching on specific documents

Overlay matching on specific documents using a YAML Fragment

Overlay matching on a specific document by index

Overlay matching on an array item by a specific field or key

Overlay that inserts an array item at a specific spot

Overlay that replaces an array item

Overlay that removes or deletes an array item

Overlay that edits or modifies an array item in place

Overlay that appends an array item (inserts at the end)

Overlay that completely replaces the contents of an array

Overlay that adds a new map item or field

Overlay that edits the value of a map item or field

Overlay that removes or deletes a map item or field

Overlay that renames the key or field of a map item

Overlay that add or appends a map into an array item

(Help improve our docs: edit this page on GitHub)