-
-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow templating in .gomplateignore
, so folder can be dynamically excluded by configs
#1685
Comments
Hi @thesuperzapper, thanks for the suggestion. In theory you could do this in a two-phase approach - first generate the If that doesn't work for you, please let me know more detail on how you think this could work, and what sort of benefit it would have. |
@hairyhenderson In my specific case, it would be quite problematic to do a two-phase approach. The general case where it's useful to template the For example, if you have the following
You might want to provide a
With the content of
Which would produce an
|
Hrm... With this particular example it seems simpler to just run with two separate $ gomplate --input-dir=templates/folder_2/ --output-dir=out/folder_2/ The intent of the |
Is it currently possible to invoke gomplate with multiple Also, my example is intentionally simplified, you could have much more complex conditions in the situation where you want to treat a single I appreciate the complexity of supporting templates in the Alternatively, as you said, a user could set up a two-phase approach, but with the "model for your directory" use case described above, they would probably need to use a different delimiter for the first ( |
No, sorry - I meant invoking gomplate twice. What you're talking about sounds similar to what was discussed a few years back in #589 - maybe some of the concepts discussed there could be applied to what you're looking for? Another approach could be to just use multiple Ultimately, I want to be very careful not to add more complexity to gomplate without very strong reasons to do so (it's far too complex as it is!) |
@hairyhenderson for now, in deployKF (which uses gomplate internally), I am just going to invoke the render twice:
I will be interested to see if any other possible solutions crop up. |
I think I'm understanding your use-case a bit better (from #1690). I think what's probably ideal in your case is to simply not use the How does that sound? |
@hairyhenderson I am trying to keep my "source" templates as a self-contained artifact, and only use my CLI (which wraps the For example, the following deploykf \
--source-version=v0.1.0 \
--values "./custom-values.yaml" \
--output-dir "./GENERATOR_OUTPUT" In your approach, I would have to make the PS: I have already implemented the above example behavior in |
This issue is stale because it has been open for 60 days with no activity. Remove |
I was looking for a way to optionally exclude sub-folders of my
--input-dir=
depending on the values of specific data source configs.If this is not already possible with some other method, could we consider enabling
{{
templates inside the.gomplateignore
files?The text was updated successfully, but these errors were encountered: