diff --git a/client/client.go b/client/client.go index eecb27d9f..91a86a57a 100644 --- a/client/client.go +++ b/client/client.go @@ -1268,7 +1268,7 @@ func (c *Client) addAlloc(alloc *structs.Allocation) error { // setupConsulClient creates a ConsulService func (c *Client) setupConsulClient() error { - cs, err := consul.NewConsulService(c.config.ConsulConfig, c.logger) + cs, err := consul.NewConsulService(c.config.ConsulAgentConfig, c.logger) c.consulService = cs return err } diff --git a/client/client_test.go b/client/client_test.go index e0c7d7177..6e7553ce3 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -72,7 +72,7 @@ func testServer(t *testing.T, cb func(*nomad.Config)) (*nomad.Server, string) { func testClient(t *testing.T, cb func(c *config.Config)) *Client { conf := DefaultConfig() conf.DevMode = true - conf.ConsulConfig = &consul.AgentConfig{} + conf.ConsulAgentConfig = &consul.AgentConfig{} if cb != nil { cb(conf) } diff --git a/client/config/config.go b/client/config/config.go index e1e2ae892..4f392ec80 100644 --- a/client/config/config.go +++ b/client/config/config.go @@ -110,8 +110,9 @@ type Config struct { // Revision is the commit number of the Nomad client Revision string - // ConsulConfig is the configuration to connect with Consul Agent - ConsulConfig *consul.AgentConfig + // ConsulAgentConfig is the configuration to connect with Consul + // Agent + ConsulAgentConfig *consul.AgentConfig // StatsDataPoints is the number of resource usage data points the Nomad // client keeps in memory diff --git a/command/agent/agent.go b/command/agent/agent.go index 37d2580c0..53c821b0c 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -272,7 +272,7 @@ func (a *Agent) clientConfig() (*clientconfig.Config, error) { conf.Version = fmt.Sprintf("%s%s", a.config.Version, a.config.VersionPrerelease) conf.Revision = a.config.Revision - conf.ConsulConfig = a.consulConfig + conf.ConsulAgentConfig = a.consulConfig conf.StatsDataPoints = a.config.Client.StatsConfig.DataPoints conf.StatsCollectionInterval = a.config.Client.StatsConfig.collectionInterval