Skip to content

Commit

Permalink
Do not emit an Event on THC annotation typos
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianSawicki committed May 11, 2023
1 parent 9c2d0d8 commit 0598811
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/controller/translator/translator.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 0598811

Please sign in to comment.