Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
ekimekim committed Jun 21, 2017
1 parent 0080a4e commit 71db37e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 16 deletions.
1 change: 0 additions & 1 deletion render/detailed/summary.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ func podNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
var podGroupNodeTypeName = map[string]string{
report.Deployment: "Deployment",
report.DaemonSet: "Daemon Set",
report.ReplicaSet: "Replica Set",
}

func podGroupNodeSummary(base NodeSummary, n report.Node) (NodeSummary, bool) {
Expand Down
23 changes: 8 additions & 15 deletions render/pod.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package render

import (
"fmt"
"strings"

"github.com/weaveworks/scope/probe/docker"
Expand Down Expand Up @@ -79,9 +78,8 @@ var ReplicaSetRenderer = ConditionalRenderer(renderKubernetesTopologies,
)

// KubeControllerRenderer is a Renderer which combines all the 'controller' topologies.
// We first map pods to all possible things they can map to, then we map again to
// deployments since some things (replica sets) can map to those (the rest are passed through
// unchanged).
// We first map pods to daemonsets and replica sets, then to deployments since replica sets
// can map to those (the rest are passed through unchanged).
// Pods with no controller are mapped to 'Unmanaged'
// We can't simply combine the rendered graphs of the high level objects as they would never
// have connections to each other.
Expand Down Expand Up @@ -110,18 +108,15 @@ func renderParents(childTopology string, parentTopologies []string, noParentsAct
for i, topology := range parentTopologies {
selectors[i] = TopologySelector(topology)
}
// weird append form is to accomplish MakeReduce(subrenderer, selectors...) since that form isn't allowed
return MakeReduce(append(
[]Renderer{
selectors,
MakeMap(
PropagateSingleMetrics(childTopology),
MakeMap(
PropagateSingleMetrics(childTopology),
MakeMap(
Map2Parent(parentTopologies, noParentsAction, noParentsPseudoID, modifyMappedNode),
childRenderer,
),
Map2Parent(parentTopologies, noParentsAction, noParentsPseudoID, modifyMappedNode),
childRenderer,
),
},
selectors...,
),
)...)
}

Expand Down Expand Up @@ -206,8 +201,6 @@ func Map2Parent(
result[n.ID] = n
case NoParentsDrop:
// Do nothing, we will return an empty result
default:
panic(fmt.Sprintf("Map2Parent got bad noParentsAction %v", noParentsAction))
}
}

Expand Down

0 comments on commit 71db37e

Please sign in to comment.