about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorFilesLines
2018-12-11 feat(main): Support specifying kubectl args in ResourceSetsMartin Lehmann6-2/+61
2018-08-15 docs(README): Add note about installing on NixOSVincent Ambo1-0/+6
2018-08-15 chore(image): Update image for Kontemplate 1.7.0Vincent Ambo2-5/+5
Version changes: * Kontemplate 1.7.0 * Kubectl 1.11.0 * Alpine 3.8
2018-08-15 chore(brew): Update Homebrew formula for 1.7.0Vincent Ambo1-3/+3
2018-08-15 chore(build): Update dependencies to newest versionVincent Ambo1-24/+24
Updates the following dependencies to latest: * Masterminds/semver * Masterminds/sprig * ghodss/yaml * satori/go.uuid -> google/uuid * huandu/xstrings * imdario/mergo * crypto * alecthomas/kingpin.v2 * yaml.v2 As usual Go libraries are YOLO-versioned, so who knows what changed here. I'll be going through `sprig` at least to add that to the changelog. This relates to #152.
2018-07-14 test(templater): Add a test for the `default` template functionVincent Ambo2-0/+18
2018-07-14 feat(templater): override sprig default function with guarded alternativePhillip Johnsen1-0/+6
These changes overrides the `default` function provided by sprig with an alternative to retrieve variable values from variables that might not have been declared at all. Referencing a variable in a template that is not declared, will lead to the underlying templating functionality raising an error, causing kontemplate to exit. The override alternative to `default` accepts a second string argument with the variable name. If the variable in question has not been declared the first argument's value would be returned, just as the original `default` function does.
2018-06-26 chore: Bump version to 1.7.0Vincent Ambo2-2/+2
2018-06-26 test(context): Introduce an explicit value merging testVincent Ambo5-0/+51
Introduces a test which will merge variables defined at every possible layer together and ensure that the loaded context configuration is as expected. The test data provides an actual resource set template that can be tested locally from a kontemplate source checkout: kontemplate template context/testdata/merging/context.yaml --var cliVar=cliVar
2018-06-26 chore(context): Remove previous value override testVincent Ambo2-33/+0
2018-06-26 refactor(context): Rewrite and explain value merging logicVincent Ambo1-11/+52
Changes the logic for merging context values to be unambiguous and easy to follow. * loadDefaultVars returns the default vars directly instead of performing merging in addition * all merging is performed in `mergeContextValues` using explicit explanations for every step of the merge. After this commit the order of merging goes from least to most "specific", please read the explanatory comments for more information. This relates to #142.
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-21 fix(context): Use SplitN to split CLI variable specificationsVincent Ambo1-1/+1
In some cases the value of a variable may contain an equals sign, which would not work in the previous version. This uses `SplitN` to split the variable specifier into a pre-determined number (2) of sub-slices. Further `=`-symbols will then be included in the second substring.
2018-06-09 chore(image): Bump version to 1.6.0Vincent Ambo2-5/+6
* kontemplate 1.6.0 * kubectl 1.10.4
2018-06-09 chore(brew): Update Homebrew formula for 1.6.0Vincent Ambo1-3/+3
2018-06-09 fix(build): Fix shebang in build-release.shVincent Ambo1-3/+3
2018-06-09 chore: Bump version to 1.6.0Vincent Ambo2-2/+2
2018-06-09 feat(templater): Support single-template resource setsVincent Ambo3-23/+55
Supports resource sets in which the `path` is pointed at a single template file. The example has been updated with ... an example of this. This closes #81.
2018-06-09 fix(context): Global values have precedence over defaultsVincent Ambo1-2/+2
2018-06-09 feat(context): Support loading import variables from absolute pathsVincent Ambo2-11/+20
This lets users specify the paths from which to import additional variables using absolute paths in addition to relative paths. This enables both loading of configuration files placed outside of the resource set folder (if desired), as well as special use-cases such as specifying `/dev/stdin` as an input path to read variables from standard input. This change supersedes #131
2018-06-09 refactor(util): Use YAML parser for both JSON & YAML filesVincent Ambo2-13/+8
JSON is a subset of YAML and the previous detection logic is unnecessary.
2018-06-09 refactor(context): Implement more explicit merging of variablesVincent Ambo5-62/+96
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 Johnsen3-0/+49
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-15 docs: Add contribution guidelinesVincent Ambo1-0/+114
This document is intended to provide some information about how to contribute to the project, from basic sanity checks and code quality to information about how to structure git commits. These are the most common things that I encounter in pull requests sent to my projects.
2018-05-08 chore(image): Bump version to 1.5.0Vincent Ambo2-4/+4
* Kontemplate 1.5.0 * kubectl 1.10.2
2018-05-08 chore(brew): Update Homebrew formula for v1.5.0Vincent Ambo1-3/+3
2018-05-08 chore: Bump version to 1.5.0Vincent Ambo2-2/+2
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-05-05 fix(templater): add baseDir to gitHead cmd so that directory is overwrittennoqcks1-8/+8
This makes it so that when gitHead is called in a template the git hash that is returned is the hash of the folder containing the template, not the hash of the folder where kontemplate is called.
2018-03-29 refactor(templater) Refactor templator to use exec.Command directly instead ↵noqcks1-1/+1
of executing in sh
2018-03-29 feat(templater) Add a template function to insert surrounding repo's Git hashnoqcks2-0/+13
A template function has been added that allows one to template the Git hash of the surrounding repo. This is useful to be able to inspect the deployment revision of an object in Kubernetes.
2018-03-17 chore(brew): Bump Homebrew formula to 1.4.0Vincent Ambo1-3/+3
2018-03-17 chore(image): Bump image version to 1.4Vincent Ambo2-5/+5
* upgrade Alpine release * upgrade kubectl to 1.9.4 * upgrade Kontemplate to 1.4.0
2018-03-17 chore: Bump version to 1.4.0Vincent Ambo2-2/+2
2018-03-17 fix(example): Add missing file to example folderVincent Ambo1-0/+4
2018-03-09 refactor: Remove old error handling libraryVincent Ambo7-78/+13
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.
2018-03-09 refactor(templater): Pass resource set path to insertFile functionVincent Ambo4-33/+26
This is actually several refactors in one: * rename "fileContent" function to "insertFile" * pass the resource set path to the "insetFile" function * update docs and example with a pipeline including indentation adjustments for the inserted file
2018-03-09 feat(templater): Added support for file includeNiklas Wik4-2/+30
Adds a 'fileContent' template function to insert the literal contents of a file specified in the template. Signed-off-by: Niklas Wik <niklas.wik@nokia.com>
2018-03-09 feat(build): Pin nixpkgs used for release buildVincent Ambo1-7/+7
Pin the nixpkgs-commit used for building the Kontemplate release to a specific commit. Kontemplate builds should now be fully repeatable (and most likely reproducible!) on any machine running Nix.
2018-03-09 feat(build): Build both derivations on TravisVincent Ambo1-0/+8
2018-03-09 chore: Remove legacy build systemVincent Ambo3-137/+0
2018-03-09 feat(build): Add Nix derivation for release buildsVincent Ambo1-0/+53
Adds a Nix derivation that produces statically linked output binaries for multiple operating systems and architectures. This requires a Nix-channel version that includes the Go 1.10 compiler.
2018-03-09 refactor(build): Add Nix derivation & configure Travis to build itVincent Ambo3-4/+154
Adds a Nix-derivation for building kontemplate with dependencies pinned in Nix.
2017-12-11 docs(cluster-config): 'context' key optional for template commandVincent Ambo1-1/+1
Thanks to @christopher376 on the Kubernetes Slack for pointing out this mistake.
2017-11-21 feat(license): Relicense under GPLv3Vincent Ambo15-25/+798
All further kontemplate source code changes and releases will happen under the GPLv3. Previous releases are still available under the MIT license.
2017-11-16 feat(image): Install git in kontemplate imageVincent Ambo1-1/+1
2017-11-07 docs(README): Remove dead linksVincent Ambo1-4/+3
Never got around to writing them and maybe they shouldn't be hanging around.
2017-11-04 chore: Bump Docker image & Homebrew release to v1.3.0Vincent Ambo3-5/+5