mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-17 19:17:17 +02:00
databroker: sort configs (#4190)
This commit is contained in:
parent
7899e40973
commit
fe8e788076
1 changed files with 9 additions and 1 deletions
|
@ -2,9 +2,12 @@ package databroker
|
|||
|
||||
import (
|
||||
"context"
|
||||
"sort"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/pomerium/pomerium/config"
|
||||
"github.com/pomerium/pomerium/internal/hashutil"
|
||||
"github.com/pomerium/pomerium/internal/log"
|
||||
|
@ -92,8 +95,13 @@ func (src *ConfigSource) rebuild(ctx context.Context, firstTime firstTime) {
|
|||
|
||||
var additionalPolicies []config.Policy
|
||||
|
||||
ids := maps.Keys(src.dbConfigs)
|
||||
sort.Strings(ids)
|
||||
|
||||
// add all the config policies to the list
|
||||
for id, cfgpb := range src.dbConfigs {
|
||||
for _, id := range ids {
|
||||
cfgpb := src.dbConfigs[id]
|
||||
|
||||
cfg.Options.ApplySettings(ctx, cfgpb.Settings)
|
||||
var errCount uint64
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue