Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/codeflare_sdk/cluster/cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ def cluster_dashboard_uri(self) -> str:

for route in routes["items"]:
if route["metadata"]["name"] == f"ray-dashboard-{self.config.name}":
return f"http://{route['spec']['host']}"
protocol = "https" if route["spec"].get("tls") else "http"
return f"{protocol}://{route['spec']['host']}"
return "Dashboard route not available yet, have you run cluster.up()?"

def list_jobs(self) -> List:
Expand Down Expand Up @@ -585,7 +586,8 @@ def _map_to_ray_cluster(rc) -> Optional[RayCluster]:
ray_route = None
for route in routes["items"]:
if route["metadata"]["name"] == f"ray-dashboard-{rc['metadata']['name']}":
ray_route = route["spec"]["host"]
protocol = "https" if route["spec"].get("tls") else "http"
ray_route = f"{protocol}://{route['spec']['host']}"

return RayCluster(
name=rc["metadata"]["name"],
Expand Down