about summary refs log tree commit diff
path: root/main.go
AgeCommit message (Collapse)AuthorFilesLines
2018-12-11 feat(main): Support specifying kubectl args in ResourceSetsMartin Lehmann1-2/+4
2018-06-26 chore: Bump version to 1.7.0Vincent Ambo1-1/+1
2018-06-26 feat(main): Add CLI flag for setting kubectl executableVincent Ambo1-4/+5
This lets users choose the executable (either by full path or via a $PATH-entry) to be used when executing `kubectl`. This is useful in, for example, OpenShift based setups. This fixes #143
2018-06-09 chore: Bump version to 1.6.0Vincent Ambo1-1/+1
2018-06-09 refactor(util): Use YAML parser for both JSON & YAML filesVincent Ambo1-2/+2
JSON is a subset of YAML and the previous detection logic is unnecessary.
2018-06-09 refactor(context): Implement more explicit merging of variablesVincent Ambo1-6/+1
The hierarchy for loading variables was previously not expressed explicitly. This commit refactors the logic for merging variables to explicitly set the different layers of variables as values on the context object and merge them for each resource set in `mergeContextValues`.
2018-06-09 feat(context): allow explicit variables to be defined as argumentPhillip Johnsen1-0/+6
These changes allows variables to be defined when executing `kontemplate` via one or more `--variable` arguments. With this in place one can either define new variables or override existing variables loaded from a file: ``` $ kontemplate apply --variable version=v1.0 example/fancy-app.yaml ``` This avoids the need to write variables into a temporary file that is only needed to provide "external variables" into resource sets. Closes https://github.com/tazjin/kontemplate/issues/122
2018-05-08 chore: Bump version to 1.5.0Vincent Ambo1-1/+1
2018-05-08 fix(main): Use 'app.Fatalf' for fatal kubectl errorsVincent Ambo1-2/+1
2018-05-08 fix(main): Handle errors & logic when templating to directoryVincent Ambo1-7/+34
This does several changes to the new "template to directory" feature introduced in the previous commit: 1. Errors are now "handled". In classic Go-style, it is of course all too easy to do absolutely nothing with errors, but we can't have that. I'm onto you, Renee French's husband! 2. Resource sets containing similarly named files are now templated correctly by prepending the resource set name to the filename. 3. In the same vein as the previous point, nested resource sets are now also output correctly by replacing slashes (`/`) with dashes (`-`) to guarantee that the output files are a flat list. Some minor cosmetic fixes have also been applied.
2018-05-08 feat(main): Support output directories in template function.Niklas Wik1-3/+10
This introduces a new command line flag `--output` (or `-o` for short) which makes it possible to template all specified resource sets into a folder (instead of to stdout) when using `kontemplate template`.
2018-03-17 chore: Bump version to 1.4.0Vincent Ambo1-1/+1
2018-03-09 refactor: Remove old error handling libraryVincent Ambo1-7/+2
Removes the old error handling library and switches to plain fmt.Errorf calls. There are several reasons for this: * There are no useful types or handling here anyways, so output format is the only priority. * Users don't care about getting stacktraces. * My emotional wellbeing. Fin de siècle.
2017-11-21 feat(license): Relicense under GPLv3Vincent Ambo1-0/+15
All further kontemplate source code changes and releases will happen under the GPLv3. Previous releases are still available under the MIT license.
2017-11-04 Version 1.3.0Vincent Ambo1-1/+1
This release comes with minor usability improvements and features. * A new 'lookupIPAddr' template function is available for resolving DNS A records in templates. Thanks to @landro for the pull request! * Handling of "non-standard" resource set structures has been improved to result in better error messages and behaviour in several places. Release binaries are signed with GPG key `66F505681DB8F43B` which is verified on my Github profile. -------------- Note: This is the last Kontemplate release that will be written in Go. Rob Pike's art project has proven its point but I believe it is ethically questionable and morally indefensible to continue on this path. You can track #72 for the Rust-rewrite of Kontemplate.
2017-10-27 refactor main: Reword empty/nonexistent resource set warningVincent Ambo1-1/+1
2017-10-27 fix main: Do not stop templater if a single resource set is emptyVincent Ambo1-1/+1
This fixes #91
2017-08-22 Version 1.2.0Vincent Ambo1-1/+1
This release comes with some new features, usability improvements and a better build & release process. Features: * Documentation has been improved significantly, check out the new [README][] and follow the links within! * Extra variables can now be loaded from files on disk. Simply specify a list of YAML/JSON files under the 'import' key in your cluster context file. Check out #66 for details! * Resource set paths can now be overridden by users. By default it is assumed that the path to a resource set is the same as its name, however this is now user-controllable. This means the same resource set can be included multiple times under different names, for easier including/excluding. See #71 for details! * Kontemplate is currently getting a website that is under construction at [kontemplate.works][] - feel free to check it out and [give feedback][]! Fixes: * Windows release binaries now have the correct filename * Several potential warning and error messages have been improved Release binaries are signed with GPG key `66F505681DB8F43B` which is verified on my Github profile. [README]: https://github.com/tazjin/kontemplate/blob/master/README.md [kontemplate.works]: http://kontemplate.works/ [give feedback]: https://github.com/tazjin/kontemplate-website/issues
2017-08-22 feat main: Warn if resource set contains no templatesVincent Ambo1-3/+13
If a resource set is specified by the user and does _not_ contain any templates, a warning will now be printed. This fixes #79
2017-07-03 fix main: Correctly print kubectl errorsVincent Ambo1-1/+1
2017-06-11 chore: Release version 1.1.0Vincent Ambo1-1/+1
This release features some cleanup and under-the-hood changes, as well as "ecosystem-features" that don't directly affect the way Kontemplate itself functions. * Resource-sets are now passed on to kubectl in individual invocations. This means that kubectl errors can be scoped to individual resource set files and issues such as #51 are less of a problem. * A Dockerfile is provided and published at `tazjin:kontemplate` on Docker Hub. This image contains `kontemplate`, `kubectl` and `pass` and can be used - for example - as an image for a step in a CI system. * Kontemplate is now available on Homebrew, check the README for installation instructions. * If different resource sets don't contain `---` separators in YAML, `kubectl` calls will no longer fail. (#51) * Autocompleted trailing slashes in shells are now filtered from include & exclude lists to enhance the CLI experience slightly.
2017-06-11 fix main: Fix 'kontemplate template' outputVincent Ambo1-4/+7
2017-06-11 refactor main: Call kubectl individually per resource setVincent Ambo1-17/+24
Instead of passing the rendered output of all resource sets to kubectl simultaneously, build upon the previous commit and pass resource sets individually to new instances of kubectl. This resolves #51
2017-05-18 chore: Version bump to 1.0.2Vincent Ambo1-1/+1
2017-05-08 fix main: Print information about kubectl errorsVincent Ambo1-4/+20
2017-05-08 fix main: Exit with kubectl status codeVincent Ambo1-4/+2
If kubectl fails during a kontemplate run, kontemplate should also exit with a non-zero status code. This fixes #43
2017-05-08 feat build: Add ArchLinux PKGBUILDVincent Ambo1-0/+1
2017-05-08 feat main: Add version commandVincent Ambo1-0/+17
Adds a version command that can have the Kontemplate git hash added to it at build time by using the Go linker's -X flag.
2017-05-04 refactor main: Move to Kingpin CLI libraryVincent Ambo1-152/+84
Replace urfave/cli with the kingpin[1] library. It has slightly more sensible argument validation than the other Go libraries. Additionally I've opted for removing the '-f / --file' flag in favour of positional arguments to commands. A previous command like `kontemplate template -f somefile.yml` is now just `kontemplate template somefile.yml`. All other arguments remain the same. [1]: https://github.com/alecthomas/kingpin
2017-04-04 fix main: Don't panic if file is unspecifiedVincent Ambo1-4/+14
Instead of printing a spooky stacktrace when the user forgets to specify the `-f` argument, return an error a lot more gracefully.
2017-02-09 fix main: Add a forgotten error checkVincent Ambo1-1/+5
2017-02-09 feat main: Version bump to v1.0.0-beta1Vincent Ambo1-1/+1
2017-02-08 feat main: Add 'delete' commandVincent Ambo1-0/+22
2017-02-08 feat templater: Add ability to exclude resource setsVincent Ambo1-8/+15
* 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 main: Add replace support & respect context settingVincent Ambo1-22/+53
* Adds support for calling `kubectl replace` (necessary for resource types that do not support `apply`). * Sets `kubectl` context to whatever is defined in the cluster configuration file
2017-02-08 feat main: Add apply commandVincent Ambo1-27/+91
This integrates support for actually calling out to `kubectl apply`. A dry-run flag is implemented, too. The `run` command has been renamed to `template`.
2017-02-08 feat main: Add proper CLI supportVincent Ambo1-19/+53
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-3/+3
2017-02-08 feat main: Initial program implementation & exampleVincent Ambo1-0/+39