mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
node e2e test: exclude critical pods from swapping
Signed-off-by: Itamar Holder <iholder@redhat.com>
This commit is contained in:
parent
6c1f14c468
commit
a6df16af85
@ -84,6 +84,19 @@ var _ = SIGDescribe("Swap", "[LinuxOnly]", nodefeature.Swap, framework.WithSeria
|
||||
ginkgo.Entry("QOS Burstable with memory request equals to limit", v1.PodQOSBurstable, true),
|
||||
ginkgo.Entry("QOS Guaranteed", v1.PodQOSGuaranteed, false),
|
||||
)
|
||||
|
||||
ginkgo.It("with a critical pod - should avoid swap", func() {
|
||||
ginkgo.By("Creating a critical pod")
|
||||
const memoryRequestEqualLimit = false
|
||||
pod := getSwapTestPod(f, v1.PodQOSBurstable, memoryRequestEqualLimit)
|
||||
pod.Spec.PriorityClassName = "system-node-critical"
|
||||
|
||||
pod = runPodAndWaitUntilScheduled(f, pod)
|
||||
gomega.Expect(types.IsCriticalPod(pod)).To(gomega.BeTrueBecause("pod should be critical"))
|
||||
|
||||
ginkgo.By("expecting pod to not have swap access")
|
||||
expectNoSwap(f, pod)
|
||||
})
|
||||
})
|
||||
|
||||
f.Context(framework.WithSerial(), func() {
|
||||
|
Loading…
Reference in New Issue
Block a user