agent: update accepted CA config fields and defaults

This commit is contained in:
Kyle Havlovitz 2018-06-06 10:45:58 -07:00 committed by Jack Pearkes
parent 7846206753
commit a242e5b130
2 changed files with 8 additions and 1 deletions

View file

@ -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 := ""

View file

@ -438,7 +438,7 @@ func DefaultConfig() *Config {
Config: map[string]interface{}{
"PrivateKey": "",
"RootCert": "",
"RotationPeriod": 90 * 24 * time.Hour,
"RotationPeriod": "2160h",
},
},