mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-10-31 06:24:02 +00:00 
			
		
		
		
	Fix: correct k8s job status check
This commit is contained in:
		
							parent
							
								
									eccd96a775
								
							
						
					
					
						commit
						5d531b11e7
					
				| @ -48,8 +48,8 @@ export default async function handler(req, res) { | ||||
|       logger.error(`no pods found with namespace=${namespace} and labelSelector=${labelSelector}`); | ||||
|       return; | ||||
|     } | ||||
|     const someReady = pods.find((pod) => ["Completed", "Running"].includes(pod.status.phase)); | ||||
|     const allReady = pods.every((pod) => ["Completed", "Running"].includes(pod.status.phase)); | ||||
|     const someReady = pods.find((pod) => ["Succeeded", "Running"].includes(pod.status.phase)); | ||||
|     const allReady = pods.every((pod) => ["Succeeded", "Running"].includes(pod.status.phase)); | ||||
|     let status = "down"; | ||||
|     if (allReady) { | ||||
|       status = "running"; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 shamoon
						shamoon