Skip to content

Commit

Permalink
Fix a bug around internal node search (#738)
Browse files Browse the repository at this point in the history
  • Loading branch information
rkooo567 committed Jul 3, 2019
1 parent df96eb4 commit 034ba6d
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -424,9 +424,10 @@ def connect(self):
if len(external_node_hosts) == 0 and self.useInternalIP:
msg = "No external node addresses found. Using Internal IP address"
self.logger.warning(msg)
for addr in node.status.addresses:
if addr.type == "InternalIP":
external_node_hosts.append(addr.address)
for node in nodes.items:
for addr in node.status.addresses:
if addr.type == "InternalIP":
external_node_hosts.append(addr.address)

if len(external_node_hosts) == 0:
msg = "Error connecting to Kubernetes cluster. No external node addresses found. You may pass in KubernetesContainerManager(useInternalIP=True) to connect to local Kubernetes cluster"
Expand Down

0 comments on commit 034ba6d

Please sign in to comment.