Commit graph

1750 commits

Author SHA1 Message Date
Vincent Ambo
3a2f00f29f chore: Update dependencies 2017-06-11 23:16:22 +02:00
Vincent Ambo
cf5e392baf feat: Add shell script to check if dependencies are up-to-date 2017-06-11 23:16:22 +02:00
Vincent Ambo
a7781b169d fix templater: Ignore slash-suffixes on includes/excludes
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 22:33:07 +02:00
Vincent Ambo
3cba344fbe fix main: Fix 'kontemplate template' output 2017-06-11 22:09:10 +02:00
Vincent Ambo
162b962fad refactor main: Call kubectl individually per resource set
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-06-11 22:09:10 +02:00
Vincent Ambo
f3264329b9 refactor templater: Add intermediate type to represent rendered RSes
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-06-11 22:09:10 +02:00
Vincent Ambo
d76ea59f4c feat image: Add Dockerfile for CI pipeline image
Adds a simple Docker image that can be used in CI pipelines to deploy
`kontemplate`-based environments.

This image contains kontemplate and all of its dependencies (including
pass as an optional dependency).
2017-06-07 10:05:56 +02:00
Vincent Ambo
8f0949dbb2 chore: Minor sync with Dell machine config 2017-06-06 13:33:13 +02:00
Vincent Ambo
9923b1e64d docs README: Update installation instructions 2017-05-18 20:54:44 +02:00
Vincent Ambo
de4171da31 feat build: Add Homebrew binary formula
Adds a Homebrew formula that downloads and installs the 1.0.2 binary release.

Users should be able to "tap" this formula from OS X, the README will be updated in a separate commit.

This fixes #41
2017-05-18 20:35:00 +02:00
Vincent Ambo
f79b261079 chore: Version bump to 1.0.2 2017-05-18 19:41:18 +02:00
Vincent Ambo
aadea2f698 feat build: Add Repeatr formula for repeatable builds
Adds a formula for Repeatr (http://repeatr.io/) that can be used to
build kontemplate in a repeatable way with pinned dependencies.

Fixes #47
2017-05-18 19:38:21 +02:00
Vincent Ambo
c45e616258 fix main: Print information about kubectl errors 2017-05-08 14:29:47 +02:00
Vincent Ambo
cb6413bff7 fix main: Exit with kubectl status code
If kubectl fails during a kontemplate run, kontemplate should also
exit with a non-zero status code.

This fixes #43
2017-05-08 14:20:45 +02:00
Vincent Ambo
20ccc33347 docs: Mention AUR package in README 2017-05-08 13:53:24 +02:00
Vincent Ambo
d15dfefce2 feat build: Add ArchLinux PKGBUILD 2017-05-08 13:47:53 +02:00
Vincent Ambo
1e3ecad709 feat release: Add simple release script
Adds a simple script that will build stripped binaries for various platforms
and GPG-sign them.
2017-05-08 11:15:20 +02:00
Vincent Ambo
d93bc51e86 feat main: Add version command
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-08 11:15:20 +02:00
Vincent Ambo
9b2d102bbf docs: Add note about binary releases to README 2017-05-08 10:37:24 +02:00
Vincent Ambo
c2a8f8784f docs: Add more information to README 2017-05-08 10:37:24 +02:00
Vincent Ambo
5bc67f4271 docs: Add some tips and tricks 2017-05-08 10:37:24 +02:00
Vincent Ambo
7644a1f675 docs: Document template format 2017-05-08 10:37:24 +02:00
Vincent Ambo
211289765a docs README: Update usage examples for kingpin CLI 2017-05-04 18:49:43 +02:00
Vincent Ambo
c8a63861ae refactor main: Move to Kingpin CLI library
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-05-04 18:49:43 +02:00
Vincent Ambo
32ca64c50a feat templater: Warn if no valid resource sets are included
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-05-04 18:45:03 +02:00
Vincent Ambo
4f13a9d30b feat nginx: Redirect oslo.pub directly to the actual map 2017-04-26 17:17:24 +02:00
Vincent Ambo
7286751db7 fix test: Assert variable override order 2017-04-04 20:06:15 +02:00
Vincent Ambo
746e733cbb fix templater: Don't try to template default value files 2017-04-04 20:06:15 +02:00
Vincent Ambo
11cfc80020 feat context: Support resource set default values
This adds functionality to specify default values directly in resource sets.

The idea is that users can create a file called `values.yaml` or `values.json`
in a resource set's folder and have all variables specified in that file be
automatically merged into the resource set variables with the lowest priority.

This fixes #25
This fixes #30 (to a degree)
2017-04-04 20:06:15 +02:00
Vincent Ambo
4eadb58841 fix main: Don't panic if file is unspecified
Instead of printing a spooky stacktrace when the user forgets to specify
the `-f` argument, return an error a lot more gracefully.
2017-04-04 13:49:53 +02:00
Vincent Ambo
3b0f41e71d feat templater: Fail if values are missing
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-04-04 11:05:09 +02:00
Vincent Ambo
6e7262763c feat k8s: Add demo deployments inside k8s 2017-03-16 19:16:15 +01:00
Vincent Ambo
9a1d876c34 docs: Add README 2017-03-16 14:18:50 +01:00
Vincent Ambo
fa43472a5d refactor: Split up code for readability and add docs 2017-03-16 14:06:21 +01:00
Vincent Ambo
1c2d087ec4 feat: Fully working quine registry 2017-03-16 11:43:17 +01:00
Vincent Ambo
9690defd2b chore: Add .gitignore 2017-03-16 10:53:14 +01:00
Vincent Ambo
b88bf9362a
feat: Initial testing 2017-03-15 23:45:13 +01:00
Vincent Ambo
45aee8257f style: Apply go fmt 2017-02-20 14:25:39 +01:00
Vincent Ambo
0b992c6156 fix pass: Trim leading & trailing whitespace 2017-02-20 14:25:24 +01:00
Vincent Ambo
0147c3e13e feat ctx: Let sub-resource-sets inherit vars from parent
Users of kontemplate may expect variables defined on the parent resource to be
inherited by children.

This implements that functionality. Values defined twice are overwritten by the
child's definition.

Fixes #20
2017-02-14 19:12:53 +01:00
Vincent Ambo
f81fe551bc chore templater: Use new util.Merge func 2017-02-14 19:12:53 +01:00
Vincent Ambo
7a930aad11 feat util: Add silly map-merge function that should be in the stdlib 2017-02-14 19:12:53 +01:00
Vincent Ambo
1c3ea48da9 Merge pull request #2 from tazjin/fix/url-encode
fix urls: Escape values in URLs
2017-02-13 10:03:05 +01:00
Vincent Ambo
6dcb0f4b2b fix urls: Escape values in URLs
For usernames and passwords containing special characters the URL parameters
must be escaped.

Because the entire URI is just query parameters I've opted for using net/url.Values
for the entire URI.

Fixes #1
2017-02-13 09:55:24 +01:00
Vincent Ambo
7824e0e7e3 docs: Add blog post to README 2017-02-11 17:34:09 +01:00
Vincent Ambo
dd1e6c3b36 fix: Two minor, silly fixes 2017-02-11 16:38:23 +01:00
Vincent Ambo
e4ee5a4526 fix: Portability of stdin 2017-02-11 16:33:16 +01:00
Vincent Ambo
4a85116b4a fix: Remove trailing newlines from input 2017-02-11 16:32:36 +01:00
Vincent Ambo
393cff4847 feat: Don't echo password while inputting 2017-02-11 16:30:23 +01:00
Vincent Ambo
e6c3212018 chore: Don't print URLs 2017-02-11 16:19:24 +01:00