Add Vault config to server
This commit is contained in:
parent
1cd69e3550
commit
c913e4396f
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue