diff --git a/pkg/kubelet/allocation/allocation_manager.go b/pkg/kubelet/allocation/allocation_manager.go index 7a977b7d4d9..c56816ca7b5 100644 --- a/pkg/kubelet/allocation/allocation_manager.go +++ b/pkg/kubelet/allocation/allocation_manager.go @@ -243,7 +243,7 @@ func (m *manager) AddPod(activePods []*v1.Pod, pod *v1.Pod) (bool, string, strin allocatedPods := m.getAllocatedPods(activePods) ok, reason, message := m.canAdmitPod(allocatedPods, pod) - if utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) { + if ok && utilfeature.DefaultFeatureGate.Enabled(features.InPlacePodVerticalScaling) { // Checkpoint the resource values at which the Pod has been admitted or resized. if err := m.SetAllocatedResources(pod); err != nil { // TODO(vinaykul,InPlacePodVerticalScaling): Can we recover from this in some way? Investigate