Skip to content

Commit

Permalink
Fix NoneType error for old-style relation
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsca committed May 13, 2021
1 parent e2cacdd commit e8e75f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/charms/layer/kubernetes_master.py
Expand Up @@ -86,7 +86,7 @@ def get_internal_api_endpoints(relation=None):

# Support the older loadbalancer relation (public-address interface).
if "loadbalancer" in goal_state["relations"]:
loadbalancer = endpoint_from_flag("loadbalancer.available")
loadbalancer = endpoint_from_name("loadbalancer")
lb_addresses = loadbalancer.get_addresses_ports()
return [(host.get("public-address"), host.get("port")) for host in lb_addresses]

Expand Down

0 comments on commit e8e75f2

Please sign in to comment.