feat: helmfile.yaml layering enhancements#587
Merged
Conversation
This adds the new configuration key `baeses` to your helmfile.yaml files, so that you can layer them without the `readFile` template function, which was a bit unintuitive. Please see #388 (comment) for more context
This splits your helmfile.yaml by the YAML document separator "---" before evaluating go template expressions as outlined in #388 (comment)
This was referenced May 13, 2019
Contributor
|
Awesome! |
Collaborator
Author
|
Thanks for reviewing! |
This was referenced May 14, 2019
Closed
Contributor
|
trying to use |
Collaborator
Author
|
@bitsofinfo This PR includes the documentation update as well. Do you see any error messages? |
This was referenced May 28, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The current Layering system didn't work as documented, as it relies on helmfile to template each "part" of your helmfile.yaml THEN merge them one by one.
The reality was that helmfile template all the parts of your helmfile.yaml at once, and then merge those YAML documents. In #388 (comment), @sruon was making a GREAT point that we may need to change helmfile to render templates earlier - that is to evaluate a template per each helmfile.yaml part separated by
---. Sorry I missed my expertise to follow your great idea last year @sruon 😭Anyways, this, in combination with the wrong documentation, has made so many people confused. To finally overcome this situation, here's a fairly large PR that introduces the 2 enhancements:
bases:for easier layering without go template expressions, especially{{ readFunc "path/to/file" }}s. This is the first commit of this PR.helmfile.yamlis splited by the separator---at first. Each part is then rendered as a go template(double-render applies as before). Finally, All the results are merged in the order of occurence. I assume this as an enhanced version of @sruon's work. This is the second commit of this PR.Resolves #388
Resolve #584
Resolves #585 (
HELMFILE_EXPERIMENTA=true -f helmfile.yaml helmfiledisables the whole-file templating, treating the helmfile.yaml as a regular YAML file as the file ext. denotes. Usehelmfile.yaml.gotmplorhelmfile.gotmplto enable)Fixes #568 (Use
basesorreadFilerather than not importing implicitly withhelmfile.d