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

#81: TTL to proxy status #82

Merged
merged 7 commits into from
Feb 9, 2024
Merged

#81: TTL to proxy status #82

merged 7 commits into from
Feb 9, 2024

Conversation

gmemstr
Copy link
Contributor

@gmemstr gmemstr commented Feb 8, 2024

In #81 I described some difficulties setting the proxy status of a record when using something like a octodns_bind.ZoneFileSource source. This processor allows us to assign special meaning to a TTL to toggle the status.

Example:

processors:
  ttl-to-proxy:
    class: octodns_cloudflare.processor.ttl.TtlToProxy
    # TTL default to zero
    # ttl: 0
zones:
  exxampled.com.:
    sources:
      - config
    processors:
      - ttl-to-proxy
    targets:
      - cloudflare
# Not proxied
foobar.gmem.ca. IN 86400 CNAME cluster
# Proxied, auto-ttl set
foobar.gmem.ca. IN 0 CNAME cluster

octodns_cloudflare/processor/ttl.py Outdated Show resolved Hide resolved
octodns_cloudflare/processor/ttl.py Outdated Show resolved Hide resolved
gmemstr and others added 2 commits February 8, 2024 21:15
Co-authored-by: Ross McFarland <[email protected]>
@ross
Copy link
Contributor

ross commented Feb 8, 2024

You can run what CI runs locally by doing ./script/bootstrap once and then running ./script/cibuild. There's also ./script/test and ./script/coverage.

@gmemstr
Copy link
Contributor Author

gmemstr commented Feb 8, 2024

Updated and wrote some basic tests :)

Copy link
Contributor

@ross ross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a changelog entry. Thanks.

@ross ross merged commit 288f719 into octodns:main Feb 9, 2024
7 checks passed
@gmemstr gmemstr deleted the processor branch February 9, 2024 16:40
@ross ross mentioned this pull request Feb 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants