remove federation (#3794)

Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
This commit is contained in:
Zou Nengren 2020-03-31 00:08:20 +08:00 committed by GitHub
parent 021f761291
commit 8bbfa19223
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 0 additions and 63 deletions

View file

@ -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 ""
}