Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

network: expose network namespace configured IP to task env #11340

Open
jrasell opened this issue Oct 18, 2021 · 0 comments
Open

network: expose network namespace configured IP to task env #11340

jrasell opened this issue Oct 18, 2021 · 0 comments
Assignees
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/networking type/enhancement

Comments

@jrasell
Copy link
Member

jrasell commented Oct 18, 2021

When utilising the Nomad network stanza and specifically mode = bridge, Nomad will create a network namespace and have CNI configure the namespace with a private IP address according to the configuration within networking_bridge_linux. This IP is the only address, alongside the loopback which is configured in the network namespace.

Applications that cluster together, such as Vault utilising Raft storage require exposing an IP that other members can connect to for RPC. Due to its nature, this IP must be routable from outside the container.

Nomad does not expose the configured IP to the task and therefore it is up to the task to figure out what IP address it must configure for binding and exposure. This is possible if the application utilises go-sockaddr, but this is a specific requirement that not even Vault can realise currently (Vault pr hashicorp/vault#9109).

Nomad should be enhanced so that any configured CNI address is exposed to the task as an environment variable in the same manner that NOMAD_HOST_, NOMAD_ADDR_, and NOMAD_IP_ variables are exposed. This would then allow tasks to read this variable in using Nomad interpolation or template stanzas.

@jrasell jrasell added type/enhancement theme/networking stage/accepted Confirmed, and intend to work on. No timeline committment though. labels Oct 18, 2021
@jrasell jrasell self-assigned this Oct 18, 2021
@jrasell jrasell modified the milestone: 1.2.0 Oct 18, 2021
@jrasell jrasell added this to Needs Triage in Nomad - Community Issues Triage via automation Oct 18, 2021
@jrasell jrasell moved this from Needs Triage to Needs Roadmapping in Nomad - Community Issues Triage Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage/accepted Confirmed, and intend to work on. No timeline committment though. theme/networking type/enhancement
Projects
Development

No branches or pull requests

1 participant