core/config: disable gRPC ingress when address is the empty string (#5058)

* core/config: disable gRPC ingress when address is the empty string

* add test

* typo
This commit is contained in:
Caleb Doxsey 2024-04-10 13:53:08 -06:00 committed by GitHub
parent 5f800300a4
commit 322e11e60d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 50 additions and 9 deletions

View file

@ -272,15 +272,8 @@ func (src *ConfigSource) runUpdater(cfg *config.Config) {
}, databroker.WithTypeURL(grpcutil.GetTypeURL(new(configpb.Config))),
databroker.WithFastForward())
go func() {
var databrokerURLs []string
urls, _ := cfg.Options.GetDataBrokerURLs()
for _, url := range urls {
databrokerURLs = append(databrokerURLs, url.String())
}
log.Debug(ctx).
Str("outbound_port", cfg.OutboundPort).
Strs("databroker_urls", databrokerURLs).
Msg("config: starting databroker config source syncer")
_ = grpc.WaitForReady(ctx, cc, time.Second*10)
_ = syncer.Run(ctx)