-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
agent: Use an in-process listener with cache (#12762)
Uses a bufconn listener between consul-template and vault-agent when caching is enabled and either templates or a listener is defined. This means no listeners need to be defined in vault-agent for just templating. Always routes consul-template through the vault-agent cache (instead of only when persistent cache is enabled). Uses a local transportDialer interface in config.Cache{}. Co-authored-by: Tom Proctor <[email protected]> Co-authored-by: Ben Ash <[email protected]>
- Loading branch information
1 parent
14c28ce
commit 99e2132
Showing
10 changed files
with
277 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:improvement | ||
agent/cache: Use an in-process listener between consul-template and vault-agent when caching is enabled and either templates or a listener is defined | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
command/agent/config/test-fixtures/config-cache-no-listeners.hcl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
pid_file = "./pidfile" | ||
|
||
auto_auth { | ||
method { | ||
type = "aws" | ||
config = { | ||
role = "foobar" | ||
} | ||
} | ||
|
||
sink { | ||
type = "file" | ||
config = { | ||
path = "/tmp/file-foo" | ||
} | ||
aad = "foobar" | ||
dh_type = "curve25519" | ||
dh_path = "/tmp/file-foo-dhpath" | ||
} | ||
} | ||
|
||
cache { | ||
use_auto_auth_token = true | ||
persist = { | ||
type = "kubernetes" | ||
path = "/vault/agent-cache/" | ||
keep_after_import = true | ||
exit_on_err = true | ||
service_account_token_file = "/tmp/serviceaccount/token" | ||
} | ||
} | ||
|
||
vault { | ||
address = "http://127.0.0.1:1111" | ||
ca_cert = "config_ca_cert" | ||
ca_path = "config_ca_path" | ||
tls_skip_verify = "true" | ||
client_cert = "config_client_cert" | ||
client_key = "config_client_key" | ||
} | ||
|
||
template { | ||
source = "/path/on/disk/to/template.ctmpl" | ||
destination = "/path/on/disk/where/template/will/render.txt" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.