Data
Example https://github.com/buttahtoast/helmize/tree/main/examples/data
Data is shared over a specific field across all files. Data can originate from Conditions or you can manipulate the data to a certain extend.
With Data manipulation you can potentialy break the entire functionality. Make sure to only manipulate values under $.Data and be aware of what you are doing.
You can manipulate data from files into the shared file store, since the set
and unset
execute on the interface and do not return a result. Such operations can be done in files with don’t have any content at all and no matching id, since the given context which templates the file is target by those operations.
This way you add data, which will be available for all the following files:
Seting data which originates from condition data will only overwrite it for the current file (All YAMLs within that file). For the next file the condition data is newly merged and therefor present again.
Overwrite the key layer1.overwrite
The layer1.overwrite
will not be overwritten in the result.
Unseting data which originates from condition data will only unset it for the current file (All YAMLs within that file). For the next file the condition data is newly merged and therefor present again.
Unsets the data key unwated
and layer1
.
The unwanted
key will no longer be present, the layer1
will be present, since it’s from the layer1 condition.