We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0eb4fc7 commit b75cb42Copy full SHA for b75cb42
src/codeflare_sdk/cluster/cluster.py
@@ -59,7 +59,14 @@ def cluster_uri(self, namespace='default'):
59
return f'ray://{self.config.name}-head-svc.{namespace}.svc:10001'
60
61
def cluster_dashboard_uri(self, namespace='default'):
62
- return f'http://{self.config.name}-head-svc.{namespace}.svc:8265'
+ try:
63
+ with oc.project(namespace):
64
+ route = oc.invoke("get", ["route", "-o","jsonpath='{$.items[0].spec.host}'"])
65
+ route = route.out().strip().strip("'")
66
+ return f"http://{route}"
67
+ except:
68
+ return "Dashboard route not available yet. Did you run cluster.up()?"
69
+
70
71
72
# checks whether the ray cluster is ready
0 commit comments