mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 10:25:42 +03:00
Reduce all forms of ConsulConfig down to a single struct
nomad/structs/config/consul.go's ConsulConfig is the canonical definition for all things Consul now.
This commit is contained in:
@@ -86,12 +86,12 @@ func consulContext(clientConfig *config.Config, containerID string) *executor.Co
|
||||
ClientServiceName: clientConfig.ReadDefault("consul.client_service_name", "nomad-client"),
|
||||
}
|
||||
return &executor.ConsulContext{
|
||||
ConsulAgentConfig: &cfg,
|
||||
ContainerID: containerID,
|
||||
DockerEndpoint: clientConfig.Read("docker.endpoint"),
|
||||
TLSCa: clientConfig.Read("docker.tls.ca"),
|
||||
TLSCert: clientConfig.Read("docker.tls.cert"),
|
||||
TLSKey: clientConfig.Read("docker.tls.key"),
|
||||
ConsulConfig: &cfg,
|
||||
ContainerID: containerID,
|
||||
DockerEndpoint: clientConfig.Read("docker.endpoint"),
|
||||
TLSCa: clientConfig.Read("docker.tls.ca"),
|
||||
TLSCert: clientConfig.Read("docker.tls.cert"),
|
||||
TLSKey: clientConfig.Read("docker.tls.key"),
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -278,7 +278,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.ConsulAgentConfig = a.consulAgentConfig
|
||||
conf.ConsulConfig = a.consulConfig
|
||||
|
||||
conf.StatsDataPoints = a.config.Client.StatsConfig.DataPoints
|
||||
conf.StatsCollectionInterval = a.config.Client.StatsConfig.collectionInterval
|
||||
|
||||
Reference in New Issue
Block a user