mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-19 09:52:49 +00:00
Fix up after rebasing on top of dedup pod resource req calculation PR
This commit is contained in:
parent
565fd4116d
commit
d011cc4d87
@ -153,7 +153,7 @@ name | architectures
|
|||||||
- PodSpec.Container.Resources becomes mutable for CPU and memory resource types.
|
- PodSpec.Container.Resources becomes mutable for CPU and memory resource types.
|
||||||
- PodSpec.Container.ResizePolicy (new object) gives users control over how their containers are resized.
|
- PodSpec.Container.ResizePolicy (new object) gives users control over how their containers are resized.
|
||||||
- PodStatus.Resize status describes the state of a requested Pod resize.
|
- PodStatus.Resize status describes the state of a requested Pod resize.
|
||||||
- PodStatus.ResourcesAllocated describes node resources allocated to Pod.
|
- PodStatus.AllocatedResources describes node resources allocated to Pod.
|
||||||
- PodStatus.Resources describes node resources applied to running containers by CRI.
|
- PodStatus.Resources describes node resources applied to running containers by CRI.
|
||||||
- UpdateContainerResources CRI API now supports both Linux and Windows.
|
- UpdateContainerResources CRI API now supports both Linux and Windows.
|
||||||
|
|
||||||
@ -640,4 +640,4 @@ name | architectures
|
|||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
- github.com/elazarl/goproxy: [947c36d](https://github.com/elazarl/goproxy/tree/947c36d)
|
- github.com/elazarl/goproxy: [947c36d](https://github.com/elazarl/goproxy/tree/947c36d)
|
||||||
- github.com/mindprince/gonvml: [9ebdce4](https://github.com/mindprince/gonvml/tree/9ebdce4)
|
- github.com/mindprince/gonvml: [9ebdce4](https://github.com/mindprince/gonvml/tree/9ebdce4)
|
||||||
|
@ -65,9 +65,9 @@ func PodRequests(pod *v1.Pod, opts PodResourcesOptions) v1.ResourceList {
|
|||||||
cs, found := containerStatuses[container.Name]
|
cs, found := containerStatuses[container.Name]
|
||||||
if found {
|
if found {
|
||||||
if pod.Status.Resize == v1.PodResizeStatusInfeasible {
|
if pod.Status.Resize == v1.PodResizeStatusInfeasible {
|
||||||
containerReqs = cs.ResourcesAllocated
|
containerReqs = cs.AllocatedResources
|
||||||
} else {
|
} else {
|
||||||
containerReqs = max(container.Resources.Requests, cs.ResourcesAllocated)
|
containerReqs = max(container.Resources.Requests, cs.AllocatedResources)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -737,7 +737,7 @@ func TestPodResourceRequests(t *testing.T) {
|
|||||||
containerStatus: []v1.ContainerStatus{
|
containerStatus: []v1.ContainerStatus{
|
||||||
{
|
{
|
||||||
Name: "container-1",
|
Name: "container-1",
|
||||||
ResourcesAllocated: v1.ResourceList{
|
AllocatedResources: v1.ResourceList{
|
||||||
v1.ResourceCPU: resource.MustParse("2"),
|
v1.ResourceCPU: resource.MustParse("2"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -762,7 +762,7 @@ func TestPodResourceRequests(t *testing.T) {
|
|||||||
containerStatus: []v1.ContainerStatus{
|
containerStatus: []v1.ContainerStatus{
|
||||||
{
|
{
|
||||||
Name: "container-1",
|
Name: "container-1",
|
||||||
ResourcesAllocated: v1.ResourceList{
|
AllocatedResources: v1.ResourceList{
|
||||||
v1.ResourceCPU: resource.MustParse("2"),
|
v1.ResourceCPU: resource.MustParse("2"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -788,7 +788,7 @@ func TestPodResourceRequests(t *testing.T) {
|
|||||||
containerStatus: []v1.ContainerStatus{
|
containerStatus: []v1.ContainerStatus{
|
||||||
{
|
{
|
||||||
Name: "container-1",
|
Name: "container-1",
|
||||||
ResourcesAllocated: v1.ResourceList{
|
AllocatedResources: v1.ResourceList{
|
||||||
v1.ResourceCPU: resource.MustParse("2"),
|
v1.ResourceCPU: resource.MustParse("2"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user