Skip to content

Commit

Permalink
Merge pull request #1530 from weaveworks/1514-deployment-pods
Browse files Browse the repository at this point in the history
Propagate the pod counter from replicasets for deployments.
  • Loading branch information
paulbellamy committed May 19, 2016
2 parents 24062be + 5f995ae commit d03c5b3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions render/pod.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,15 @@ func Map2Parent(topology string) func(n report.Node, _ report.Networks) report.N
for _, id := range groupIDs {
node := NewDerivedNode(id, n).WithTopology(topology)
node.Counters = node.Counters.Add(n.Topology, 1)

// When mapping replica(tionController)s(ets) to deployments
// we must propagate the pod counter.
if n.Topology != report.Pod {
if count, ok := n.Counters.Lookup(report.Pod); ok {
node.Counters = node.Counters.Add(report.Pod, count)
}
}

result[id] = node
}
return result
Expand Down

0 comments on commit d03c5b3

Please sign in to comment.