Danielle Tomlinson
1a29811169
drivers: Move client/drivers/env to drivers/shared/env
...
As part of deprecating legacy drivers, we're moving the env package to a
new drivers/shared tree, as it is used by the modern docker and rkt
driver packages, and is useful for 3rd party plugins.
2018-11-30 10:46:13 +01:00
Michael Schurter
85073f9d29
client: properly support hook env vars
...
The old approach was incomplete. Hook env vars are now:
* persisted and restored between agent restarts
* deterministic (LWW if 2 hooks set the same key)
2018-11-27 17:25:33 -08:00
Michael Schurter
2d0b44c3b4
client: test more env key variations
2018-11-15 16:26:25 -08:00
Michael Schurter
5e51e2c2d5
client: turn env into nested objects for task configs
2018-11-15 16:25:57 -08:00
Michael Schurter
f8cdd561f0
client: interpolate driver configurations
...
Also add missing SetDriverNetwork calls.
2018-11-15 16:25:57 -08:00
Alex Dadgar
52f9cd7637
fixing tests
2018-10-04 14:26:19 -07:00
Nick Ethier
e75e3ae665
nomad: use require pkg for tests
2018-06-11 13:50:50 -04:00
Nick Ethier
3aa6241b5c
client/driver/env: fix optional meta test
2018-06-11 12:29:13 -04:00
Nick Ethier
ccb5372813
Revert "Revert "client/driver/env: interpolate empty optional meta params as empty strings""
...
This reverts commit c17e0fc9dc5fd288935ab2b68fb441b4d25ac189.
2018-06-11 11:59:23 -04:00
Alex Dadgar
d9b35fab52
Revert "client/driver/env: interpolate empty optional meta params as empty strings"
...
This reverts commit 84926f759a63a90be7bbcf0fad78deb3f02af23d.
2018-06-07 16:27:47 -07:00
Nick Ethier
54c86a0292
client/driver/env: interpolate empty optional meta params as empty strings
2018-05-07 20:19:51 -04:00
Alex Dadgar
4173834231
Enable more linters
2017-09-26 15:26:33 -07:00
Karel Malec
cf985f011c
Pass task group name as NOMAD_GROUP_NAME environment variable
2017-07-21 01:22:54 +02:00
Alex Dadgar
45712c6ca3
test fixes
2017-07-07 14:11:27 -07:00
Michael Schurter
f3a6ddc57d
Remove DRIVER env vars
...
Also make NOMAD_ADDR_* use host ip:port for consistency. NOMAD_PORT_*
varies based on port map and the driver IP isn't exposed as an env var
as the only place it can be used is in script checks anyway.
2017-06-21 17:19:08 -07:00
Michael Schurter
8d440b1675
Skip DRIVER env vars for labels without a port mapping
2017-06-21 17:19:08 -07:00
Michael Schurter
a233b0401d
Add env testing
2017-05-23 16:46:29 -07:00
Michael Schurter
59ad200d1a
Fix env var interpolation and env tests
2017-05-23 13:53:34 -07:00
Robert Neumayer
804f83f1fb
Fix typo and be consistent in naming
2017-03-29 09:33:54 +02:00
Michael Schurter
d58bcde183
Make test more accurate and add changelog entry
2017-03-28 10:53:26 -07:00
Michael Schurter
9a0c66b55b
Don't take a reference a var in a loop
...
Fixes #2491
2017-03-28 10:16:27 -07:00
Michael Schurter
71783e8e41
Add NOMAD_{IP,PORT}_<task>_<label> env vars
2017-03-10 12:17:43 -08:00
Michael Schurter
518e4f75a6
Replace "-" in env var keys with "_"
...
Fixes #2405
2017-03-06 19:57:44 -08:00
Alex Dadgar
5be806a3df
Fix vet script and fix vet problems
...
This PR fixes our vet script and fixes all the missed vet changes.
It also fixes pointers being printed in `nomad stop <job>` and `nomad
node-status <node>`.
2017-02-27 16:00:19 -08:00
Alex Dadgar
b5995c6cd7
Vendor + test fixes
2017-02-22 15:55:33 -08:00
Alex Dadgar
75e3f2c996
Fix fsm/env test
2017-01-24 09:36:22 -08:00
Diptanu Choudhury
fe4ae25eea
Setting the Addrs of sibling tasks in the env
2017-01-20 14:15:53 -08:00
Alex Dadgar
b1883daae8
Use new combined meta data function in env
2016-12-16 10:45:09 -08:00
Alex Dadgar
6702a29071
Vault token threaded
2016-09-14 13:30:01 -07:00
Diptanu Choudhury
3c4002c48b
Fixed the client tests
2016-07-08 17:49:58 -07:00
Alex Dadgar
8256396f1e
Add IP and PORT environment variables
2016-04-15 11:01:32 -07:00
Alex Dadgar
733af498fd
add test for precedence
2016-03-25 10:16:04 -07:00
Alex Dadgar
f3d09755c5
Pass environment variables from host to exec based tasks
2016-03-23 13:01:45 -07:00
Alex Dadgar
a4f7709f08
Fix tests
2016-02-04 17:27:58 -08:00
Ivo Verberk
061445468b
Rename IPPort env variable and add a mapped host port to the env.
2016-01-25 20:46:01 +01:00
Ivo Verberk
e58bda9056
Pass a combination of ip and port to the task environment.
...
The different labels can be on different IPs.
2016-01-24 10:31:03 +01:00
Alex Dadgar
7fe6c8bd1b
Add folder
2016-01-11 09:58:31 -08:00