Commit 88f987e7 authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #29973 from ZTE-PaaS/zhangke-patch-016

Automatic merge from submit-queue optimize podKiller for reading channel Reading kl.podKillingCh should check whether ok first, then to process data
parents 5230bb7a 5d19daa2
......@@ -1934,11 +1934,13 @@ func (kl *Kubelet) podKiller() {
for {
select {
case podPair, ok := <-kl.podKillingCh:
runningPod := podPair.RunningPod
apiPod := podPair.APIPod
if !ok {
return
}
runningPod := podPair.RunningPod
apiPod := podPair.APIPod
if killing.Has(string(runningPod.ID)) {
// The pod is already being killed.
break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment