aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Zou Nengren <zounengren@cmss.chinamobile.com> 2020-03-31 00:08:20 +0800
committerGravatar GitHub <noreply@github.com> 2020-03-30 09:08:20 -0700
commit8bbfa19223e7585084acfee58bf7a611ecb4a3d3 (patch)
tree5c3748361ad9f0b56cdaeb7fbb2b032a2d655855
parent021f761291f8d8cf6e392a3b7ae2d924530d7083 (diff)
downloadcoredns-8bbfa19223e7585084acfee58bf7a611ecb4a3d3.tar.gz
coredns-8bbfa19223e7585084acfee58bf7a611ecb4a3d3.tar.zst
coredns-8bbfa19223e7585084acfee58bf7a611ecb4a3d3.zip
remove federation (#3794)
Signed-off-by: zounengren <zounengren@cmss.chinamobile.com>
-rw-r--r--core/dnsserver/zdirectives.go1
-rw-r--r--core/plugin/zplugin.go1
-rw-r--r--go.mod1
-rw-r--r--go.sum2
-rw-r--r--man/coredns-kubernetes.720
-rw-r--r--plugin.cfg1
-rw-r--r--plugin/kubernetes/README.md14
-rw-r--r--plugin/kubernetes/local.go21
-rw-r--r--plugin/kubernetes/parse.go2
9 files changed, 0 insertions, 63 deletions
diff --git a/core/dnsserver/zdirectives.go b/core/dnsserver/zdirectives.go
index 65a51a22b..1bf449cb4 100644
--- a/core/dnsserver/zdirectives.go
+++ b/core/dnsserver/zdirectives.go
@@ -42,7 +42,6 @@ var Directives = []string{
"route53",
"azure",
"clouddns",
- "federation",
"k8s_external",
"kubernetes",
"file",
diff --git a/core/plugin/zplugin.go b/core/plugin/zplugin.go
index 316f49634..cf83be703 100644
--- a/core/plugin/zplugin.go
+++ b/core/plugin/zplugin.go
@@ -49,5 +49,4 @@ import (
_ "github.com/coredns/coredns/plugin/trace"
_ "github.com/coredns/coredns/plugin/transfer"
_ "github.com/coredns/coredns/plugin/whoami"
- _ "github.com/coredns/federation"
)
diff --git a/go.mod b/go.mod
index e1ec401d5..5b55660cd 100644
--- a/go.mod
+++ b/go.mod
@@ -13,7 +13,6 @@ require (
github.com/aws/aws-sdk-go v1.29.34
github.com/caddyserver/caddy v1.0.5
github.com/cenkalti/backoff/v4 v4.0.0
- github.com/coredns/federation v0.0.0-20190818181423-e032b096babe
github.com/dnstap/golang-dnstap v0.0.0-20170829151710-2cf77a2b5e11
github.com/farsightsec/golang-framestream v0.0.0-20181102145529-8a0cb8ba8710
github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef // indirect
diff --git a/go.sum b/go.sum
index 076e2fc1e..37f072eeb 100644
--- a/go.sum
+++ b/go.sum
@@ -91,8 +91,6 @@ github.com/cloudflare/cloudflare-go v0.10.2/go.mod h1:qhVI5MKwBGhdNU89ZRz2plgYut
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa h1:OaNxuTZr7kxeODyLWsRMC+OD03aFUH+mW6r2d+MWa5Y=
github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8=
-github.com/coredns/federation v0.0.0-20190818181423-e032b096babe h1:ND08lR/TclI9W4dScCwdRESOacCCdF3FkuB5pBIOv1U=
-github.com/coredns/federation v0.0.0-20190818181423-e032b096babe/go.mod h1:MoqTEFX8GlnKkyq8eBCF94VzkNAOgjdlCJ+Pz/oCLPk=
github.com/coreos/go-semver v0.2.0 h1:3Jm3tLmsgAYcjC+4Up7hJrFBPr+n7rAqYeSw/SZazuY=
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
github.com/coreos/go-systemd/v22 v22.0.0 h1:XJIw/+VlJ+87J+doOxznsAWIdmWuViOVhkQamW5YV28=
diff --git a/man/coredns-kubernetes.7 b/man/coredns-kubernetes.7
index 1490f0519..9e51d4691 100644
--- a/man/coredns-kubernetes.7
+++ b/man/coredns-kubernetes.7
@@ -257,26 +257,6 @@ cluster.local {
.fi
.RE
-.SH "FEDERATION"
-.PP
-The \fIkubernetes\fP plugin can be used in conjunction with the \fIfederation\fP plugin. Using this
-feature enables serving federated domains from the Kubernetes clusters.
-
-.PP
-.RS
-
-.nf
-cluster.local {
- federation {
- prod prod.example.org
- staging staging.example.org
- }
- kubernetes
-}
-
-.fi
-.RE
-
.SH "WILDCARDS"
.PP
Some query labels accept a wildcard value to match any value. If a label is a valid wildcard (*,
diff --git a/plugin.cfg b/plugin.cfg
index 76c97cbcb..c389d74ee 100644
--- a/plugin.cfg
+++ b/plugin.cfg
@@ -51,7 +51,6 @@ hosts:hosts
route53:route53
azure:azure
clouddns:clouddns
-federation:github.com/coredns/federation
k8s_external:k8s_external
kubernetes:kubernetes
file:file
diff --git a/plugin/kubernetes/README.md b/plugin/kubernetes/README.md
index aa4476031..eb9b59bb2 100644
--- a/plugin/kubernetes/README.md
+++ b/plugin/kubernetes/README.md
@@ -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 (\*,
diff --git a/plugin/kubernetes/local.go b/plugin/kubernetes/local.go
index d09255061..fccbb2a8a 100644
--- a/plugin/kubernetes/local.go
+++ b/plugin/kubernetes/local.go
@@ -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 ""
-}
diff --git a/plugin/kubernetes/parse.go b/plugin/kubernetes/parse.go
index 7b909005c..da8392cbe 100644
--- a/plugin/kubernetes/parse.go
+++ b/plugin/kubernetes/parse.go
@@ -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