config: fix databroker policies (#1821)

This commit is contained in:
Caleb Doxsey 2021-01-25 17:18:50 -07:00 committed by GitHub
parent bcc8c17855
commit 84e8f6cc05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 42 additions and 20 deletions

View file

@ -82,7 +82,7 @@ func (src *ConfigSource) rebuild(firstTime bool) {
src.runUpdater(cfg)
seen := map[uint64]struct{}{}
for _, policy := range cfg.Options.Policies {
for _, policy := range cfg.Options.GetAllPolicies() {
seen[policy.RouteID()] = struct{}{}
}
@ -128,7 +128,7 @@ func (src *ConfigSource) rebuild(firstTime bool) {
}
// add the additional policies here since calling `Validate` will reset them.
cfg.Options.Policies = append(cfg.Options.Policies, additionalPolicies...)
cfg.Options.AdditionalPolicies = append(cfg.Options.AdditionalPolicies, additionalPolicies...)
src.computedConfig = cfg
if !firstTime {