Skip to content

Commit 15ab033

Browse files
committed
fix(scripts): set YATAI_ENDPOINT to empty string
1 parent d8e75cd commit 15ab033

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

scripts/quick-install-yatai-image-builder.sh

+12-7
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,19 @@ if ! command -v helm >/dev/null 2>&1; then
6262
exit 1
6363
fi
6464

65-
echo "🧪 verifying that the yatai is running"
66-
if ! kubectl -n yatai-system wait --for=condition=ready --timeout=10s pod -l app.kubernetes.io/name=yatai; then
67-
echo "😱 yatai is not ready, please wait for it to be ready!" >&2
68-
exit 1
65+
YATAI_ENDPOINT=${YATAI_ENDPOINT:-http://yatai.yatai-system.svc.cluster.local}
66+
if [ "${YATAI_ENDPOINT}" = "empty" ]; then
67+
YATAI_ENDPOINT=""
68+
fi
69+
70+
if [ "${YATAI_ENDPOINT}" = "http://yatai.yatai-system.svc.cluster.local" ]; then
71+
echo "🧪 verifying that the yatai is running"
72+
if ! kubectl -n yatai-system wait --for=condition=ready --timeout=10s pod -l app.kubernetes.io/name=yatai; then
73+
echo "😱 yatai is not ready, please wait for it to be ready!" >&2
74+
exit 1
75+
fi
76+
echo "✅ yatai is ready"
6977
fi
70-
echo "✅ yatai is ready"
7178

7279
namespace=yatai-image-builder
7380

@@ -213,8 +220,6 @@ helm repo remove ${helm_repo_name} 2> /dev/null || true
213220
helm repo add ${helm_repo_name} ${helm_repo_url}
214221
helm repo update ${helm_repo_name}
215222

216-
YATAI_ENDPOINT=${YATAI_ENDPOINT:-http://yatai.yatai-system.svc.cluster.local}
217-
218223
# if $VERSION is not set, use the latest version
219224
if [ -z "$VERSION" ]; then
220225
VERSION=$(helm search repo ${helm_repo_name} --devel="$DEVEL" -l | grep "${helm_repo_name}/yatai-image-builder " | awk '{print $2}' | head -n 1)

0 commit comments

Comments
 (0)