From 8e55a12ba108011fa0c2d1d0bbac33fe7934693e Mon Sep 17 00:00:00 2001 From: yuyi Date: Thu, 9 Nov 2023 16:37:10 +0800 Subject: [PATCH] chore: add addServer and deleteServer Event recording in OBZone --- pkg/resource/obzone_task.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/resource/obzone_task.go b/pkg/resource/obzone_task.go index 5a0013dfb..ebb2bba2f 100644 --- a/pkg/resource/obzone_task.go +++ b/pkg/resource/obzone_task.go @@ -138,6 +138,7 @@ func (m *OBZoneManager) CreateOBServer() error { m.Logger.Error(err, "create observer failed", "server", serverName) return errors.Wrap(err, "create observer") } + m.Recorder.Event(m.OBZone, "CreateObServer", "CreateObserver", fmt.Sprintf("Create observer %s", serverName)) } return nil } @@ -157,6 +158,7 @@ func (m *OBZoneManager) DeleteOBServer() error { if err != nil { return errors.Wrapf(err, "Delete observer %s failed", observer.Name) } + m.Recorder.Event(m.OBZone, "DeleteObServer", "DeleteObserver", fmt.Sprintf("Delete observer %+v", observer)) continue } observerCount++