Skip to content

Commit 75a3318

Browse files
committed
switch back to deprecated event recorder api
1 parent acd6ff3 commit 75a3318

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

controllers/reconciler/base_controller.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ import (
2929
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3030
"k8s.io/apimachinery/pkg/runtime"
3131
"k8s.io/apimachinery/pkg/types"
32-
"k8s.io/client-go/tools/events"
3332
"k8s.io/client-go/tools/record"
3433
"sigs.k8s.io/controller-runtime/pkg/client"
3534
logf "sigs.k8s.io/controller-runtime/pkg/log"
@@ -89,8 +88,8 @@ func (in *CommonReconciler) GetManager() manager.Manager { return in.mgr }
8988
func (in *CommonReconciler) GetClient() client.Client { return in.mgr.GetClient() }
9089
func (in *CommonReconciler) GetClientSet() clients.ClientSet { return in.clientSet }
9190
func (in *CommonReconciler) GetMutex() *sync.Mutex { return in.mutex }
92-
func (in *CommonReconciler) GetEventRecorder() events.EventRecorder {
93-
return in.mgr.GetEventRecorder(in.name)
91+
func (in *CommonReconciler) GetEventRecorder() record.EventRecorder {
92+
return in.mgr.GetEventRecorderFor(in.name)
9493
}
9594
func (in *CommonReconciler) GetLog() logr.Logger {
9695
return in.logger

0 commit comments

Comments
 (0)