Remove Port from registry

This commit is contained in:
Asim Aslam
2019-07-08 08:01:42 +01:00
parent 5b7454e5a8
commit e0bf1c2283
35 changed files with 92 additions and 228 deletions

View File

@@ -98,13 +98,9 @@ func (r *router) addServiceRoutes(reg registry.Registry, network string, metric
// range over the flat slice of nodes
for _, node := range nodes {
gateway := node.Address
if node.Port > 0 {
gateway = fmt.Sprintf("%s:%d", node.Address, node.Port)
}
route := Route{
Destination: service.Name,
Gateway: gateway,
Gateway: node.Address,
Router: r.opts.Address,
Network: r.opts.Network,
Metric: metric,