mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-19 05:19:35 +00:00
render: Don't return blank addresses for pods
A small performance improvement - instead of creating an entry in a map which doesn't match anything, just skip a pod with a blank IP.
This commit is contained in:
@@ -116,7 +116,7 @@ func MapPod2IP(m report.Node) []string {
|
||||
}
|
||||
|
||||
ip, ok := m.Latest.Lookup(kubernetes.IP)
|
||||
if !ok {
|
||||
if !ok || ip == "" {
|
||||
return nil
|
||||
}
|
||||
return []string{report.MakeScopedEndpointNodeID("", ip, "")}
|
||||
|
||||
Reference in New Issue
Block a user