mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
fix reload issue for tls certificates in dev mode
This commit is contained in:
@@ -256,6 +256,15 @@ func (c *Command) readConfig() *Config {
|
||||
}
|
||||
}
|
||||
|
||||
// Set up the TLS configuration properly if we have one.
|
||||
// XXX chelseakomlo: set up a TLSConfig New method which would wrap
|
||||
// constructor-type actions like this.
|
||||
if config.TLSConfig != nil && !config.TLSConfig.IsEmpty() {
|
||||
if err := config.TLSConfig.SetChecksum(); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("WARNING: Error when parsing TLS configuration: %v", err))
|
||||
}
|
||||
}
|
||||
|
||||
if dev {
|
||||
// Skip validation for dev mode
|
||||
return config
|
||||
@@ -319,15 +328,6 @@ func (c *Command) readConfig() *Config {
|
||||
c.Ui.Error("WARNING: Bootstrap mode enabled! Potentially unsafe operation.")
|
||||
}
|
||||
|
||||
// Set up the TLS configuration properly if we have one.
|
||||
// XXX chelseakomlo: set up a TLSConfig New method which would wrap
|
||||
// constructor-type actions like this.
|
||||
if config.TLSConfig != nil && !config.TLSConfig.IsEmpty() {
|
||||
if err := config.TLSConfig.SetChecksum(); err != nil {
|
||||
c.Ui.Error(fmt.Sprintf("WARNING: Error when parsing TLS configuration: %v", err))
|
||||
}
|
||||
}
|
||||
|
||||
return config
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user