Skip to content

Commit f449c90

Browse files
committed
fix(ingress): accept DOMAINS with TARGET_ENDPOINT and no DOMAIN
The single-backend layout serves every domain once haproxy-lib picks it whenever TARGET_ENDPOINT is set (#140), so only require one of TARGET_ENDPOINT or ROUTING_MAP. Signed-off-by: Kevin Wang <wy721@qq.com>
1 parent 7d7f079 commit f449c90

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎custom-domain/dstack-ingress/scripts/entrypoint.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ if ! TARGET_ENDPOINT=$(sanitize_target_endpoint "$TARGET_ENDPOINT"); then
8383
fi
8484
# Without one of these haproxy has no default backend and closes every
8585
# connection that is not for the evidence server.
86-
if [ -z "${ROUTING_MAP:-}" ] && { [ -z "$DOMAIN" ] || [ -z "$TARGET_ENDPOINT" ]; }; then
87-
echo "Error: nothing to route to; set DOMAIN and TARGET_ENDPOINT, or ROUTING_MAP" >&2
86+
if [ -z "${ROUTING_MAP:-}" ] && [ -z "$TARGET_ENDPOINT" ]; then
87+
echo "Error: nothing to route to; set TARGET_ENDPOINT or ROUTING_MAP" >&2
8888
exit 1
8989
fi
9090
if [ -n "$ACME_EMAIL" ] && ! ACME_EMAIL=$(sanitize_email "$ACME_EMAIL"); then

0 commit comments

Comments
 (0)