Skip to content

Commit 00bed41

Browse files
committed
fix: Use FQDN for backend service to avoid DNS search domain issues
1 parent 539871d commit 00bed41

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

addons/loki/scripts/wait-index-gateway-ring.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ MAX_WAIT="${MAX_WAIT:-300}" # 5 minutes default
1111
ELAPSED=0
1212

1313
echo "Waiting for index gateway ring to be ready..."
14-
echo "Backend service: ${BACKEND_SVC}.${KB_NAMESPACE}.svc.${CLUSTER_DOMAIN}:${BACKEND_PORT}"
14+
echo "Backend service: ${BACKEND_SVC}.${KB_NAMESPACE}.svc.${CLUSTER_DOMAIN}.:${BACKEND_PORT}"
1515
echo "Max wait time: ${MAX_WAIT} seconds"
1616

1717
while [ $ELAPSED -lt $MAX_WAIT ]; do
1818
# Check if backend service is accessible
19-
if curl -sf "http://${BACKEND_SVC}.${KB_NAMESPACE}.svc.${CLUSTER_DOMAIN}:${BACKEND_PORT}/ready" > /dev/null 2>&1; then
19+
if curl -sf "http://${BACKEND_SVC}.${KB_NAMESPACE}.svc.${CLUSTER_DOMAIN}.:${BACKEND_PORT}/ready" > /dev/null 2>&1; then
2020
# Check ring for ACTIVE instances (parse HTML)
21-
RING_HTML=$(curl -sf "http://${BACKEND_SVC}.${KB_NAMESPACE}.svc.${CLUSTER_DOMAIN}:${BACKEND_PORT}/indexgateway/ring" 2>/dev/null || echo "")
21+
RING_HTML=$(curl -sf "http://${BACKEND_SVC}.${KB_NAMESPACE}.svc.${CLUSTER_DOMAIN}.:${BACKEND_PORT}/indexgateway/ring" 2>/dev/null || echo "")
2222
if [ -n "$RING_HTML" ]; then
2323
ACTIVE_COUNT=$(echo "$RING_HTML" | grep -o '<td>ACTIVE</td>' | wc -l || echo "0")
2424
if [ "$ACTIVE_COUNT" -gt "0" ]; then

0 commit comments

Comments
 (0)