about summary refs log tree commit diff
path: root/templater
AgeCommit message (Collapse)AuthorFilesLines
2017-10-27 refactor templater: Add explicit note about empty-rs warningsVincent Ambo1-1/+4
Due to an interesting combination of an error not being handled and Go initialising everything with what it thinks should be the default, non-existent resource sets have been gracefully handled already. This makes this accidental fix explicit. Fixes #90
2017-10-20 feat templater: Add IP lookup functionStefan Magnus Landrø2-0/+35
This introduces support for looking up IP addresses using local DNS resolver. Function will return a list of all IP addresses associated with hostname. Further processing can be achieved using supported list template functions.
2017-08-31 fix templater: Don't template default.yml filesVincent Ambo1-2/+4
After the change from #84 default variable files with the '.yml' extension got templated as resource set templates accidentally. This resolves the issue by moving the list reserved default file names to a common place and reusing it in both the templater and context pkg. This fixes #85
2017-07-13 refactor templater: Use resource set 'path' field when loading filesVincent Ambo1-2/+3
2017-06-11 fix templater: Ignore slash-suffixes on includes/excludesVincent Ambo1-0/+1
To prevent situations where a shell auto-appends a slash to an include/exclude specification on the CLI, trailing slashes in those string lists are now trimmed. This fixes #54
2017-06-11 fix main: Fix 'kontemplate template' outputVincent Ambo1-2/+2
2017-06-11 refactor templater: Add intermediate type to represent rendered RSesVincent Ambo1-14/+35
As a first step in resolving #51 this refactors the `templater` package to return rendered resource sets as a distinct type. This also fixes #56
2017-05-04 feat templater: Warn if no valid resource sets are includedVincent Ambo1-0/+5
After filtering resource sets, check whether any resource sets "survived". Otherwise it can be assumed that the user specified invalid exclude/include combinations and should be warned about that. Fixes #35
2017-04-04 fix templater: Don't try to template default value filesVincent Ambo1-1/+5
2017-04-04 feat templater: Fail if values are missingVincent Ambo3-1/+21
Golang's template package now has an option for failing if template variables are missing: https://golang.org/pkg/text/template/#Template.Option This updates the templater code to make use of that option and return the errors encountered during templating. This fixes #1
2017-02-20 fix pass: Trim leading & trailing whitespaceVincent Ambo1-1/+4
2017-02-14 chore templater: Use new util.Merge funcVincent Ambo1-11/+2
2017-02-09 feat templater: Add 'pass' lookup functionVincent Ambo2-0/+33
This introduces support for looking up secret values in the 'pass' command line tool (https://www.passwordstore.org/). Values like passwords can be interpolated from pass and even more complex structures like certificates for Kubernetes Secrets can be retrieved and base64- encoded as necessary. Fixes #2
2017-02-09 fix templater: Don't fail with two identical stack tracesVincent Ambo1-1/+2
2017-02-08 feat templater: Add applyLimits testsVincent Ambo1-0/+138
2017-02-08 fix templater & ctx: Correctly check resource set parentVincent Ambo1-1/+1
2017-02-08 fix templater: Guard against empty parent referenceVincent Ambo1-1/+1
2017-02-08 feat context: Add support for resource set collectionsVincent Ambo1-5/+5
A resource set collection is a resource set with an addition 'include' array configured. It is a short-hand for importing multiple resource sets from the same folder and for excluding/including them as a group. See https://github.com/tazjin/kontemplate/issues/9 for more information. Closes #9
2017-02-08 feat templater: Add ability to exclude resource setsVincent Ambo1-21/+47
* renamed --limit to --include (-i) * added --exclude (-e) Kontemplate users can now explicitly include and exclude certain resource sets. Excludes always override includes. Closes #11
2017-02-08 feat template: Add additional template functionsVincent Ambo1-1/+13
This adds the Go template functions from [sprig][] as well as a custom `json` function that can interpolate any data as a JSON object - very useful for adding arrays of data in JSON format into a variable: ``` certificateDomains: - oslo.pub - tazj.in annotations: acme/certificate: {{ .certificateDomains | json }} annotations: acme/certificate: ["oslo.pub", "tazj.in"] ``` [sprig]: https://godoc.org/github.com/Masterminds/sprig
2017-02-08 fix templater: Guard against empty values mapVincent Ambo1-0/+5
2017-02-08 feat main: Add proper CLI supportVincent Ambo1-20/+50
Adds a basic CLI structure with a single "run" command that takes a --file (-f) and --limit (-l) flag. --limit can be used to only output certain resource sets. Closes #4
2017-02-08 chore: Better example & gofmtVincent Ambo1-5/+4
2017-02-08 feat templater: Add initial templating supportVincent Ambo1-0/+97