Commit graph

1689 commits

Author SHA1 Message Date
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
Vincent Ambo
01ad38d532 docs: Add README 2017-02-11 13:17:55 +01:00
Vincent Ambo
98e81c2c0e
feat: Initial working implementation 2017-02-11 12:27:12 +01:00
Vincent Ambo
33174cbb80
Initial commit 2017-02-11 12:26:52 +01:00
Vincent Ambo
c181decd9d fix main: Add a forgotten error check 2017-02-09 15:50:22 +01:00
Vincent Ambo
2f6e008121 feat templater: Add 'pass' lookup function
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 15:44:18 +01:00
Vincent Ambo
4713d565d3 fix templater: Don't fail with two identical stack traces 2017-02-09 15:44:18 +01:00
Vincent Ambo
25c9ed4adc feat main: Version bump to v1.0.0-beta1 2017-02-09 15:44:18 +01:00
Vincent Ambo
b58b1e3385 feat templater: Add applyLimits tests 2017-02-08 22:12:34 +01:00
Vincent Ambo
75b6199c1b feat context: Add deserialisation tests 2017-02-08 22:12:34 +01:00
Vincent Ambo
a6eb421057 docs: Update README with 'delete' command 2017-02-08 18:16:00 +01:00
Vincent Ambo
c046e5acff feat main: Add 'delete' command 2017-02-08 18:16:00 +01:00