Use negation of == in comparison for the overlay name
@@ -44,7 +44,7 @@ while [ -n "${1-}" ]; do
esac
done
-if [ "${DEPLOY_VERSION}" =~ '^(?!noauth).*' ]; then
+if [[ ! "${DEPLOY_VERSION}" == *noauth* ]]; then
ensure_var GCE_PD_SA_DIR
fi
@@ -74,7 +74,7 @@ function check_service_account()
ensure_kustomize
-if [ "$skip_sa_check" != true -a "${DEPLOY_VERSION}" =~ '^(?!noauth).*' ]; then
+if [[ "$skip_sa_check" != true ]] && [[ ! "${DEPLOY_VERSION}" == *noauth* ]]; then
check_service_account
fi
@@ -83,7 +83,7 @@ then
${KUBECTL} create namespace "${NAMESPACE}" -v="${VERBOSITY}"
fi
-if [ "${DEPLOY_VERSION}" =~ '^(?!noauth).*' ]; then
+if [[ ! "${DEPLOY_VERSION}" == *noauth* ]]; then
if ! ${KUBECTL} get secret cloud-sa -v="${VERBOSITY}" -n "${NAMESPACE}";
then
${KUBECTL} create secret generic cloud-sa -v="${VERBOSITY}" --from-file="${GCE_PD_SA_DIR}/cloud-sa.json" -n "${NAMESPACE}"
