Skip to content

Commit

Permalink
remove log (#19029)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndhanushkodi authored Sep 29, 2023
1 parent 5e45db1 commit 9a48266
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions agent/xds/delta.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,33 +95,26 @@ func (s *Server) DeltaAggregatedResources(stream ADSDeltaStream) error {
func getEnvoyConfiguration(proxySnapshot proxysnapshot.ProxySnapshot, logger hclog.Logger, cfgFetcher configfetcher.ConfigFetcher) (map[string][]proto.Message, error) {
switch proxySnapshot.(type) {
case *proxycfg.ConfigSnapshot:
logger.Trace("ProxySnapshot update channel received a ProxySnapshot of type ConfigSnapshot",
"proxySnapshot", proxySnapshot,
)
logger.Trace("ProxySnapshot update channel received a ProxySnapshot of type ConfigSnapshot")
generator := NewResourceGenerator(
logger,
cfgFetcher,
true,
)

c := proxySnapshot.(*proxycfg.ConfigSnapshot)
logger.Trace("ConfigSnapshot", c)
return generator.AllResourcesFromSnapshot(c)
case *proxytracker.ProxyState:
logger.Trace("ProxySnapshot update channel received a ProxySnapshot of type ProxyState",
"proxySnapshot", proxySnapshot,
)
logger.Trace("ProxySnapshot update channel received a ProxySnapshot of type ProxyState")
generator := xdsv2.NewResourceGenerator(
logger,
)
c := proxySnapshot.(*proxytracker.ProxyState)
logger.Trace("ProxyState", c)
resources, err := generator.AllResourcesFromIR(c)
if err != nil {
logger.Error("error generating resources from proxy state template", "err", err)
return nil, err
}
logger.Trace("generated resources from proxy state template", "resources", resources)
return resources, nil
default:
return nil, errors.New("proxysnapshot must be of type ProxyState or ConfigSnapshot")
Expand Down

0 comments on commit 9a48266

Please sign in to comment.