plugin/route53: make refresh frequency adjustable (#3083)

the current update frequency for the refresh loop in the route 53 plugin is hard-coded
to 1 minute. aws rate-limits the number of api requests so less frequent record refreshes
can help when reaching those limits depending upon your individual scenarios. this pull
adds a configuration option to the route53 plugin to adjust the refresh frequency.

thanks for getting my last pull released so quickly. this is the last local change that
i have been running and would love to get it contributed back to the project.

Signed-off-by: Matt Kulka <mkulka@parchment.com>
This commit is contained in:
Matt Kulka 2019-08-03 18:07:28 -07:00 committed by dilyevsky
parent fc1e313ca7
commit 94468c41b0
5 changed files with 65 additions and 6 deletions

View file

@ -51,6 +51,22 @@ func TestSetupRoute53(t *testing.T) {
{`route53 example.org:12345678 example.org:12345678 {
}`, true},
{`route53 example.org:12345678 {
refresh 90
}`, false},
{`route53 example.org:12345678 {
refresh 5m
}`, false},
{`route53 example.org:12345678 {
refresh
}`, true},
{`route53 example.org:12345678 {
refresh foo
}`, true},
{`route53 example.org:12345678 {
refresh -1m
}`, true},
{`route53 example.org {
}`, true},
}