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

Support local_bind_address for Conusl Connect upstreams #6248

Closed
schmichael opened this issue Sep 3, 2019 · 5 comments · Fixed by #10071
Closed

Support local_bind_address for Conusl Connect upstreams #6248

schmichael opened this issue Sep 3, 2019 · 5 comments · Fixed by #10071
Labels

Comments

@schmichael
Copy link
Member

schmichael commented Sep 3, 2019

Support local_bind_address for Consul Connect upstreams:

             upstreams {
               destination_name = "count-api"
               local_bind_port = 8080
               local_bind_address = "0.0.0.0"
             }

Since IPs may vary by host, I think 0.0.0.0 and 127.0.0.1 are the only two options that make sense. We may just want to bind to 0.0.0.0 in network namespaces by default.

@schmichael schmichael added type/enhancement theme/consul/connect Consul Connect integration labels Sep 3, 2019
@dclfan
Copy link

dclfan commented Oct 25, 2019

+1 for this issue

@djenriquez
Copy link

@schmichael can you explain the need for this feature? This implies that there will be other sources that would be allowed access into the upstream apart from the tasks running in the network namespace. Which would mean needing to open up the local_bind_port from the network stanza.

@schmichael
Copy link
Member Author

@djenriquez Indeed, allowing binding upstreams to 0.0.0.0 inside the network namespace would allow explicitly configured port forwarding to give external access to the upstream and effectively masquerade as the service.

You could use this to implement an "ingress" style jobs which use Envoy to proxy untrusted external traffic to Connect-enabled services. For example if there was an api service using Connect, an ingress service could set a local_bind_address = "0.0.0.0"; local_bind_port = 1234 and port forward 1234 from the host interface to the upstream listener inside Envoy's network namespace.

The ingress job would be run as a system job on nodes that an ALB or similar load balancer points to, thus allowing external traffic to proxy from non-Connect load balancers, through the ingress service, to the Connect-enabled api service.

I'm not even sure local_bind_address is sufficient to make that use case work. Even if it is possible, it doesn't seem optimal. There's got to be a better way to do ingress right? 😅

It's a topic of active discussion internally but any feedback is welcome (either on this wacky "ingress" use case or other local_bind_address use cases).

@fredrikhgrelland
Copy link
Contributor

fredrikhgrelland commented May 20, 2020

There's got to be a better way to do ingress right?

https://www.consul.io/docs/agent/config-entries/ingress-gateway
With Consul 1.8 both ingress end termination is possible. Are you planning on implementing this in nomad directly? It would be a killer feature. Currently trying to figure out how to enable this feature in 11.2

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants