From a242e5b13051cf16ba5d013c9ae64106f4568621 Mon Sep 17 00:00:00 2001 From: Kyle Havlovitz Date: Wed, 6 Jun 2018 10:45:58 -0700 Subject: [PATCH] agent: update accepted CA config fields and defaults --- agent/config/builder.go | 7 +++++++ agent/consul/config.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/agent/config/builder.go b/agent/config/builder.go index 6f0471481..b043540cc 100644 --- a/agent/config/builder.go +++ b/agent/config/builder.go @@ -534,6 +534,13 @@ func (b *Builder) Build() (rt RuntimeConfig, err error) { connectEnabled = b.boolVal(c.Connect.Enabled) connectCAProvider = b.stringVal(c.Connect.CAProvider) connectCAConfig = c.Connect.CAConfig + if c.Connect.CAConfig != nil { + TranslateKeys(connectCAConfig, map[string]string{ + "private_key": "PrivateKey", + "root_cert": "RootCert", + "rotation_period": "RotationPeriod", + }) + } } proxyDefaultExecMode := "" diff --git a/agent/consul/config.go b/agent/consul/config.go index 461a7dcf7..66f7c65f0 100644 --- a/agent/consul/config.go +++ b/agent/consul/config.go @@ -438,7 +438,7 @@ func DefaultConfig() *Config { Config: map[string]interface{}{ "PrivateKey": "", "RootCert": "", - "RotationPeriod": 90 * 24 * time.Hour, + "RotationPeriod": "2160h", }, },