diff --git a/src/codeflare_sdk/cluster/cluster.py b/src/codeflare_sdk/cluster/cluster.py index b0bff0883..7b3d5d667 100644 --- a/src/codeflare_sdk/cluster/cluster.py +++ b/src/codeflare_sdk/cluster/cluster.py @@ -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: @@ -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"],