diff --git a/deploy/util/deploy-hostpath.sh b/deploy/util/deploy-hostpath.sh index 7dfb37ae0..22a040d05 100755 --- a/deploy/util/deploy-hostpath.sh +++ b/deploy/util/deploy-hostpath.sh @@ -247,15 +247,18 @@ for i in $(ls ${BASE_DIR}/hostpath/*.yaml | sort); do line="$(echo "$nocomments" | sed -e "s;$image;${prefix}${name}${suffix};")" fi echo " using $line" >&2 - if volume_mode_conversion; then - echo "Enabling volume mode conversion feature flag" - line="$(echo "$line" | sed -e "s;--prevent-volume-mode-conversion=false;--prevent-volume-mode-conversion=true;")" - fi fi echo "$line" done)" echo RAUNAK-222 echo "$modified" + if volume_mode_conversion; then + echo "Enabling volume mode conversion feature flag" + + modified="${modified//--prevent-volume-mode-conversion=false/--prevent-volume-mode-conversion=true}" + fi + echo RAUNAK-333 + echo "$modified" if ! echo "$modified" | kubectl apply -f -; then echo "modified version of $i:" echo "$modified"