Commit 9990f843 authored by Wojciech Tyczynski's avatar Wojciech Tyczynski

Merge pull request #25740 from gmarek/gatherer

Prevent division by 0 error in resource-gatherer
parents 1738bbfe 0848ad22
......@@ -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