mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
Discard pod updates for other nodes
We were filtering pods to those on the local node already, for regular reports, so we should also filter events that come in asynchronously.
This commit is contained in:
@@ -193,6 +193,10 @@ func (r *Reporter) Stop() {
|
||||
func (Reporter) Name() string { return "K8s" }
|
||||
|
||||
func (r *Reporter) podEvent(e Event, pod Pod) {
|
||||
// filter out non-local pods, if we have been given a node name to report on
|
||||
if r.nodeName != "" && pod.NodeName() != r.nodeName {
|
||||
return
|
||||
}
|
||||
switch e {
|
||||
case ADD:
|
||||
rpt := report.MakeReport()
|
||||
|
||||
Reference in New Issue
Block a user