mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 17:51:21 +00:00
join with original renderer in ConnectionJoin
This guarantees that the output won't contain bare nodes containing just an id and topology, as produced by ipToNode. Previously this was ensured by calling convention, now it's ensured by construction.
This commit is contained in:
@@ -36,12 +36,7 @@ var ContainerRenderer = MakeFilter(
|
||||
MapProcess2Container,
|
||||
ColorConnectedProcessRenderer,
|
||||
),
|
||||
|
||||
// This mapper brings in connections by joining with container
|
||||
// IPs.
|
||||
ConnectionJoin(MapContainer2IP, SelectContainer),
|
||||
|
||||
SelectContainer,
|
||||
),
|
||||
)
|
||||
|
||||
@@ -68,12 +63,15 @@ func ConnectionJoin(toIPs func(report.Node) []string, r Renderer) Renderer {
|
||||
return result
|
||||
}
|
||||
|
||||
return MakeMap(
|
||||
ipToNode,
|
||||
MakeReduce(
|
||||
MakeMap(nodeToIP, r),
|
||||
mapEndpoint2IP,
|
||||
return MakeReduce(
|
||||
MakeMap(
|
||||
ipToNode,
|
||||
MakeReduce(
|
||||
MakeMap(nodeToIP, r),
|
||||
mapEndpoint2IP,
|
||||
),
|
||||
),
|
||||
r,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -48,8 +48,7 @@ var PodRenderer = ConditionalRenderer(renderKubernetesTopologies,
|
||||
),
|
||||
),
|
||||
),
|
||||
selectPodsWithDeployments{},
|
||||
ConnectionJoin(MapPod2IP, SelectPod),
|
||||
ConnectionJoin(MapPod2IP, selectPodsWithDeployments{}),
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user