Skip to content

Commit

Permalink
Filter list of events with exact watch to allow for cache usage
Browse files Browse the repository at this point in the history
  • Loading branch information
djwhatle committed Apr 21, 2021
1 parent 8624ad1 commit 4613a9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/event/event.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func GetAbnormalEventsForResource(client client.Client,

eList := corev1.EventList{}
options := k8sclient.InNamespace(nsName.Namespace)
fieldSelector := fmt.Sprintf("involvedObject.name=%s,involvedObject.kind=%s,type!=Normal",
fieldSelector := fmt.Sprintf("involvedObject.name=%s,involvedObject.kind=%s,type=Warning",
nsName.Name, resourceKind)
err := options.SetFieldSelector(fieldSelector)
if err != nil {
Expand Down

0 comments on commit 4613a9b

Please sign in to comment.