mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Merge pull request #83755 from roycaihw/e2e-kubelet-resource-monitor
kubelet e2e: run resource monitor only if the actual number of nodes is small
This commit is contained in:
commit
f985367ba4
@ -284,8 +284,14 @@ var _ = SIGDescribe("kubelet", func() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// While we only use a bounded number of nodes in the test. We need to know
|
||||||
|
// the actual number of nodes in the cluster, to avoid running resourceMonitor
|
||||||
|
// against large clusters.
|
||||||
|
actualNodes, err := e2enode.GetReadySchedulableNodes(c)
|
||||||
|
framework.ExpectNoError(err)
|
||||||
|
|
||||||
// Start resourceMonitor only in small clusters.
|
// Start resourceMonitor only in small clusters.
|
||||||
if numNodes <= maxNodesToCheck {
|
if len(actualNodes.Items) <= maxNodesToCheck {
|
||||||
resourceMonitor = e2ekubelet.NewResourceMonitor(f.ClientSet, e2ekubelet.TargetContainers(), containerStatsPollingInterval)
|
resourceMonitor = e2ekubelet.NewResourceMonitor(f.ClientSet, e2ekubelet.TargetContainers(), containerStatsPollingInterval)
|
||||||
resourceMonitor.Start()
|
resourceMonitor.Start()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user