resolve service container hostname
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2.2k
- Forks
- 875
- PR merge metrics
- No merged PRs in 30d
Description
how about to resolve service container hostname?
for example as follow
diff --git a/agent.go b/agent.go
index 4a5c2156..162d4b1f 100644
--- a/agent.go
+++ b/agent.go
@@ -640,6 +640,7 @@ func (ep *endpoint) addServiceInfoToCluster(sb *sandbox) error {
if n.ingress {
ingressPorts = ep.ingressPorts
}
+ ep.myAliases = append(ep.myAliases, sb.config.hostName)
if err := c.addServiceBinding(ep.svcName, ep.svcID, n.ID(), ep.ID(), name, ep.virtualIP, ingressPorts, ep.svcAliases, ep.myAliases, ep.Iface().Address().IP, "addServiceInfoToCluster"); err != nil {
return err
}
it works with templating hostname as {{.Service.Name}}-{{.Task.Slot}} or {{.Service.Name}}-{{.Node.Hostname}}
Contributor guide
No contributing guide indexed for this repository
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 in agent.go at endpoint.addServiceInfoToCluster, especially the addServiceBinding call and the proposed sb.config.hostName alias. Compare the existing service alias handling with the hostname templates shown in the issue, then verify that service container hostnames resolve as expected without breaking current bindings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100