-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This commit adds support for CoreDNS through its etcd middleware. Because the middleware is backward compatible with SkyDNS this commit adds support for SkyDNS as well. In fact, new provider is available under two names in CLI (coredns and skydns). All interactions with middleware happen through etcd cluster, whose location (URIs) is specified via --etcd CLI parameter by default http://localhost:2379). The provider translates CoreDNS/DkyDNS SRV records to A/CNAME + optional TXT endpoints, when reading from etcd and combines A/CNAME with TXT endpoints back into single SRV record when writing it back. Also: * adds github.com/coreos/etcd package to glide.yaml and vendor folder because it is used by the provider * adds "interfaces" packages and moves Registry and Provider interfaces declaration there. This is required in order to use registry in provider unit tests. Otherwise there going to be circular imports because provider UTests would import registry which imports providers back.
- Loading branch information
Stan Lagun
committed
Jun 26, 2017
1 parent
1592ef0
commit 2a103b4
Showing
1,693 changed files
with
487,116 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
Copyright 2017 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package interfaces | ||
|
||
import ( | ||
"github.com/kubernetes-incubator/external-dns/endpoint" | ||
"github.com/kubernetes-incubator/external-dns/plan" | ||
) | ||
|
||
// Provider defines the interface DNS providers should implement. | ||
type Provider interface { | ||
Records() ([]*endpoint.Endpoint, error) | ||
ApplyChanges(changes *plan.Changes) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright 2017 The Kubernetes Authors. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package interfaces | ||
|
||
import ( | ||
"github.com/kubernetes-incubator/external-dns/endpoint" | ||
"github.com/kubernetes-incubator/external-dns/plan" | ||
) | ||
|
||
// Registry is an interface which should enables ownership concept in external-dns | ||
// Records() returns ALL records registered with DNS provider (TODO: for multi-zone support return all records) | ||
// each entry includes owner information | ||
// ApplyChanges(changes *plan.Changes) propagates the changes to the DNS Provider API and correspondingly updates ownership depending on type of registry being used | ||
type Registry interface { | ||
Records() ([]*endpoint.Endpoint, error) | ||
ApplyChanges(changes *plan.Changes) error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.