mirror of
				https://github.com/coredns/coredns.git
				synced 2025-10-31 02:03:20 -04:00 
			
		
		
		
	* Fix for #2842, instead of returning the first Pod, return the one which is Running * a more memory efficient version of the fix, string -> bool * fix with no extra fields in struct, return nil at Pod conversion if Pod is not Running * let Kuberneretes filter for Running Pods using FieldSelector * filter for Pods that are Running and Pending (implicit)
This commit is contained in:
		
				
					committed by
					
						 Miek Gieben
						Miek Gieben
					
				
			
			
				
	
			
			
			
						parent
						
							4e6c2b41db
						
					
				
				
					commit
					7dde3f3958
				
			| @@ -22,6 +22,10 @@ func podWatchFunc(c kubernetes.Interface, ns string, s labels.Selector) func(opt | ||||
| 		if s != nil { | ||||
| 			options.LabelSelector = s.String() | ||||
| 		} | ||||
| 		if len(options.FieldSelector) > 0 { | ||||
| 			options.FieldSelector = options.FieldSelector + "," | ||||
| 		} | ||||
| 		options.FieldSelector = options.FieldSelector + "status.phase!=Succeeded,status.phase!=Failed,status.phase!=Unknown" | ||||
| 		w, err := c.CoreV1().Pods(ns).Watch(options) | ||||
| 		return w, err | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user