mirror of
https://github.com/vxcontrol/external-dns.git
synced 2026-07-19 18:23:33 -04:00
Added support for ROUTE53_MAX_RETRIES env var option
This commit is contained in:
@@ -3,6 +3,7 @@ package route53
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/Sirupsen/logrus"
|
||||
@@ -41,6 +42,15 @@ func (r *Route53Provider) Init(rootDomainName string) error {
|
||||
// requests automatically if the global rate limit is exhausted.
|
||||
r.limiter = ratelimit.NewBucketWithRate(5.0, 1)
|
||||
|
||||
if envVal := os.Getenv("ROUTE53_MAX_RETRIES"); envVal != "" {
|
||||
i, err := strconv.Atoi(envVal)
|
||||
if err == nil {
|
||||
route53MaxRetries = i
|
||||
} else {
|
||||
logrus.Warnf("Invalid value for ROUTE53_MAX_RETRIES. Using default.")
|
||||
}
|
||||
}
|
||||
|
||||
creds := credentials.NewChainCredentials(
|
||||
[]credentials.Provider{
|
||||
&credentials.EnvProvider{},
|
||||
|
||||
Reference in New Issue
Block a user