Skip to content

Commit

Permalink
render: Don't return blank addresses for pods
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bboreham committed May 29, 2018
1 parent 6ded495 commit fe28feb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion render/pod.go
Expand Up @@ -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, "")}
Expand Down

0 comments on commit fe28feb

Please sign in to comment.