diff --git a/command/agent/agent.go b/command/agent/agent.go index b50d89f60..5c2f726d7 100644 --- a/command/agent/agent.go +++ b/command/agent/agent.go @@ -239,7 +239,9 @@ func (a *Agent) serverConfig() (*nomad.Config, error) { return nil, fmt.Errorf("server_service_name must be set when auto_advertise is enabled") } + // Add the Consul and Vault configs conf.ConsulConfig = a.config.Consul + conf.VaultConfig = a.config.Vault return conf, nil } diff --git a/nomad/config.go b/nomad/config.go index 59097c0d8..7d58f81a3 100644 --- a/nomad/config.go +++ b/nomad/config.go @@ -182,6 +182,9 @@ type Config struct { // ConsulConfig is this Agent's Consul configuration ConsulConfig *config.ConsulConfig + // VaultConfig is this Agent's Vault configuration + VaultConfig *config.VaultConfig + // RPCHoldTimeout is how long an RPC can be "held" before it is errored. // This is used to paper over a loss of leadership by instead holding RPCs, // so that the caller experiences a slow response rather than an error. @@ -234,6 +237,7 @@ func DefaultConfig() *Config { HeartbeatGrace: 10 * time.Second, FailoverHeartbeatTTL: 300 * time.Second, ConsulConfig: config.DefaultConsulConfig(), + VaultConfig: config.DefaultVaultConfig(), RPCHoldTimeout: 5 * time.Second, }