Skip to content

Commit c9a5b6e

Browse files
authored
Merge pull request kubernetes#125847 from knabben/increase-win-limit
Increasing limit margin to 8% on pod cpu limit test
2 parents f00eee5 + e5de3c3 commit c9a5b6e

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/e2e/windows/cpu_limits.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ var _ = sigDescribe(feature.Windows, "Cpu Resources", framework.WithSerial(), sk
7373
gomega.Expect(pod.Status.Phase).To(gomega.Equal(v1.PodRunning))
7474
allPods = append(allPods, pod)
7575
}
76-
ginkgo.By("Ensuring cpu doesn't exceed limit by >5%")
76+
ginkgo.By("Ensuring cpu doesn't exceed limit by >8%")
7777
for _, p := range allPods {
7878
ginkgo.By("Gathering node summary stats")
7979
nodeStats, err := e2ekubelet.GetStatsSummary(ctx, f.ClientSet, p.Spec.NodeName)
@@ -95,8 +95,11 @@ var _ = sigDescribe(feature.Windows, "Cpu Resources", framework.WithSerial(), sk
9595
if cpuUsage <= 0 {
9696
framework.Failf("Pod %s/%s reported usage is %v, but it should be greater than 0", p.Namespace, p.Name, cpuUsage)
9797
}
98-
if cpuUsage >= .5*1.05 {
99-
framework.Failf("Pod %s/%s reported usage is %v, but it should not exceed limit by > 5%%", p.Namespace, p.Name, cpuUsage)
98+
// Jobs can potentially exceed the limit for a variety of reasons on Windows.
99+
// Softening the limit margin to 8% and allow a occasional overload.
100+
// https://github.com/kubernetes/kubernetes/issues/124643
101+
if cpuUsage >= .8*1.05 {
102+
framework.Failf("Pod %s/%s reported usage is %v, but it should not exceed limit by > 8%%", p.Namespace, p.Name, cpuUsage)
100103
}
101104
}
102105
})

0 commit comments

Comments
 (0)