fix(config): treat a [[curators]] entry without enabled as on
This commit is contained in:
1 parent
2e7158a760
commit
a2ade2ee42
3 files changed
+16
-3
No files matched your search
@@ -68,6 +68,18 @@ func (l *Loader) applyDefaults(cfg *config.Config) {
|
||||
applyCaptureDefaults(cfg)
|
||||
applyNATSDefaults(cfg)
|
||||
applyMemoryDefaults(cfg)
|
||||
applyCuratorDefaults(cfg)
|
||||
}
|
||||
|
||||
// applyCuratorDefaults resolves an omitted enabled key to on, so the seeded
|
||||
// resource and the dashboard show the state the runtime applies.
|
||||
func applyCuratorDefaults(cfg *config.Config) {
|
||||
for i := range cfg.Curators {
|
||||
if cfg.Curators[i].Enabled == nil {
|
||||
on := true
|
||||
cfg.Curators[i].Enabled = &on
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// applyServiceDefaults fills each registered service's absent addresses from
|
||||
|
||||
Reference in new issue
Block a user