YAML Overlay Tool features
Here’s a quick introduction to YAML Overlay Tool’s set of features, and why you might want to consider using the tool.
- JSONPath queries
- Yot uses JSONPath to lookup data from existing YAML documents within YAML files
- Provides the user a familiar interface and a means to extend existing skills
- Allows for convenient data manipulation
- Ability to
delete
unneeded data from YAML documents - Ability to
inject
new data into YAML documents when a JSONPath query returns no results - Ability to
merge
new data with existing data in YAML documents - Ability to
replace
existing data with new data in YAML documents - Ability to
combine
existing values returned from your JSONPathquery
with new values of the same type- Allows for integer addition
- Allows for string concatenation
- Allows for boolean addition
- Ability to remove existing comments from YAML documents prior to further manipulation of the data
- Ability to manipulate the value of data returned from JSONPath queries
- By the use of your JSONPath
query
and format markers an end-user can take the returned original data and manipulate it with or without ased
implementation
- By the use of your JSONPath
- Ability to both preserve and inject new comments into a YAML document
- This is useful for additional tooling that can consume comments
- Useful when you want to leave end-users of the configuration notes as to why something is setup the way it is
- Ability to perform one-off overlays from the CLI
- Declarative YAML specification (instructions file) to direct
yot
on how to manipulate the YAML data - Three levels of specificity in regards to how to manipulate YAML documents within YAML files
commonOverlays
affect all YAML documents with all YAML filesoverlays
affect all YAML documents within a specific YAML filedocuments
affect a specific YAML document within a specific YAML file
- Overlay Qualifiers provide a way to conditionally apply overlays to a YAML document
- Groups of
conditions
that must all match - Multiple
conditions
groups act as an implicit or, meaning if all the conditions of one of the groups match, the overlay will be applied
- Groups of
- Ability to operate on a single YAML file or entire directories of YAML files from anywhere on the filesystem
- Ability to redirect where an overlayed YAML file will be placed within the output directory with the
outputPath
key- When working with directories, a secondary listing of a specific filename can also be made to override where its final output location will be
- Ability to use Go templating and Go templating Sprig functions within the instructions file