From b739f29bc82cdbc8c22858e4cc5b246ace8d22f9 Mon Sep 17 00:00:00 2001 From: Redouane Kachach Date: Thu, 30 Nov 2023 11:26:48 +0100 Subject: [PATCH] test: fix how we obtain the dashboard endpoint current code gets the ip:port for the dashboard by using the ip of the mgr pods. This works great when there's only one mgr but it fails in case of a multi-node cluster Signed-off-by: Redouane Kachach --- tests/scripts/create-dev-cluster.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/scripts/create-dev-cluster.sh b/tests/scripts/create-dev-cluster.sh index 65463848c83f..0c4e69adb1eb 100755 --- a/tests/scripts/create-dev-cluster.sh +++ b/tests/scripts/create-dev-cluster.sh @@ -66,9 +66,8 @@ get_minikube_driver() { show_info() { local monitoring_enabled=$1 DASHBOARD_PASSWORD=$($KUBECTL -n "$ROOK_CLUSTER_NS" get secret rook-ceph-dashboard-password -o jsonpath="{['data']['password']}" | base64 --decode && echo) - IP_ADDR=$($KUBECTL get po --selector="app=rook-ceph-mgr" -n "$ROOK_CLUSTER_NS" --output jsonpath='{.items[*].status.hostIP}') - PORT="$($KUBECTL -n "$ROOK_CLUSTER_NS" -o=jsonpath='{.spec.ports[?(@.name == "dashboard")].nodePort}' get services rook-ceph-mgr-dashboard-external-http)" - BASE_URL="http://$IP_ADDR:$PORT" + DASHBOARD_END_POINT=$($MINIKUBE service rook-ceph-mgr-dashboard-external-http -n rook-ceph --url) + BASE_URL="$DASHBOARD_END_POINT" echo "===========================" echo "Ceph Dashboard:" echo " IP_ADDR : $BASE_URL"