zone: add PTR record management for DDNS and /zm/update-ptr - #92
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds PTR record management to Zoneomatic.
New custom endpoint
POST /zm/update-ptr—{"target": "host.example.com.", "addresses": ["192.0.2.55", ...], "mode": "append"|"replace"|"replace-all"}.Reverse names (
in-addr.arpa/ip6.arpa) are calculated from the addresses automatically;modedefaults toreplace-all.Modes (built on the existing matcher machinery,
updateRecordsgains areplaceAllknob):append— insert missing PTR only, never remove anythingreplace— single-record in-place swap, keeps unrelated PTRs on the namereplace-all— full sync: exact one PTR per address plus removal of stale PTRs pointing at the targetErrs
404when no matching reverse zone exists,400on invalid address/mode.New CLI option
--ddns-manage-ptrmakes/nic/updatealso manage PTRs for the updated addresses (one PTR per address, stale PTRs cleaned). A missing reverse zone is silently ignored — not an error.Also
/nic/updatenotedoc/openapi.json/doc/openapi.yaml(fuego v0.20.0 output)