Charles Anderson ca58d993af
feat(cloudflare): support batch API for DNS record changes (#6208)
* feat(cloudflare): add --batch-change-size and --batch-change-interval flags

Adds two new global CLI flags for controlling batch DNS change behaviour:
- --batch-change-size (default 200): maximum number of DNS operations per batch
- --batch-change-interval (default 1s): pause between consecutive batch chunks

Wires the flags through Config into the Cloudflare provider's DNSRecordsConfig.

* feat(cloudflare): implement batch DNS records API with automatic fallback

Uses Cloudflare's Batch DNS Records API to submit all creates, updates, and
deletes for a zone in a single transactional API call per chunk, significantly
reducing the total number of requests made against the Cloudflare API.

- Batch size and interval are controlled via --batch-change-size / --batch-change-interval
- Record types unsupported by the batch PUT endpoint (e.g. SRV, CAA) are
  submitted individually via the standard API
- If a batch chunk is rejected by Cloudflare, ExternalDNS automatically retries
  each record change in that chunk individually so no changes are silently lost
- Adds cloudflare_batch.go with the core batching logic and full test coverage

* feat(cloudflare): soft retry for 'unexpected EOF' (issue 3798)

* feat(cloudflare): soft retry for 'unexpected EOF' (issue 3798)

* feat(cloudflare): debug logs for intentional invididual-updates

* feat(cloudflare): improved code coverage

* feat(cloudflare): handle json.Encoder error in test helper
2026-03-12 22:21:36 +05:30
..
2025-10-01 09:06:19 -07:00