Skip to content

Commit

Permalink
Add byobject filter on nodes (#2888)
Browse files Browse the repository at this point in the history
* Add byobject filter on nodes

---------

Co-authored-by: Jayanth Varavani <1111446+jayanthvn@users.noreply.github.com>
Co-authored-by: Garvin Pang <garvinp@stripe.com>
  • Loading branch information
3 people authored Oct 23, 2024
1 parent 119383c commit 0703d03
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/k8sapi/k8sutils.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ func getIPAMDCacheFilters() map[client.Object]cache.ByObject {
return map[client.Object]cache.ByObject{
&corev1.Pod{}: {
Field: fields.Set{"spec.nodeName": nodeName}.AsSelector(),
}}
},
&corev1.Node{}: {
Field: fields.Set{"metadata.name": nodeName}.AsSelector(),
},
}
}
return nil
}
Expand Down

0 comments on commit 0703d03

Please sign in to comment.