Commit Graph

40 Commits

Author SHA1 Message Date
Alex Dadgar
a9e3a41407 Enable more linters 2017-09-26 15:26:33 -07:00
Michael Schurter
ebbf87f979 Use existing restart policy infrastructure 2017-09-14 16:46:54 -07:00
Alex Dadgar
9cc5e195ad address comments 2017-08-10 13:00:06 -07:00
Alex Dadgar
1e7ae913e2 Template emits events explaining why it is blocked
This PR does the following:
* Adds a mechanism to emit events in the TaskRunner
* Vendors a new version of Consul-Template that allows extraction of
missing dependencies
* Adds logic to our consul_template.go to determine missing events and
emit them in a batched fashion.
* Refactors the consul_template code to split the run method and take in
a config struct rather than many parameters.

Fixes https://github.com/hashicorp/nomad/issues/2578
2017-08-09 18:01:27 -07:00
Alex Dadgar
43d2c425d1 Emit generic task events 2017-08-07 21:26:04 -07:00
Alex Dadgar
18e3bd9c2e Rename runnerConfig 2017-08-07 16:29:42 -07:00
Alex Dadgar
053cff812a Allow template to set Vault grace
This PR allows a template to specify the Vault grace duration.

Fixes https://github.com/hashicorp/nomad/issues/2922
2017-08-01 14:14:08 -07:00
Alex Dadgar
3050603552 vendor vault api 2017-08-01 09:30:55 -07:00
Michael Schurter
3bf148bc05 Propagate vault.tls_server_name to consul-template
Fixes #2776
2017-07-06 16:56:50 -07:00
Michael Schurter
38aebc056d Switch to hashicorp/go-envparse 2017-06-02 15:58:52 -07:00
Michael Schurter
319ea76db9 Move env file parsing to a library 2017-06-02 15:03:27 -07:00
Michael Schurter
be959a4e63 Fix and test multi-env-template loading 2017-05-25 17:13:33 -07:00
Michael Schurter
572ca97967 Fix formatting 2017-05-25 09:38:49 -07:00
Michael Schurter
8f2ea2f9e5 Comment and correct formatting 2017-05-25 09:30:58 -07:00
Michael Schurter
0288582e11 Fail fast on env template failures 2017-05-24 13:44:52 -07:00
Michael Schurter
37c1cbc9cf Move env template handling into consul_template.go 2017-05-23 13:53:34 -07:00
Michael Schurter
ace00980a1 Refactor TaskEnvironment into Builder and TaskEnv 2017-05-23 13:53:33 -07:00
Alex Dadgar
63978511be Access Node Meta and Attrs in template
This PR allows accessing the Node's attributes and metadata as in a
template.

```
template {
    data = "{{ env \"attr.unique.network.ip-address\" }}"
    destination = "local/out"
}
```
2017-03-27 15:15:33 -07:00
Alex Dadgar
ee76b78922 rebase 2017-02-20 16:43:28 -08:00
Alex Dadgar
9afa48310e Template destination file permissions.
This PR allows setting the file permissions of the rendered template.
2017-01-31 20:10:01 -08:00
Alex Dadgar
afb2b29c1b remove xxx 2017-01-23 11:04:44 -08:00
Alex Dadgar
51c1310b2a Finalize 2017-01-23 11:03:38 -08:00
Alex Dadgar
5f4f80d85d fix lookup 2017-01-23 11:00:12 -08:00
Alex Dadgar
a51fb0279b Clear SSL 2017-01-23 11:00:12 -08:00
Alex Dadgar
6e45884c50 rebase 2017-01-23 11:00:12 -08:00
Alex Dadgar
42c5cafd2f Actually randomize the splay 2017-01-22 13:50:33 -08:00
Diptanu Choudhury
6d669fb48e Moved functions to helper from structs 2017-01-18 15:55:14 -08:00
Alex Dadgar
ca9738f4aa Always disable renew_token for CT config
This PR makes Nomad always disable token renewal even if Vault is
disabled. The problem was when there was a vault token in the
environment variable and Nomad/Vault integration was disabled, the
template runner would still try to renew the token.
2016-11-10 15:16:08 -08:00
Alex Dadgar
e2da0b9dec Allow absolute paths for template sources 2016-11-02 13:04:47 -07:00
Alex Dadgar
5b55ac94ee Remove thinking 2016-10-28 15:52:10 -07:00
Alex Dadgar
e398a0d804 Consul-template fixes + PreviousAlloc in api 2016-10-28 15:50:35 -07:00
Alex Dadgar
c7889f2d48 Add CaPath to Vault config in consul-template 2016-10-25 11:01:50 -07:00
Alex Dadgar
f130c8a894 Change how we mark tasks as failed and allow consul-template to fail tasks 2016-10-20 17:27:16 -07:00
Alex Dadgar
e34902ae8a Large refactor of task runner and Vault token rehandling 2016-10-18 11:24:20 -07:00
Alex Dadgar
917c7e5085 Merge pull request #1801 from hashicorp/f-signals
Consul-template signal change mode
2016-10-18 11:23:47 -07:00
Alex Dadgar
9ff2bf0bff Fix Vault parsing of booleans 2016-10-10 18:04:39 -07:00
Alex Dadgar
af517b3d37 Task runner sends signals 2016-10-10 15:09:00 -07:00
Alex Dadgar
b976633e4d Start of integration 2016-10-06 15:05:49 -07:00
Alex Dadgar
1c24f59d29 more vendoring 2016-10-06 12:36:44 -07:00
Alex Dadgar
e1bc05eadf Consul Template Manager 2016-10-03 12:59:31 -07:00