aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/local.go
diff options
context:
space:
mode:
authorGravatar Sandeep Rajan <srajan@infoblox.com> 2017-10-17 21:30:54 -0400
committerGravatar John Belamaric <jbelamaric@infoblox.com> 2017-10-17 21:30:54 -0400
commitb6b05eae8f3d1c1413b0308bc8e9285ec0423a96 (patch)
treeddb3f0e3ad99827012306ee09f316b3ffd23581d /plugin/kubernetes/local.go
parent0c63248a0eb927affeef701150e818ad92eac808 (diff)
downloadcoredns-b6b05eae8f3d1c1413b0308bc8e9285ec0423a96.tar.gz
coredns-b6b05eae8f3d1c1413b0308bc8e9285ec0423a96.tar.zst
coredns-b6b05eae8f3d1c1413b0308bc8e9285ec0423a96.zip
Plugin/Kubernetes: Service and Endpoint Indexing (#1149)
* indexing * corrections
Diffstat (limited to 'plugin/kubernetes/local.go')
-rw-r--r--plugin/kubernetes/local.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/kubernetes/local.go b/plugin/kubernetes/local.go
index ef3651a91..961eb9410 100644
--- a/plugin/kubernetes/local.go
+++ b/plugin/kubernetes/local.go
@@ -28,7 +28,7 @@ func (k *Kubernetes) localNodeName() string {
}
// Find endpoint matching localIP
- for _, ep := range k.APIConn.EndpointsList() {
+ for _, ep := range k.APIConn.EpIndexReverse(localIP.String()) {
for _, eps := range ep.Subsets {
for _, addr := range eps.Addresses {
if localIP.Equal(net.ParseIP(addr.IP)) {