Remove EXIT_ON_WEAK_ERROR variable
This commit is contained in:
@@ -25,7 +25,6 @@ set -o nounset
|
||||
set -o pipefail
|
||||
|
||||
KUBE_ROOT=$(dirname "${BASH_SOURCE}")/..
|
||||
EXIT_ON_WEAK_ERROR="${EXIT_ON_WEAK_ERROR:-false}"
|
||||
|
||||
if [ -f "${KUBE_ROOT}/cluster/env.sh" ]; then
|
||||
source "${KUBE_ROOT}/cluster/env.sh"
|
||||
@@ -58,15 +57,11 @@ echo "... calling validate-cluster" >&2
|
||||
# We have two different failure modes from validate cluster:
|
||||
# - 1: fatal error - cluster won't be working correctly
|
||||
# - 2: weak error - something went wrong, but cluster probably will be working correctly
|
||||
# We always exit in case 1), but if EXIT_ON_WEAK_ERROR != true, then we don't fail on 2).
|
||||
# We just print an error message in case 2).
|
||||
if [[ "${validate_result}" == "1" ]]; then
|
||||
exit 1
|
||||
elif [[ "${validate_result}" == "2" ]]; then
|
||||
if [[ "${EXIT_ON_WEAK_ERROR}" == "true" ]]; then
|
||||
exit 1;
|
||||
else
|
||||
echo "...ignoring non-fatal errors in validate-cluster" >&2
|
||||
fi
|
||||
echo "...ignoring non-fatal errors in validate-cluster" >&2
|
||||
fi
|
||||
|
||||
echo -e "Done, listing cluster services:\n" >&2
|
||||
|
Reference in New Issue
Block a user