Skip to content

Commit ab1be69

Browse files
authored
Fix loadBalancer attribute name (#908)
Closes #906
1 parent 2ecfdcd commit ab1be69

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: dask_kubernetes/operator/controller/controller.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ async def handle_scheduler_service_status(
401401
assert namespace
402402
# If the Service is a LoadBalancer with no ingress endpoints mark the cluster as Pending
403403
if spec["type"] == "LoadBalancer" and not len(
404-
status.get("load_balancer", {}).get("ingress", [])
404+
status.get("loadBalancer", {}).get("ingress", [])
405405
):
406406
phase = "Pending"
407407
# Otherwise mark it as Running

Diff for: dask_kubernetes/operator/networking.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ async def get_external_address_for_scheduler_service(
5050
"""Take a service object and return the scheduler address."""
5151
if service.spec.type == "LoadBalancer":
5252
port = _get_port(service, port_name)
53-
lb = service.status.load_balancer.ingress[0]
54-
host = lb.hostname or lb.ip
53+
lb = service.status.loadBalancer.ingress[0]
54+
host = lb.get("hostname", None) or lb.ip
5555
elif service.spec.type == "NodePort":
5656
port = _get_port(service, port_name, is_node_port=True)
5757
nodes = await kr8s.asyncio.get("nodes")

0 commit comments

Comments
 (0)