Skip to content

Commit

Permalink
Adding legacyHostIP to the list of IPs we look at (apache-spark-on-k8…
Browse files Browse the repository at this point in the history
  • Loading branch information
foxish authored and ash211 committed Feb 16, 2017
1 parent 112e579 commit 1559dbb
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 1559dbb

Please sign in to comment.