consul: plubming for specifying consul namespace in job/group

This PR adds the common OSS changes for adding support for Consul Namespaces,
which is going to be a Nomad Enterprise feature. There is no new functionality
provided by this changeset and hopefully no new bugs.
This commit is contained in:
Seth Hoenig
2021-03-16 13:22:21 -05:00
parent 5c3399853d
commit a97254fa20
73 changed files with 2078 additions and 529 deletions

View File

@@ -1158,7 +1158,8 @@ func (a *Agent) setupConsul(consulConfig *config.ConsulConfig) error {
}
// Create Consul Agent client for looking info about the agent.
consulAgentClient := consulClient.Agent()
a.consulService = consul.NewServiceClient(consulAgentClient, a.logger, isClient)
namespacesClient := consul.NewNamespacesClient(consulClient.Namespaces())
a.consulService = consul.NewServiceClient(consulAgentClient, namespacesClient, a.logger, isClient)
a.consulProxies = consul.NewConnectProxiesClient(consulAgentClient)
// Run the Consul service client's sync'ing main loop