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

Add a way to template nomad nodes (similar to consul nodes). #1860

Open
blmhemu opened this issue Dec 18, 2023 · 3 comments
Open

Add a way to template nomad nodes (similar to consul nodes). #1860

blmhemu opened this issue Dec 18, 2023 · 3 comments

Comments

@blmhemu
Copy link

blmhemu commented Dec 18, 2023

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.

@thevilledev
Copy link
Contributor

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?

@blmhemu
Copy link
Author

blmhemu commented Mar 23, 2024

The above solution needs consul and consul-nomad integration - But what I proposed should work for standalone nomad.

@thevilledev
Copy link
Contributor

Thanks, makes sense. Created a branch on my fork to work on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants