Skip to content

Commit

Permalink
Only set INGRESS_HOST if it's not set yet
Browse files Browse the repository at this point in the history
  • Loading branch information
Arief Rahmansyah committed Sep 7, 2023
1 parent fff749d commit 240463f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/e2e/setup-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ install_istio() {

set_ingress_host() {
echo "::group::Set Ingress Host"
export INGRESS_HOST="$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}').nip.io"
if [[ -z "${INGRESS_HOST}" ]]; then
export INGRESS_HOST="$(kubectl -n istio-system get service istio-ingressgateway -o jsonpath='{.status.loadBalancer.ingress[0].ip}').nip.io"
fi
echo "INGRESS_HOST=${INGRESS_HOST}"
echo "::endgroup::"
}
Expand Down

0 comments on commit 240463f

Please sign in to comment.