yaml-overlay-tool

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2021 License: MIT

README

Go Reference GitHub go.mod Go version Go Report Card GitHub GitHub release (latest by date)

YAML Overlay Tool (Yot)

YAML Overlay Tool, or Yot for short, often pronounced /yaucht/, is a tool to assist with patching YAML files. Yot uses JSONPath to query YAML documents within YAML files, and to perform a change. YAML Overlay Tool operates on YAML nodes. It is able to preserve and inject head, foot, and line comments into the new output versions of the files that you manipulate.

Why Create Another YAML Tool?

Yot is designed to be flexible, simple, and familiar; with a focus on end-user and developer experience. Whether you want to use a templating language to transform YAML data, or just change a couple values in a YAML document, Yot can make it possible.

NOTE In order to port the protype Python version of Yot to be written in Go, we temporarily stripped out the templating language functionality. A robust set of options is planned for version v0.3.0.

Our philosophy is to treat YAML manifests as source code. We don't want to manage templated YAML files. We want to manage patches (overlays) and keep all potential templating outside of the source YAML files.

Templated files are hard to manage over time, making them difficult to read. Yot allows us to take YAML documents from multiple sources and transform them to fit our environment requirements through overlays. This practice allows us to manipulate a generic YAML file, without contaminating the original file. This practice also stops the cycle of having to update and manage complex YAML templates.

At the same time, Yot's instructions file specification provides you with documentation-as-code. This is because you have documented all the required changes to source YAML files in one place, including what is required to get an application running in your environment.

The use of JSONPath queries and templating give the tool familiar interfaces, making adoption easier, and providing for a more pleasant end-user experience. The specification, also known as the instructions file, is assembled in a declarative way, where we only operate on what is clearly defined. We take actions based on JSONPath query results. We provide flexibility by allowing your instructions to be templated if needed (functionality will return in v0.3.0). See the full documentation, which will help get you moving along with Yot!

Author

Andrew J. Huffman
Jeff Davis

License

MIT
NOTICE

Contributing

Please see our Contribution Guide

Code of Conduct

Please see our project's Code of Conduct

Communication

E-Mail

Please join our mailing list on Google Groups: yaml-overlay-tool-users

Full Documentation and User Guide

docs/documentation.md

Directories

Path Synopsis
cmd
yot
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL