fix(config): treat a [[curators]] entry without enabled as on

This commit is contained in:
sam committed 2026-10-17 17:15:34 +11:00
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