mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-03 19:58:17 +00:00 
			
		
		
		
	Merge pull request #21860 from gmarek/kube-up
Auto commit by PR queue bot
This commit is contained in:
		@@ -53,19 +53,20 @@ echo "... calling kube-up" >&2
 | 
				
			|||||||
kube-up
 | 
					kube-up
 | 
				
			||||||
 | 
					
 | 
				
			||||||
echo "... calling validate-cluster" >&2
 | 
					echo "... calling validate-cluster" >&2
 | 
				
			||||||
if [[ "${EXIT_ON_WEAK_ERROR}" == "true" ]]; then
 | 
					# Override errexit
 | 
				
			||||||
	validate-cluster
 | 
					(validate-cluster) && validate_result="$?" || validate_result="$?"
 | 
				
			||||||
else
 | 
					
 | 
				
			||||||
	validate-cluster
 | 
					# We have two different failure modes from validate cluster:
 | 
				
			||||||
	validate_result="$?"
 | 
					# - 1: fatal error - cluster won't be working correctly
 | 
				
			||||||
	if [[ ${validate_result} != "0" ]]; then
 | 
					# - 2: weak error - something went wrong, but cluster probably will be working correctly
 | 
				
			||||||
		if [[ "${validate_result}" == "1" ]]; then
 | 
					# We always exit in case 1), but if EXIT_ON_WEAK_ERROR != true, then we don't fail on 2).
 | 
				
			||||||
			exit 1
 | 
					if [[ "${validate_result}" == "1" ]]; then
 | 
				
			||||||
		elif [[ "${validate_result}" == "2" ]]; then
 | 
						exit 1
 | 
				
			||||||
			echo "...ignoring non-fatal errors in validate-cluster" >&2
 | 
					elif [[ "${validate_result}" == "2" ]]; then
 | 
				
			||||||
		else
 | 
						if [[ "${EXIT_ON_WEAK_ERROR}" == "true" ]]; then
 | 
				
			||||||
			echo "Got unknown validate result: ${validate_result}"
 | 
							exit 1;
 | 
				
			||||||
		fi
 | 
						else
 | 
				
			||||||
 | 
							echo "...ignoring non-fatal errors in validate-cluster" >&2
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user