[Proposal] docker service create/stack deploy template support for {{ .Node.Address }}
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 3.7k
- Forks
- 676
- Avg merge
- 4d 9h
- Merged PRs (30d)
- 6
Description
I would like to propose adding .Node.Address to the template rendering engine as is done for .Node.Hostname in #1951 - for similar reasons, except DNS calls could be avoided.
My use case is that I am using consul as a service discovery, and would like to get the external node IP address (swarm node address) for a container running without --net=host (so having no access to swarm node interfaces). I could get it with .Node.Hostname, but that would require use of DNS, which could be avoided.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the template rendering engine and compare the existing .Node.Hostname support described in issue #1951. Trace how templates are handled for docker service create and stack deploy; done means .Node.Address is available in both paths and can provide the swarm node address without requiring DNS.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100