Overhaul tgen: add support for Helm-like values file. #21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR rewrites most of the app's core functionality to allow to extend it in the future if needed. Most of the behaviour has been kept, except for some new handling. Namely, the deprecation of
--stdin
(which was quite short-lived) in favour of--file -
to keep it in line with other tools likekubectl
and better handling of environment variables file which might break old laxed versions running in the wild.The new addition is also the support for a custom Helm-like values file: a values file like this one:
Can be accessed from the template:
But to also maintain consistency with other tools like Helm, you can access it through
.Values.name
as well:With the rewrite, I've also added a plethora of tests for some edge cases some users reported privately. One of these cases was how I handled the environment variables file. It should be more clear and somewhat close to static strings in Bash, although without support for string interpolation.
Due to the removal of the
--stdin
flag, the new version cut will be a major version change.