Skip to content

Commit

Permalink
exoscale: rename exo into exoscale
Browse files Browse the repository at this point in the history
Signed-off-by: Yoan Blanc <yoan.blanc@exoscale.ch>
  • Loading branch information
Yoan Blanc authored and FaKod committed Jul 4, 2018
1 parent 8003a3f commit a487d38
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 13 deletions.
14 changes: 13 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Gopkg.toml
Expand Up @@ -67,3 +67,7 @@ ignored = ["github.com/kubernetes/repo-infra/kazel"]
[[constraint]]
name = "github.com/nesv/go-dynect"
version = "0.6.0"

[[constraint]]
name = "github.com/exoscale/egoscale"
version = "~0.9.31"
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -36,6 +36,7 @@ ExternalDNS' current release is `v0.5`. This version allows you to keep selected
* [OpenStack Designate](https://docs.openstack.org/designate/latest/)
* [PowerDNS](https://www.powerdns.com/)
* [CoreDNS](https://coredns.io/)
* [Exoscale](https://www.exoscale.com/dns/)

From this release, ExternalDNS can become aware of the records it is managing (enabled via `--registry=txt`), therefore ExternalDNS can safely manage non-empty hosted zones. We strongly encourage you to use `v0.5` (or greater) with `--registry=txt` enabled and `--txt-owner-id` set to a unique value that doesn't change for the lifetime of your cluster. You might also want to run ExternalDNS in a dry run mode (`--dry-run` flag) to see the changes to be submitted to your DNS Provider API.

Expand Down
2 changes: 1 addition & 1 deletion main.go
Expand Up @@ -143,7 +143,7 @@ func main() {
case "coredns", "skydns":
p, err = provider.NewCoreDNSProvider(domainFilter, cfg.DryRun)
case "exoscale":
p, err = provider.NewExoscaleProvider(cfg.ExoEndpoint, cfg.ExoAPIKey, cfg.ExoAPISecret, provider.ExoWithDomain(domainFilter), provider.ExoWithLogging()), nil
p, err = provider.NewExoscaleProvider(cfg.ExoscaleEndpoint, cfg.ExoscaleAPIKey, cfg.ExoscaleAPISecret, provider.ExoscaleWithDomain(domainFilter), provider.ExoscaleWithLogging()), nil
case "inmemory":
p, err = provider.NewInMemoryProvider(provider.InMemoryInitZones(cfg.InMemoryZones), provider.InMemoryWithDomain(domainFilter), provider.InMemoryWithLogging()), nil
case "designate":
Expand Down
12 changes: 6 additions & 6 deletions pkg/apis/externaldns/types.go
Expand Up @@ -79,9 +79,9 @@ type Config struct {
MetricsAddress string
LogLevel string
TXTCacheInterval time.Duration
ExoEndpoint string
ExoAPIKey string
ExoAPISecret string
ExoscaleEndpoint string
ExoscaleAPIKey string
ExoscaleAPISecret string
}

var defaultConfig = &Config{
Expand Down Expand Up @@ -197,9 +197,9 @@ func (cfg *Config) ParseFlags(args []string) error {
app.Flag("pdns-server", "When using the PowerDNS/PDNS provider, specify the URL to the pdns server (required when --provider=pdns)").Default(defaultConfig.PDNSServer).StringVar(&cfg.PDNSServer)
app.Flag("pdns-api-key", "When using the PowerDNS/PDNS provider, specify the URL to the pdns server (required when --provider=pdns)").Default(defaultConfig.PDNSAPIKey).StringVar(&cfg.PDNSAPIKey)

app.Flag("exo-endpoint", "Provide the endpoint for the Exoscale provider").Default("").StringVar(&cfg.ExoEndpoint)
app.Flag("exo-apikey", "Provide your API Key for the Exoscale provider").Default("").StringVar(&cfg.ExoAPIKey)
app.Flag("exo-apisecret", "Provide your API Secret for the Exoscale provider").Default("").StringVar(&cfg.ExoAPISecret)
app.Flag("exoscale-endpoint", "Provide the endpoint for the Exoscale provider").Default("https://api.exoscale.ch/dns").StringVar(&cfg.ExoscaleEndpoint)
app.Flag("exoscale-apikey", "Provide your API Key for the Exoscale provider").Default("").StringVar(&cfg.ExoscaleAPIKey)
app.Flag("exoscale-apisecret", "Provide your API Secret for the Exoscale provider").Default("").StringVar(&cfg.ExoscaleAPISecret)

// Flags related to policies
app.Flag("policy", "Modify how DNS records are sychronized between sources and providers (default: sync, options: sync, upsert-only)").Default(defaultConfig.Policy).EnumVar(&cfg.Policy, "sync", "upsert-only")
Expand Down
10 changes: 5 additions & 5 deletions provider/exoscale.go
Expand Up @@ -129,7 +129,7 @@ func (ep *ExoscaleProvider) Records() ([]*endpoint.Endpoint, error) {
}
for _, r := range record {
switch r.RecordType {
case "A", "CNAME", "TXT":
case "A", "AAAA", "CNAME", "TXT":
break
default:
continue
Expand All @@ -143,15 +143,15 @@ func (ep *ExoscaleProvider) Records() ([]*endpoint.Endpoint, error) {
return endpoints, nil
}

// ExoWithDomain modifies the domain on which dns zones are filtered
func ExoWithDomain(domainFilter DomainFilter) ExoscaleOption {
// ExoscaleWithDomain modifies the domain on which dns zones are filtered
func ExoscaleWithDomain(domainFilter DomainFilter) ExoscaleOption {
return func(p *ExoscaleProvider) {
p.domain = domainFilter
}
}

// ExoWithLogging injects logging when ApplyChanges is called
func ExoWithLogging() ExoscaleOption {
// ExoscaleWithLogging injects logging when ApplyChanges is called
func ExoscaleWithLogging() ExoscaleOption {
return func(p *ExoscaleProvider) {
p.OnApplyChanges = func(changes *plan.Changes) {
for _, v := range changes.Create {
Expand Down

0 comments on commit a487d38

Please sign in to comment.