mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-07-18 04:54:54 +00:00
deflake e2e tests: set cpu requests to avoid out of cpu
Pod Level Resources Downward API has two test cases. In each test, a Pod is created with only CPU limits of 1250m specified. Since CPU limits are set, the CPU requests also default to 1250m. With a Node capacity of 2000m, two 1250m Pods cannot be scheduled, which appears to cause the OutOfCpu error.
This commit is contained in:
@@ -458,6 +458,10 @@ var _ = SIGDescribe("Downward API", feature.PodLevelResources, framework.WithFea
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
Resources: &v1.ResourceRequirements{
|
||||
Requests: v1.ResourceList{
|
||||
v1.ResourceCPU: resource.MustParse("250m"),
|
||||
v1.ResourceMemory: resource.MustParse("32Mi"),
|
||||
},
|
||||
Limits: v1.ResourceList{
|
||||
v1.ResourceCPU: resource.MustParse("1250m"),
|
||||
v1.ResourceMemory: resource.MustParse("64Mi"),
|
||||
@@ -506,6 +510,10 @@ var _ = SIGDescribe("Downward API", feature.PodLevelResources, framework.WithFea
|
||||
},
|
||||
Spec: v1.PodSpec{
|
||||
Resources: &v1.ResourceRequirements{
|
||||
Requests: v1.ResourceList{
|
||||
v1.ResourceCPU: resource.MustParse("250m"),
|
||||
v1.ResourceMemory: resource.MustParse("32Mi"),
|
||||
},
|
||||
Limits: v1.ResourceList{
|
||||
v1.ResourceCPU: resource.MustParse("1250m"),
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user