@@ -172,8 +172,6 @@ while [ -n "${1:-}" ]; do case $1 in
172172 continue ;;
173173
174174 --enable-coverage)
175- helm_arguments+=(" --set" )
176- helm_arguments+=(" developer.enableCoverage=true" )
177175 enable_coverage=1
178176 shift
179177 continue ;;
@@ -192,7 +190,6 @@ while [ -n "${1:-}" ]; do case $1 in
192190 mount_containerd=1
193191 offline_mode=1
194192 helm_arguments+=(" --set" " global.imagePullPolicy=IfNotPresent" )
195- helm_arguments+=(" --set" " developer.offline=true" )
196193 shift
197194 continue ;;
198195
@@ -490,9 +487,6 @@ if ! check_hostname "${machine_hostname}"; then
490487 fi
491488 printf " %b Using IP address %s instead \n" ${INFO_EMOJI} " ${machine_hostname} "
492489fi
493- if [ " ${machine_ip} " ]; then
494- helm_arguments+=(" --set" " developer.ipAlias=${machine_ip} " )
495- fi
496490
497491# Generate the Helm values file
498492printf " %b Generating Helm templates\n" ${UNICORN_EMOJI}
@@ -620,13 +614,26 @@ done
620614fi ;
621615
622616# Set the chart path to use (default to the diracx chart in this repository)
617+ helm_arg_prefix=" "
623618if [[ -z " ${chart_path} " ]]; then
624619 chart_path=" ${script_dir} /diracx"
625620else
626621 printf " %b Auto-indenting generated values into diracx section\n" ${UNICORN_EMOJI}
627622 # We need to indent all the file under a new "diracx" top section
628623 # shellcheck disable=SC2016
629624 " ${demo_dir} /yq" eval -i ' . as $item ireduce ({}; .diracx += $item )' " ${demo_dir} /values.yaml"
625+ helm_arg_prefix=" diracx."
626+ fi
627+
628+ # Set the helm arguments which might need to be prefixed
629+ if [ " ${machine_ip} " ]; then
630+ helm_arguments+=(" --set" " ${helm_arg_prefix} developer.ipAlias=${machine_ip} " )
631+ fi
632+ if [ ${offline_mode} -eq 1 ]; then
633+ helm_arguments+=(" --set" " ${helm_arg_prefix} developer.offline=true" )
634+ fi
635+ if [ ${collect_coverage} -eq 1 ]; then
636+ helm_arguments+=(" --set" " ${helm_arg_prefix} developer.enableCoverage=true" )
630637fi
631638
632639if ! " ${demo_dir} /helm" install --debug diracx-demo " ${chart_path} " " ${helm_arguments[@]} " ; then
0 commit comments