From d848cc7f4020ae9725205c1d6ca19e6c780014aa Mon Sep 17 00:00:00 2001 From: Marc Falzon Date: Tue, 20 Apr 2021 12:08:06 +0200 Subject: [PATCH] exoscale: fix DNS provider debugging (#1391) --- providers/dns/exoscale/exoscale.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/providers/dns/exoscale/exoscale.go b/providers/dns/exoscale/exoscale.go index e92259f9..0654c092 100644 --- a/providers/dns/exoscale/exoscale.go +++ b/providers/dns/exoscale/exoscale.go @@ -47,7 +47,8 @@ func NewDefaultConfig() *Config { PropagationTimeout: env.GetOrDefaultSecond(EnvPropagationTimeout, dns01.DefaultPropagationTimeout), PollingInterval: env.GetOrDefaultSecond(EnvPollingInterval, dns01.DefaultPollingInterval), HTTPClient: &http.Client{ - Timeout: env.GetOrDefaultSecond(EnvHTTPTimeout, 30*time.Second), + Timeout: env.GetOrDefaultSecond(EnvHTTPTimeout, 30*time.Second), + Transport: http.DefaultTransport, }, } } @@ -88,8 +89,12 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) { config.Endpoint = defaultBaseURL } - client := egoscale.NewClient(config.Endpoint, config.APIKey, config.APISecret) - client.HTTPClient = config.HTTPClient + client := egoscale.NewClient( + config.Endpoint, + config.APIKey, + config.APISecret, + egoscale.WithHTTPClient(config.HTTPClient), + ) return &DNSProvider{client: client, config: config}, nil } @@ -174,7 +179,7 @@ func (d *DNSProvider) FindExistingRecordID(zone, recordName string) (int64, erro ctx := context.Background() records, err := d.client.GetRecords(ctx, zone) if err != nil { - return -1, errors.New("Error while retrievening DNS records: " + err.Error()) + return -1, errors.New("Error while retrieving DNS records: " + err.Error()) } for _, record := range records { if record.Name == recordName {