From 0ac9af3c08d874cf3d26c552f9623dacf35a29dd Mon Sep 17 00:00:00 2001 From: Punakshi Chaand Date: Thu, 5 Dec 2024 15:40:51 -0800 Subject: [PATCH] =?UTF-8?q?MESH-0000:=20Enhance=20logging=20for=20GlobalTr?= =?UTF-8?q?afficPolicy=20events=20in=20GlobalTr=E2=80=A6=20(#826)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * MESH-XXXX: Enhance logging for GlobalTrafficPolicy events in GlobalTrafficHandler --- admiral/pkg/clusters/globaltraffic_handler.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/admiral/pkg/clusters/globaltraffic_handler.go b/admiral/pkg/clusters/globaltraffic_handler.go index 6dd367c1a..7fac9a131 100644 --- a/admiral/pkg/clusters/globaltraffic_handler.go +++ b/admiral/pkg/clusters/globaltraffic_handler.go @@ -66,6 +66,7 @@ func (g *globalTrafficCache) Delete(identity string, environment string) error { func (gtp *GlobalTrafficHandler) Added(ctx context.Context, obj *v1.GlobalTrafficPolicy) error { log.Infof(LogFormat, "Added", "globaltrafficpolicy", obj.Name, gtp.ClusterID, "received") + log.Infof(LogFormat, "Added", "globaltrafficpolicy", obj.Name, gtp.ClusterID, fmt.Sprintf("received gtp: %v", obj)) err := HandleEventForGlobalTrafficPolicy(ctx, admiral.Add, obj, gtp.RemoteRegistry, gtp.ClusterID, modifyServiceEntryForNewServiceOrPod) if err != nil { return fmt.Errorf(LogErrFormat, "Added", "globaltrafficpolicy", obj.Name, gtp.ClusterID, err.Error()) @@ -75,6 +76,7 @@ func (gtp *GlobalTrafficHandler) Added(ctx context.Context, obj *v1.GlobalTraffi func (gtp *GlobalTrafficHandler) Updated(ctx context.Context, obj *v1.GlobalTrafficPolicy) error { log.Infof(LogFormat, "Updated", "globaltrafficpolicy", obj.Name, gtp.ClusterID, "received") + log.Infof(LogFormat, "Updated", "globaltrafficpolicy", obj.Name, gtp.ClusterID, fmt.Sprintf("received gtp: %v", obj)) err := HandleEventForGlobalTrafficPolicy(ctx, admiral.Update, obj, gtp.RemoteRegistry, gtp.ClusterID, modifyServiceEntryForNewServiceOrPod) if err != nil { return fmt.Errorf(LogErrFormat, "Updated", "globaltrafficpolicy", obj.Name, gtp.ClusterID, err.Error())