Experimenting with services (specifically the vault agent api proxy: https://developer.hashicorp.com/vault/docs/agent/apiproxy). I've started a service with port 8100 exposed, and configured the agent to listen on port 8100. The service starts up and reaches it's idle state waiting for requests sent to it, but it blocks the pipeline from continuing at that point.
Service:
vault_agent = (
client.container()
.from_("hashicorp/vault:1.13.0")
.with_file("/home/vault/config.hcl", vault_config_file)
.with_file("/home/vault/.vault-token", vault_token_file, 777)
.with_entrypoint(
[
"vault",
"agent",
"-config=/home/vault/config.hcl",
]
)
.with_exec([])
.with_exposed_port(8100)
)
(Config file contains, among other stanzas, a listener with address 127.0.0.1:8100 and tls_disable=true)
This sits idle when running the pipeline:
#0 0.350 2023-04-12T08:21:13.246Z [INFO] agent.auth.handler: authentication successful, sending token to sinks
#0 0.350 2023-04-12T08:21:13.246Z [INFO] agent.auth.handler: starting renewal process
#0 0.406 2023-04-12T08:21:13.302Z [INFO] agent.auth.handler: renewed auth token
That is now going to wait indefinitely for requests.
This part of the pipeline is therefore never reached:
vault_client = (
client.container()
.from_("alpine:latest")
.with_service_binding("agent", vault_agent)
.with_exec([])
)
@hazy obsidian Continued from my question in #general . It may well be that this isn't a suitable service, this is all experimental for now.