From 06909d2465e75f492adc221ef9bdf401f514462c Mon Sep 17 00:00:00 2001 From: Evan Gilman Date: Tue, 16 Aug 2016 12:32:53 -0700 Subject: [PATCH] Use bind address for consul healtchecks in nomad client too --- command/agent/agent.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/command/agent/agent.go b/command/agent/agent.go index 510c6482e..14b863f18 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -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, })