Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map Cloudflare ttl=1 to 300 #210

Open
wants to merge 1 commit into
base: master
from
Open

Map Cloudflare ttl=1 to 300 #210

wants to merge 1 commit into from

Conversation

@ross
Copy link
Contributor

ross commented Feb 24, 2018

This will map the Cloudflare ttl of 1 to 300s which based on this support thread is the behavior users would be getting there. The result of this will be that automatic ttl things dumped from CF would have 300s ttls in the resulting output which would once synced to CF and other places result in matching/preserving behaviors. It won't change anything that's already 1 in CF unless the record otherwise is being modified.

I think this is our best option for handling the automatic TTLs with the mindset of trying to get multiple providers to behavior the same way from a single config (octoDNS's mindset.)

/cc Fixes #202
/cc Replaces #204
/cc @vanbroup @ad-m for thoughts

@ross ross self-assigned this Feb 24, 2018
@OrRosenblatt
Copy link

OrRosenblatt commented Aug 15, 2018

Why not change

new['ttl'] = max(self.MIN_TTL, new['ttl'])

to

if not new['ttl'] == 1
  new['ttl'] = max(self.MIN_TTL, new['ttl'])

?

It will keep default behavior of Cloudflare API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.