mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	StatefulSet should not launch Pod i, if a Pod in the sequence [0,i) has its
DeletionTimestamp set. Fixes 44229. Rename isTerminated to isTerminating Adds a test case for at the unit level to prevent regression
This commit is contained in:
		@@ -217,14 +217,14 @@ func isFailed(pod *v1.Pod) bool {
 | 
			
		||||
	return pod.Status.Phase == v1.PodFailed
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// isTerminated returns true if pod's deletion Timestamp has been set
 | 
			
		||||
func isTerminated(pod *v1.Pod) bool {
 | 
			
		||||
// isTerminating returns true if pod's DeletionTimestamp has been set
 | 
			
		||||
func isTerminating(pod *v1.Pod) bool {
 | 
			
		||||
	return pod.DeletionTimestamp != nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// isHealthy returns true if pod is running and ready and has not been terminated
 | 
			
		||||
func isHealthy(pod *v1.Pod) bool {
 | 
			
		||||
	return isRunningAndReady(pod) && !isTerminated(pod)
 | 
			
		||||
	return isRunningAndReady(pod) && !isTerminating(pod)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// newControllerRef returns an ControllerRef pointing to a given StatefulSet.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user