mirror of
https://github.com/coredns/coredns.git
synced 2025-11-01 10:43:17 -04:00
remove federation (#3794)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
This commit is contained in:
@@ -182,20 +182,6 @@ be set to `verified` for this to function properly.
|
||||
}
|
||||
}
|
||||
|
||||
## Federation
|
||||
|
||||
The *kubernetes* plugin can be used in conjunction with the *federation* plugin. Using this
|
||||
feature enables serving federated domains from the Kubernetes clusters.
|
||||
|
||||
cluster.local {
|
||||
federation {
|
||||
prod prod.example.org
|
||||
staging staging.example.org
|
||||
}
|
||||
kubernetes
|
||||
}
|
||||
|
||||
|
||||
## Wildcards
|
||||
|
||||
Some query labels accept a wildcard value to match any value. If a label is a valid wildcard (\*,
|
||||
|
||||
@@ -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 ""
|
||||
}
|
||||
|
||||
@@ -29,8 +29,6 @@ func parseRequest(name, zone string) (r recordRequest, err error) {
|
||||
// 1. _port._protocol.service.namespace.pod|svc.zone
|
||||
// 2. (endpoint): endpoint.service.namespace.pod|svc.zone
|
||||
// 3. (service): service.namespace.pod|svc.zone
|
||||
//
|
||||
// Federations are handled in the federation plugin. And aren't parsed here.
|
||||
|
||||
base, _ := dnsutil.TrimZone(name, zone)
|
||||
// return NODATA for apex queries
|
||||
|
||||
Reference in New Issue
Block a user