mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-08 03:33:56 +00:00
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
This commit is contained in:
commit
88f987e7e2
@ -1934,11 +1934,13 @@ func (kl *Kubelet) podKiller() {
|
|||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case podPair, ok := <-kl.podKillingCh:
|
case podPair, ok := <-kl.podKillingCh:
|
||||||
runningPod := podPair.RunningPod
|
|
||||||
apiPod := podPair.APIPod
|
|
||||||
if !ok {
|
if !ok {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
runningPod := podPair.RunningPod
|
||||||
|
apiPod := podPair.APIPod
|
||||||
|
|
||||||
if killing.Has(string(runningPod.ID)) {
|
if killing.Has(string(runningPod.ID)) {
|
||||||
// The pod is already being killed.
|
// The pod is already being killed.
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user