From 05988118dedf090c4d00428d2167bbc4ce08401a Mon Sep 17 00:00:00 2001 From: Damian Sawicki Date: Thu, 11 May 2023 16:52:23 +0000 Subject: [PATCH] Do not emit an Event on THC annotation typos --- pkg/controller/translator/translator.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkg/controller/translator/translator.go b/pkg/controller/translator/translator.go index b8769971d6..b9ef64b54f 100644 --- a/pkg/controller/translator/translator.go +++ b/pkg/controller/translator/translator.go @@ -217,9 +217,7 @@ func (t *Translator) setEnableTHC(sp *utils.ServicePort, svc *api_v1.Service) (f THCEnabled, err := annotations.FromService(svc).ShouldEnableTHC() if err != nil { - message := fmt.Sprintf("Parsing THC annotation failed: %+v.", err) - t.recorderGetter.Recorder(sp.ID.Service.Namespace).Event(svc, api_v1.EventTypeWarning, "THCAnnotationParsingFailed", message) - klog.Warning(message) + klog.Warningf("Parsing THC annotation failed: %+v.", err) } if THCEnabled && !t.enableTHC {