Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/util/helper/predicate.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,11 @@ func NewClusterPredicateOnAgent(clusterName string) predicate.Funcs {
CreateFunc: func(createEvent event.CreateEvent) bool {
return createEvent.Object.GetName() == clusterName
},
UpdateFunc: func(updateEvent event.UpdateEvent) bool {
return updateEvent.ObjectOld.GetName() == clusterName
UpdateFunc: func(_ event.UpdateEvent) bool {
return false
},
DeleteFunc: func(deleteEvent event.DeleteEvent) bool {
return deleteEvent.Object.GetName() == clusterName
DeleteFunc: func(_ event.DeleteEvent) bool {
return false
},
GenericFunc: func(event.GenericEvent) bool {
return false
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/helper/predicate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ func TestNewClusterPredicateOnAgent(t *testing.T) {
obj: &clusterv1alpha1.Cluster{ObjectMeta: metav1.ObjectMeta{Name: "test"}},
want: want{
create: true,
update: true,
delete: true,
update: false,
delete: false,
generic: false,
},
},
Expand Down