Skip to content

Commit

Permalink
Adding legacyHostIP to the list of IPs we look at (apache#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
foxish committed Jul 24, 2017
1 parent ba6a9e5 commit bab88e0
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -747,9 +747,11 @@ private[spark] class Client(
node.getSpec.getUnschedulable)
.flatMap(_.getStatus.getAddresses.asScala)
// The list contains hostnames, internal and external IP addresses.
// we want only external IP addresses in our list
// (https://kubernetes.io/docs/admin/node/#addresses)
.filter(_.getType == "ExternalIP")
// we want only external IP addresses and legacyHostIP addresses in our list
// legacyHostIPs are deprecated and will be removed in the future.
// (https://github.com/kubernetes/kubernetes/issues/9267)
.filter(address => address.getType == "ExternalIP" || address.getType == "LegacyHostIP")
.map(address => {
s"$urlScheme://${address.getAddress}:$servicePort"
}).toSet
Expand Down

0 comments on commit bab88e0

Please sign in to comment.