]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: special casing for minikube in run-backend-rook-api-request.sh 26600/head
authorJeff Layton <jlayton@redhat.com>
Fri, 22 Feb 2019 19:40:51 +0000 (14:40 -0500)
committerJeff Layton <jlayton@redhat.com>
Fri, 22 Feb 2019 19:45:23 +0000 (14:45 -0500)
For people running minikube for testing, the hostname "minikube" is
often not resolvable. If that's what the hostname is, then get
the address from "minikube ip" instead.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
src/pybind/mgr/dashboard/run-backend-rook-api-request.sh

index 1390994c90fd1d77c04bb9133362780709e8ac17..ef221dcfb0398a3a9fa729d2445f041dab4caae1 100755 (executable)
@@ -8,6 +8,9 @@ CURR_DIR=`pwd`
 K8S_NAMESPACE='rook-ceph'
 
 HOST=$(kubectl get pods -n $K8S_NAMESPACE -l "app=rook-ceph-mgr" -o json | jq .items[0].spec.nodeName | sed s/\"//g)
+if [ "$HOST" = "minikube" ]; then
+       HOST=$(minikube ip)
+fi
 PORT=$(kubectl get service -n $K8S_NAMESPACE rook-ceph-mgr-dashboard -o yaml | grep nodePort: | awk '{print $2}')
 API_URL="https://${HOST}:${PORT}"