Consider this basic upstream config for a service (service_b):
connect {
sidecar_service {
proxy {
upstreams {
destination_name = "service_a"
local_bind_port = 8080
}
}
}
}
And then configuring service_b with the endpoint to access it:
env {
SERVICE_A_ENDPOINT="http://${NOMAD_UPSTREAM_ADDR_service_a}"
}
Which yields http://127.0.0.1:8080
. This is an issue when using things like ElasticAPM, where all we can see in the http transactions are services all talking to localhost, and not a nice domain name endpoint they would otherwise normally use.
Is there a way to have the connect-enabled / envoy-proxied services exposed over Consul’s DNS interface? so then we could have something like http://${NOMAD_UPSTREAM_host_service_a}:${NOMAD_UPSTREAM_port_service_a}
or something similar?