hashicorp / nomad

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
https://www.nomadproject.io/
Other
14.86k stars 1.95k forks source link

task-networking: allowing easier discovery or connectivity to local Consul agents #10665

Open jrasell opened 3 years ago

jrasell commented 3 years ago

It would be helpful to provide a nicer experience in situations where tasks require access to the Consul API. It is possible to hook this up currently, but the way in which it needs to be done seems suboptimal. The request has came about due to work being performed on the Nomad Autoscaler which will optionally use Consul in the future.

Nomad Connect native tasks receive a number of Consul environment variables, including the HTTP address via the connectNativeHook which could potentially be replicated here as an opt-in for tasks running on nodes where there is a configured Consul client from the nodes view.

This functionality could also be extended to Vault, allowing for better integration across commonly used HashiCorp products.

Internal discussions points regarding potential solutions for context:

jboero commented 3 years ago

Consul is just about to release UDS support as well. Looking forward to this in the 1.10 release but support is available as of the 1.10beta2 release. :+1: