Merge pull request #125847 from knabben/increase-win-limit

Increasing limit margin to 8% on pod cpu limit test
This commit is contained in:
Kubernetes Prow Robot 2024-07-02 21:20:44 -07:00 committed by GitHub
commit c9a5b6ea6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,7 @@ var _ = sigDescribe(feature.Windows, "Cpu Resources", framework.WithSerial(), sk
gomega.Expect(pod.Status.Phase).To(gomega.Equal(v1.PodRunning))
allPods = append(allPods, pod)
}
ginkgo.By("Ensuring cpu doesn't exceed limit by >5%")
ginkgo.By("Ensuring cpu doesn't exceed limit by >8%")
for _, p := range allPods {
ginkgo.By("Gathering node summary stats")
nodeStats, err := e2ekubelet.GetStatsSummary(ctx, f.ClientSet, p.Spec.NodeName)
@ -95,8 +95,11 @@ var _ = sigDescribe(feature.Windows, "Cpu Resources", framework.WithSerial(), sk
if cpuUsage <= 0 {
framework.Failf("Pod %s/%s reported usage is %v, but it should be greater than 0", p.Namespace, p.Name, cpuUsage)
}
if cpuUsage >= .5*1.05 {
framework.Failf("Pod %s/%s reported usage is %v, but it should not exceed limit by > 5%%", p.Namespace, p.Name, cpuUsage)
// Jobs can potentially exceed the limit for a variety of reasons on Windows.
// Softening the limit margin to 8% and allow a occasional overload.
// https://github.com/kubernetes/kubernetes/issues/124643
if cpuUsage >= .8*1.05 {
framework.Failf("Pod %s/%s reported usage is %v, but it should not exceed limit by > 8%%", p.Namespace, p.Name, cpuUsage)
}
}
})