Fix FakeStatusManager SetPodAllocation

This commit is contained in:
Tim Allclair 2024-10-25 09:51:42 -07:00
parent 7166169c82
commit 40595bd94b

View File

@ -80,10 +80,7 @@ func (m *fakeManager) UpdatePodFromAllocation(pod *v1.Pod) (*v1.Pod, bool) {
func (m *fakeManager) SetPodAllocation(pod *v1.Pod) error {
klog.InfoS("SetPodAllocation()")
for _, container := range pod.Spec.Containers {
var alloc v1.ResourceRequirements
if container.Resources.Requests != nil {
alloc = *container.Resources.DeepCopy()
}
alloc := *container.Resources.DeepCopy()
m.state.SetContainerResourceAllocation(string(pod.UID), container.Name, alloc)
}
return nil