Open blmhemu opened 8 months ago
You can access any data from the Consul service catalog in consul-template through the service
function. Nomad server endpoints are registered under nomad
service and clients can be found under nomad-client
. This means you can do things like this with consul-template
:
{{ range service "nomad-client" }} {{ .Address }}:{{ .Port }} {{ end }}
Would this work for your use case?
The above solution needs consul and consul-nomad integration - But what I proposed should work for standalone nomad.
Thanks, makes sense. Created a branch on my fork to work on it.
Feature Request
Add a way to enumerate over nomad nodes (and fetch the node data like ip, etc) similar to how we do for consul - https://github.com/hashicorp/consul-template/blob/main/docs/templating-language.md#nodes
This will enhance nomad service discovery story.
Use case
If we know which nodes nomad runs on can open up possibilities to connect to outside applications with known ports.