mirror of https://github.com/openkruise/kruise.git
				
				
				
			fix rolling update stuck caused by deleting terminating pod (#657)
Signed-off-by: 墨封 <mofeng.cj@alibaba-inc.com>
This commit is contained in:
		
							parent
							
								
									766e68dcc3
								
							
						
					
					
						commit
						dee6b813f4
					
				| 
						 | 
				
			
			@ -170,6 +170,12 @@ func (dsc *ReconcileDaemonSet) standardRollingUpdate(ds *appsv1alpha1.DaemonSet,
 | 
			
		|||
			dsc.eventRecorder.Eventf(ds, corev1.EventTypeWarning, "numUnavailable >= maxUnavailable", "%s/%s number of unavailable DaemonSet pods: %d, is equal to or exceeds allowed maximum: %d", ds.Namespace, ds.Name, numUnavailable, maxUnavailable)
 | 
			
		||||
			break
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		// Skip deleting if there are some pods stuck at terminating but still report as available.
 | 
			
		||||
		if pod.DeletionTimestamp != nil {
 | 
			
		||||
			continue
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		klog.V(6).Infof("Marking pod %s/%s for deletion", ds.Name, pod.Name)
 | 
			
		||||
		oldPodsToDelete = append(oldPodsToDelete, pod.Name)
 | 
			
		||||
		numUnavailable++
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue