Commit 98eae9b2 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #42341 from dashpole/critial_pod_test

Automatic merge from submit-queue Critial pod test uses allocatable instead of capacity This solves #42239. When this test was first introduced, pods could request up to the capacity of the node. With the addition of allocatable introduced in #41234, this is no longer the case, and pods can only use up to allocatable. This should be included in 1.6, as it is a bug related to a 1.6 feature. cc @vish @yujuhong
parents a2c7eb27 5fa65155
...@@ -111,7 +111,7 @@ func getNodeCPUAndMemoryCapacity(f *framework.Framework) v1.ResourceList { ...@@ -111,7 +111,7 @@ func getNodeCPUAndMemoryCapacity(f *framework.Framework) v1.ResourceList {
framework.ExpectNoError(err) framework.ExpectNoError(err)
// Assuming that there is only one node, because this is a node e2e test. // Assuming that there is only one node, because this is a node e2e test.
Expect(len(nodeList.Items)).To(Equal(1)) Expect(len(nodeList.Items)).To(Equal(1))
capacity := nodeList.Items[0].Status.Capacity capacity := nodeList.Items[0].Status.Allocatable
return v1.ResourceList{ return v1.ResourceList{
v1.ResourceCPU: capacity[v1.ResourceCPU], v1.ResourceCPU: capacity[v1.ResourceCPU],
v1.ResourceMemory: capacity[v1.ResourceMemory], v1.ResourceMemory: capacity[v1.ResourceMemory],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment