Skip to content

Commit

Permalink
fix: check for required values for install-chart.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
awfabian-rs committed Nov 21, 2024
1 parent 8779dcc commit 4cdf16f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/install-chart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,22 @@ do
declare "$var_name=${chart_values[i+1]}"
done

required_vars=("NAMESPACE" "NAME" "REPONAME" "RELEASENAME" "URL")
for var in "${required_vars[@]}"; do
if [[ -z "${!var}" ]]; then
echo "ERROR: Required variable $var is missing in the YAML file."
exit 1
fi
done

# Though it probably wouldn't make any difference for all of the
# $GENESTACK_CONFIG_DIR files to come last, this takes care to fully preserve
# the order
echo "Including overrides in order:"
if [[ "$VALUESFILES" == "" ]]
then
echo "WARNING: no values files specified. Check valuesFiles in the YAML file for $CHART"
fi
values_args=()
set -o noglob # Prevent glob expansions in $VALUESFILES
for BASE_FILENAME in $VALUESFILES
Expand Down

0 comments on commit 4cdf16f

Please sign in to comment.