Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions helm-preflights/preflights.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ OPTIONS:
--reuse
Use existing templates if preflights have been played before

--save-local-preflights-output
Save the local preflights output in the current directory

--nosave
Do not save results in-cluster (not recommended)

Expand Down Expand Up @@ -190,6 +193,7 @@ REMOTE_CHECKS="yes"
VALUES_FILES=""
FORCE="yes"
SAVE="yes"
SAVE_LOCAL_PREFLIGHTS_OUTPUT="no"
DEBUG_MODE="no"
INSTALL_JQ="no"
INSTALL_HELM="no"
Expand Down Expand Up @@ -225,6 +229,10 @@ while (("$#")); do
FORCE="no"
shift
;;
--save-local-preflights-output)
SAVE_LOCAL_PREFLIGHTS_OUTPUT="yes"
shift
;;
--install-jq)
INSTALL_JQ="yes"
shift
Expand Down Expand Up @@ -387,11 +395,15 @@ then
LOCAL_CHECKS_STATUS="error"
exit_ko
fi
if [[ "$SAVE_LOCAL_PREFLIGHTS_OUTPUT" == "no" ]];
then
rm -f $script_dir/preflightbundle-*.tar.gz
fi
fi

if [[ "$REMOTE_CHECKS" == "yes" ]];
then
if ! run_hide_output "jq --version" "all";
if ! jq --version &>/dev/null;
then
if [[ "$INSTALL_JQ" == "no" ]];
then
Expand Down Expand Up @@ -456,7 +468,7 @@ then
done

# Print preflights output
output=`kubectl logs $NAMESPACE $pod`
output=`kubectl logs $NAMESPACE $pod -c remote-preflight`
echo -e "$output"
GLOBAL_OUTPUT+="
--- RUNNING REMOTE TESTS$output"
Expand Down