Commit 0848ad22 authored by gmarek's avatar gmarek

Prevent division by 0 error in resource-gatherer

parent 1738bbfe
......@@ -205,6 +205,9 @@ func getKubemarkMasterComponentsResourceUsage() ResourceUsagePerContainer {
}
func (g *containerResourceGatherer) getKubeSystemContainersResourceUsage(c *client.Client) {
if len(g.workers) == 0 {
return
}
delayPeriod := resourceDataGatheringPeriod / time.Duration(len(g.workers))
delay := time.Duration(0)
for i := range g.workers {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment