A crafted example for exploring how ytt
determines the order in which to process files.
- Download or clone this repo
- Install
ytt
$ brew install vmware-tanzu/carvel/ytt
- Study the directory structure
$ tree fruit/
- Run one of the supplied scripts:
$ ./default_ordering.sh
- Compare the output you see to the order rules described below.
ytt
processes files in order in this way:
- by type — entire sets based on type: schema files first, then data values overlays, then templates, then finally overlays. (illustrated in the “How it Works” page)
- by CLI argument order — files are first grouped by the order in which they came from a -f flag (files from left-most -f are processed first).
- alphabetically — within each of those groups, files are processed in order by their entire file path, lexicographically. (i.e. files are grouped into directories naturally because they sort together).