mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #36828 from mtaufen/eviction-test-thresholds
Automatic merge from submit-queue (batch tested with PRs 42216, 42136, 42183, 42149, 36828) Set custom threshold for memory eviction test I am hoping this helps with memory eviction flakes, e.g. https://github.com/kubernetes/kubernetes/issues/32433 and https://github.com/kubernetes/kubernetes/issues/31676 /cc @derekwaynecarr @calebamiles @dchen1107
This commit is contained in:
commit
cda109d224
@ -25,6 +25,7 @@ import (
|
||||
"k8s.io/apimachinery/pkg/api/resource"
|
||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
"k8s.io/kubernetes/pkg/api/v1"
|
||||
"k8s.io/kubernetes/pkg/apis/componentconfig"
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
|
||||
. "github.com/onsi/ginkgo"
|
||||
@ -35,16 +36,26 @@ import (
|
||||
// https://github.com/kubernetes/kubernetes/blob/master/docs/proposals/kubelet-eviction.md
|
||||
|
||||
var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial] [Disruptive]", func() {
|
||||
const (
|
||||
evictionHard = "memory.available<40%"
|
||||
)
|
||||
|
||||
f := framework.NewDefaultFramework("eviction-test")
|
||||
|
||||
// This is a dummy context to wrap the outer AfterEach, which will run after the inner AfterEach.
|
||||
// We want to list all of the node and pod events, including any that occur while waiting for
|
||||
// memory pressure reduction, even if we time out while waiting.
|
||||
Context("", func() {
|
||||
|
||||
AfterEach(func() {
|
||||
// Print events
|
||||
logNodeEvents(f)
|
||||
logPodEvents(f)
|
||||
})
|
||||
Context("", func() {
|
||||
tempSetCurrentKubeletConfig(f, func(c *componentconfig.KubeletConfiguration) {
|
||||
c.EvictionHard = evictionHard
|
||||
})
|
||||
|
||||
Context("when there is memory pressure", func() {
|
||||
AfterEach(func() {
|
||||
@ -217,6 +228,7 @@ var _ = framework.KubeDescribe("MemoryEviction [Slow] [Serial] [Disruptive]", fu
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user