mirror of
https://github.com/vxcontrol/external-dns.git
synced 2026-07-20 21:58:23 -04:00
Metadata as a separate project
This commit is contained in:
+1
-1
@@ -1 +1 @@
|
||||
/external-dns
|
||||
external-dns
|
||||
|
||||
Generated
+4
@@ -15,6 +15,10 @@
|
||||
"ImportPath": "github.com/mitchellh/goamz/route53",
|
||||
"Rev": "caaaea8b30ee15616494ee68abd5d8ebbbef05cf"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/rancher/go-rancher-metadata/metadata",
|
||||
"Rev": "08bc028a34ea0c033e4ca7eb0a209ce0afe6aa3b"
|
||||
},
|
||||
{
|
||||
"ImportPath": "github.com/vaughan0/go-ini",
|
||||
"Rev": "a98ad7ee00ec53921f08832bc06ecf7fd600e6a1"
|
||||
|
||||
Generated
Vendored
Generated
Vendored
+3
-3
@@ -3,13 +3,13 @@ package main
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/rancher/external-dns/metadata"
|
||||
"github.com/rancher/external-dns/providers"
|
||||
"github.com/rancher/go-rancher-metadata/metadata"
|
||||
"strings"
|
||||
"sync"
|
||||
)
|
||||
|
||||
func UpdateDnsRecords(m metadata.MetadataHandler) error {
|
||||
func UpdateDnsRecords(m metadata.Handler) error {
|
||||
metadataRecs, err := getMetadataDnsRecords(m)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error reading external dns entries: %v", err)
|
||||
@@ -168,7 +168,7 @@ func getProviderDnsRecords() (map[string]providers.DnsRecord, error) {
|
||||
return ourRecords, nil
|
||||
}
|
||||
|
||||
func getMetadataDnsRecords(m metadata.MetadataHandler) (map[string]providers.DnsRecord, error) {
|
||||
func getMetadataDnsRecords(m metadata.Handler) (map[string]providers.DnsRecord, error) {
|
||||
|
||||
containers, err := m.GetContainers()
|
||||
if err != nil {
|
||||
|
||||
@@ -3,8 +3,8 @@ package main
|
||||
import (
|
||||
"flag"
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/rancher/external-dns/metadata"
|
||||
"github.com/rancher/external-dns/providers"
|
||||
"github.com/rancher/go-rancher-metadata/metadata"
|
||||
"os"
|
||||
"time"
|
||||
)
|
||||
@@ -31,7 +31,7 @@ var (
|
||||
logFile = flag.String("log", "", "Log file")
|
||||
EnvironmentName string
|
||||
provider providers.Provider
|
||||
m metadata.MetadataHandler
|
||||
m metadata.Handler
|
||||
)
|
||||
|
||||
func setEnv() {
|
||||
|
||||
@@ -19,7 +19,7 @@ var (
|
||||
region aws.Region
|
||||
)
|
||||
|
||||
func main() {
|
||||
func init() {
|
||||
route53Handler := &Route53Handler{}
|
||||
if err := RegisterProvider("route53", route53Handler); err != nil {
|
||||
logrus.Fatal("Could not register route53 provider")
|
||||
|
||||
Reference in New Issue
Block a user