Merge remote-tracking branch 'origin/main' into cdoxsey/change-dispatcher

This commit is contained in:
Caleb Doxsey 2023-11-01 10:20:22 -06:00
commit cf5b009ce5
11 changed files with 877 additions and 874 deletions

View file

@ -117,7 +117,6 @@ func NewFileOrEnvironmentSource(
cfg := &Config{
Options: options,
EnvoyVersion: envoyVersion,
Version: 1,
}
ports, err := netutil.AllocatePorts(6)
@ -155,7 +154,6 @@ func (src *FileOrEnvironmentSource) check(ctx context.Context) {
options, err := newOptionsFromConfig(src.configFile)
if err == nil {
cfg = cfg.Clone()
cfg.Version++
cfg.Options = options
metrics.SetConfigInfo(ctx, cfg.Options.Services, "local", cfg.Checksum(), true)
} else {
@ -165,7 +163,7 @@ func (src *FileOrEnvironmentSource) check(ctx context.Context) {
src.config = cfg
src.mu.Unlock()
log.Info(ctx).Int64("config-version", cfg.Version).Msg("config: loaded configuration")
log.Info(ctx).Msg("config: loaded configuration")
src.Trigger(ctx, cfg)
}