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
deleteunneeded data from YAML documents - Ability to
injectnew data into YAML documents when a JSONPath query returns no results - Ability to
mergenew data with existing data in YAML documents - Ability to
replaceexisting data with new data in YAML documents - Ability to
combineexisting values returned from your JSONPathquerywith 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
queryand format markers an end-user can take the returned original data and manipulate it with or without asedimplementation
- 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
yoton how to manipulate the YAML data - Three levels of specificity in regards to how to manipulate YAML documents within YAML files
commonOverlaysaffect all YAML documents with all YAML filesoverlaysaffect all YAML documents within a specific YAML filedocumentsaffect a specific YAML document within a specific YAML file
- Overlay Qualifiers provide a way to conditionally apply overlays to a YAML document
- Groups of
conditionsthat must all match - Multiple
conditionsgroups 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
outputPathkey- 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