Use bind address for consul healtchecks in nomad client too

This commit is contained in:
Evan Gilman
2016-08-16 12:32:53 -07:00
committed by Alex Dadgar
parent 3e2b2fdb86
commit 801352e0bc

View File

@@ -521,6 +521,9 @@ func (a *Agent) setupClient() error {
},
},
}
if a.config.Addresses.HTTP != "" && a.config.Addresses.HTTP != "0.0.0.0" {
httpServ.Checks[0].PortLabel = net.JoinHostPort(a.config.Addresses.HTTP, strconv.Itoa(a.config.Ports.HTTP))
}
a.consulSyncer.SetServices(consul.ClientDomain, map[consul.ServiceKey]*structs.Service{
consul.GenerateServiceKey(httpServ): httpServ,
})