Merge pull request #127207 from SergeyKanzhelev/automated-cherry-pick-of-#126343-upstream-release-1.31
Automated cherry pick of #126343: Terminated pod should not be re-admitted
This commit is contained in:
@@ -2567,7 +2567,8 @@ func (kl *Kubelet) HandlePodAdditions(pods []*v1.Pod) {
|
||||
// shutting it down. If the pod hasn't started yet, we know that when
|
||||
// the pod worker is invoked it will also avoid setting up the pod, so
|
||||
// we simply avoid doing any work.
|
||||
if !kl.podWorkers.IsPodTerminationRequested(pod.UID) {
|
||||
// We also do not try to admit the pod that is already in terminated state.
|
||||
if !kl.podWorkers.IsPodTerminationRequested(pod.UID) && !podutil.IsPodPhaseTerminal(pod.Status.Phase) {
|
||||
// We failed pods that we rejected, so activePods include all admitted
|
||||
// pods that are alive.
|
||||
activePods := kl.filterOutInactivePods(existingPods)
|
||||
|
||||
Reference in New Issue
Block a user