fix(script): removes replacement overrides

This removes the functionality to perform envsubst in the feature
gate script to prevent users with specific env set running into
unexpected error. This feature will be re-visited in the future to
be made more robust.

Signed-off-by: Tin Lam <tin@irrational.io>
Change-Id: I6dcfd4dad138573294a9222e4e7af80c9bff4ac0
This commit is contained in:
Tin Lam 2021-03-19 01:11:30 -05:00
parent 43226de6e3
commit b72f750e87

View File

@ -47,20 +47,12 @@ function combination () {
done
}
function replace_variables() {
for key in $(env); do
local arr=( $(echo $key | awk -F'=' '{ print $1, $2}') )
sed -i "s#%%%REPLACE_${arr[0]}%%%#${arr[1]}#g" $@
done
}
function override_file_args () {
OVERRIDE_ARGS=""
echoerr "We will attempt to use values-override files with the following paths:"
for FILE in $(combination ${1//,/ } | uniq | tac); do
FILE_PATH="${HELM_CHART_ROOT_PATH}/${HELM_CHART}/values_overrides/${FILE}.yaml"
if [ -f "${FILE_PATH}" ]; then
replace_variables ${FILE_PATH}
OVERRIDE_ARGS+=" --values=${FILE_PATH} "
fi
echoerr "${FILE_PATH}"