mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-31 23:37:01 +00:00
Add resize e2e tests around min CPU shares
This commit is contained in:
parent
5a3a40cd19
commit
bab6df857c
@ -566,6 +566,24 @@ func doPodResizeTests(f *framework.Framework) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Burstable QoS pod, one container with cpu requests - resize with equivalent request",
|
||||||
|
containers: []e2epod.ResizableContainerInfo{
|
||||||
|
{
|
||||||
|
Name: "c1",
|
||||||
|
Resources: &e2epod.ContainerResources{CPUReq: "2m"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
patchString: `{"spec":{"containers":[
|
||||||
|
{"name":"c1", "resources":{"requests":{"cpu":"1m"}}}
|
||||||
|
]}}`,
|
||||||
|
expected: []e2epod.ResizableContainerInfo{
|
||||||
|
{
|
||||||
|
Name: "c1",
|
||||||
|
Resources: &e2epod.ContainerResources{CPUReq: "1m"},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "Guaranteed QoS pod, one container - increase CPU (NotRequired) & memory (RestartContainer)",
|
name: "Guaranteed QoS pod, one container - increase CPU (NotRequired) & memory (RestartContainer)",
|
||||||
testRollback: true,
|
testRollback: true,
|
||||||
@ -783,6 +801,22 @@ func doPodResizeTests(f *framework.Framework) {
|
|||||||
},
|
},
|
||||||
addExtendedResource: true,
|
addExtendedResource: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "BestEffort QoS pod - empty resize",
|
||||||
|
containers: []e2epod.ResizableContainerInfo{
|
||||||
|
{
|
||||||
|
Name: "c1",
|
||||||
|
Resources: &e2epod.ContainerResources{},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
patchString: `{}`,
|
||||||
|
expected: []e2epod.ResizableContainerInfo{
|
||||||
|
{
|
||||||
|
Name: "c1",
|
||||||
|
Resources: &e2epod.ContainerResources{},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for idx := range tests {
|
for idx := range tests {
|
||||||
|
Loading…
Reference in New Issue
Block a user