mirror of
https://github.com/coredns/coredns.git
synced 2025-10-27 16:24:19 -04:00
remove federation (#3794)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
This commit is contained in:
@@ -35,24 +35,3 @@ func boundIPs(c *caddy.Controller) (ips []net.IP) {
|
||||
}
|
||||
return ips
|
||||
}
|
||||
|
||||
// LocalNodeName is exclusively used in federation plugin, will be deprecated later.
|
||||
func (k *Kubernetes) LocalNodeName() string {
|
||||
if len(k.localIPs) == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
// Find fist endpoint matching any localIP
|
||||
for _, localIP := range k.localIPs {
|
||||
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)) {
|
||||
return addr.NodeName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user