1509 Commits

Author SHA1 Message Date
Ivan Ka
e1ef0bee6b
Revert "chore(deps): bump github.com/cloudflare/cloudflare-go from v5 to v6 (…" (#6338)
This reverts commit 29c35d75a711d3c0838fecaf03b330bd649bd73b.
2026-04-02 18:35:04 +05:30
Basil Pozdeev
e3d8983ed4
feat(azure): dns metadata (tags) support (#5984)
* feat: Add Azure DNS metadata (tags) support

* fix: address PR review comments for Azure metadata support

* test: add Azure metadata annotation test cases and fix prefix initialization

* Replace azure-metadata-* annotations with azure-tags

* refactor: move Azure tags parsing to provider package

Move provider-specific Azure tags annotation parsing from
source/annotations to provider/azure, following the same
pattern as Cloudflare tags handling.

* fix: use GetProviderSpecificProperty and handle duplicate tags

* fix: align with upstream Go 1.26 migration and short-form property names
2026-04-02 13:11:04 +05:30
Seena Fallah
736a2d58ae
feat!: generalize PTR record support from rfc2136 to all providers (#6232)
* feat(metrics): add source wrapper metrics for invalid and deduplicated endpoints

Add GaugeVecMetric.Reset() to clear stale label combinations between cycles.

Introduce invalidEndpoints and deduplicatedEndpoints gauge vectors in the
source wrappers package, partitioned by record_type and source_type. The
dedup source wrapper now tracks rejected (invalid) and de-duplicated
endpoints per collection cycle.

Update the metrics documentation and bump the known metrics count.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(source): add PTR source wrapper for automatic reverse DNS

Implement ptrSource, a source wrapper that generates PTR endpoints from
A/AAAA records. The wrapper supports:

- Global default via WithCreatePTR (maps to --create-ptr flag)
- Per-endpoint override via record-type provider-specific property
- Grouping multiple hostnames sharing an IP into a single PTR endpoint
- Skipping wildcard DNS names

Add WithPTRSupported and WithCreatePTR options to the wrapper Config
and wire the PTR wrapper into the WrapSources chain when PTR is in
managed-record-types.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(config): add --create-ptr flag and deprecate --rfc2136-create-ptr

Add the generic --create-ptr boolean flag to Config, enabling automatic
PTR record creation for any provider. Add IsPTRSupported() helper that
checks whether PTR is included in --managed-record-types.

Add validation: --create-ptr (or legacy --rfc2136-create-ptr) now
requires PTR in --managed-record-types, preventing misconfiguration.

Mark --rfc2136-create-ptr as deprecated in the flag description.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* refactor(rfc2136): remove inline PTR logic in favor of PTR source wrapper

Remove the createPTR field, AddReverseRecord, RemoveReverseRecord, and
GenerateReverseRecord methods from the rfc2136 provider. PTR record
generation is now handled generically by the PTR source wrapper before
records reach the provider.

Update the PTR creation test to supply pre-generated PTR endpoints
(simulating what the source wrapper produces) instead of relying on
the provider to create them internally.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(controller): wire PTR source wrapper into buildSource

Pass the top-level Config to buildSource so it can read IsPTRSupported()
and the CreatePTR / RFC2136CreatePTR flags. When PTR is in
managed-record-types, the PTR source wrapper is installed in the
wrapper chain with the combined create-ptr default.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* chore(pdns): remove stale comment and fix whitespace

Remove an outdated comment about a single-target-per-tuple assumption
that no longer applies.

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* docs: add PTR records documentation and update existing guides

Add docs/advanced/ptr-records.md covering the --create-ptr flag,
per-resource annotation overrides, prerequisites, and usage examples.

Update:
- annotations.md: document record-type annotation
- flags.md: add --create-ptr, mark --rfc2136-create-ptr as deprecated
- tutorials/rfc2136.md: point to generic --create-ptr flag
- contributing/source-wrappers.md: add PTR wrapper to the chain
- mkdocs.yml: add PTR Records navigation entry

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* feat(rfc2136)!: remove rfc2136-create-ptr in favor of create-ptr

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2026-03-30 13:36:16 +05:30
vflaux
29c35d75a7
chore(deps): bump github.com/cloudflare/cloudflare-go from v5 to v6 (#6324) 2026-03-30 12:14:14 +05:30
Ivan Ka
eb40149b99
test: improve code coverage (#6321)
* test: improve code coverage

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* test: improve code coverage

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-29 23:46:12 +05:30
vflaux
c745bb044a
chore(go): upgrade to go1.26 (#6314)
* chore(go): upgrade to go1.26

* chore: use the new new() capability

* chore(lint): update golanci-lint

* chore(endpoint): add EndpointKey.String() test
2026-03-29 23:12:12 +05:30
Ivan Ka
f73e4fb88b
feat(webhook): instrument HTTP client with request duration metrics (#6307)
* feat(webhook): instrument HTTP client with request duration metrics

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(webhook): instrument HTTP client with request duration metrics

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(webhook): instrument HTTP client with request duration metrics

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(webhook): instrument HTTP client with request duration metrics

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(webhook): instrument HTTP client with request duration metrics

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* feat(webhook): instrument HTTP client with request duration metrics

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-03-28 18:02:12 +05:30
vflaux
7882822f40
chore: modernize code (#6313) 2026-03-27 18:06:48 +05:30
Ivan Ka
aeb22d042b
fix(webhook): increase test client timeouts to prevent flaky tests (#6310)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-26 04:42:15 +05:30
Ivan Ka
19263ee9f0
fix(webhook): connection pool leaks, stuck goroutines on server hang, and retry correctness (#6279)
* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(webhook): connection leaks, goroutine leaks, and retry correctness

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-20 16:04:14 +05:30
Seena Fallah
fd3e82cf9b
feat: add PTR to registry mapper and pdns trailing-dot types (#6281)
Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2026-03-17 19:19:40 +05:30
Oleksandr Simonov
18c451cf87
chore(digitalocean)!: remove in-tree provider (#6283) 2026-03-17 14:11:39 +05:30
Ivan Ka
867fe74145
docs(regexfilter): pitfalls in domain-filter zone partitioning (#6255)
* test(pdns): regex pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* test(pdns): regex pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* test(pdns): regex pitfalls in domain-filter zone partitioning

I'll enable https://github.com/ldez/usetesting

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* test(pdns): regex pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* test(pdns): regex pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* test(pdns): regex pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* test(pdns): regex pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* test(pdns): regex pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(regexfilter): pitfalls in domain-filter zone partitioning

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* docs(regexfilter): pitfalls in domain-filter zone partitioning

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-03-17 02:37:36 +05:30
Ivan Ka
6ef2c9c070
refactor(source): move SuitableType to endpoint package (#6239)
* refactore(source): move SuitableType to endpiont package

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(source): move SuitableType to endpiont package

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(source): move SuitableType to endpiont package

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(source): move SuitableType to endpiont package

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(source): move SuitableType to endpiont package

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-16 13:41:39 +05:30
Ivan Ka
564d5353b8
refactor(provider): introduce factory with uniform New consturctor (#6276)
* refactor(controller): move provider construction to provider/factory package

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(controller): move provider construction to provider/factory package

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(provider): introduce factory package with per-provider New constructors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(provider): introduce factory package with per-provider New constructors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(provider): introduce factory package with per-provider New constructors

* refactor(provider): introduce factory package with per-provider New constructors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactor(provider): introduce factory package with per-provider New constructors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-16 13:29:37 +05:30
Ivan Ka
e1f848446d
feat(event): emit events for ingress,svc,pod,node,crd (#6099)
* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(kubeclient): consolidate duplicate code to ensure consistent client creation

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* refactore(source): move SuitableType to endpiont package

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* feat(event): add support for svc,ingress,pod,node,crd

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* feat(event): add support for svc,ingress,pod,node,crd

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-03-16 04:03:36 +05:30
Ivan Ka
6186987d33
docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors (#6249)
* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* docs(contributor): GetDomainFilter contract and ZoneCache blueprint for provider contributors

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-15 04:25:42 +05:30
Ivan Ka
4aa6419fd0
linter(goimports): Mixed import groups (internal before external) (#6238)
* linter(goimports): Mixed import groups (internal before external)

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* inter(goimports): Mixed import groups (internal before external)

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-15 04:25:35 +05:30
Ivan Ka
e21f1389fb
linter(usetesting): enable usetesting (#6266)
* linter(usetesting): enable usetesting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* linter(usetesting): enable usetesting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* linter(usetesting): enable usetesting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* linter(usetesting): enable usetesting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* linter(usetesting): enable usetesting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* linter(usetesting): enable usetesting

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-03-14 22:07:35 +05:30
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
Seena Fallah
dc123262c6
feat(pdns): support GetDomainFilter interface (#6234)
* feat(pdns): support GetDomainFilter interface

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* refactor(pdns): drop domainFilter from PDNSAPIClient

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* fix(pdns): return authoritative zones from GetDomainFilter()

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

* refactor(pdns): drop PartitionZones from the interface

Signed-off-by: Seena Fallah <seenafallah@gmail.com>

---------

Signed-off-by: Seena Fallah <seenafallah@gmail.com>
2026-03-12 22:09:43 +05:30
Eneko
ecf45d6dbf
fix(rfc2136): wrap DNS resolution errors with SoftError to prevent crashes (#6227)
When nameservers cannot be resolved (e.g., DNS timeout), the provider now returns a SoftError instead of a regular error, allowing the controller to retry instead of crashing the pod.

- Modified List() to return provider.NewSoftError on nameserver failures
- Modified SendMessage() to return provider.NewSoftError on connection errors
- Modified ApplyChanges() to return provider.NewSoftErrorf for batch errors
- Added TestRfc2136NameserverFailureReturnsSoftError to verify behavior
- Follows same error handling pattern as AWS, Google, OCI providers
2026-03-12 22:09:35 +05:30
Kai Udo
9c91c6ff71
refactor(testutils): extract log test helpers into subpackage to fix (#6236)
circular import

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>
2026-03-01 14:56:11 +05:30
Vyacheslav Klimov
f4c758665b
feat(pdns): add --[no-]prefer-alias flag and alias annotation support (#6129)
* feat: add support for expand alias in pdns provider

* feat: codereview

* feat: rewrite docs

* feat: gofmt

* feat: rewrite using postprocessor

* feat: gofmt

* feat: update docs

* fix: prefer-alias respects existing annotations

* feat: update formatting verbs

* fix: fix return values and call sites after convertRRSetToEndpoints signature change

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: remove unused error return from convertRRSetToEndpoints

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-26 17:38:27 +05:30
Ivan Ka
a929ad6cc6
chore(linter): enable unparam (#6160)
* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unparam

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-02-20 15:15:39 +05:30
Ivan Ka
f0db4c2587
fix(annotations): initialize annotation keys at declaration time (#6159)
* fix(annotations): allow resetting annotation prefix to default value

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(annotations): allow resetting annotation prefix to default value

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* fix(annotations): allow resetting annotation prefix to default value

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-02-01 04:38:25 +05:30
Ivan Ka
b304dfe37d
chore(linter): unused params and functions linter (#6142)
* chore(linter): enable unused

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(linter): enable unusedparam

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-01-31 23:20:24 +05:30
vflaux
ff70b9e4da
chore(cloudflare): improve tests (#6150)
- use t.Context() instead of context.Background
- split test cases into sub tests
2026-01-29 05:03:47 +05:30
Kai Udo
c0b0e4b0a0
refactor(aws): extract and restructure alias-handling logic to enable safe upcoming fixes (#6021)
* test: add regression test to ensure behavior before refactor

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>

* refactor aws adjustEndpointAndAaaaIfNeeded

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>

* test(aws): add comprehensive tests and remove old logic

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>

* refactor(aws): simplify AdjustEndpoints record-type dispatch

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>

---------

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>
2026-01-27 00:17:50 +05:30
Ivan Ka
7579ce231c
feat(pihole): deprecate v5 API support (#6123)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-01-25 14:44:20 +05:30
vflaux
ee87a9a991
chore(cloudflare): move custom hostnames logic to dedicated files (#6114)
Also fix casing for some variable and function names.
2026-01-25 14:44:13 +05:30
Ivan Ka
1756cdd5d1
chore(provider): zone cache provider interface (#6120)
* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(provider): zone cache provider interface

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2026-01-25 14:32:13 +05:30
Romain Beuque
0eadcb0ef9
fix: provider/FindZone: transform zone name to unicode as well (#5980)
Signed-off-by: Romain Beuque <556072+rbeuque74@users.noreply.github.com>
2026-01-17 15:37:08 +05:30
Andy Hay
3dd839a33e
chore(cloudflare): migrate customhostname to v5 (#5891)
* chore(cloudflare): migrate customhostname to v5

* style: use range instead of loop

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* style: remove extra space

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* style: spelling

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* test(cloudflare): restore missing tests dropped during merge

* style: use t.Context() and t.Parallel() in restored tests

* refactor(cloudflare): split submitCustomHostnameChanges to reduce complexity

* style: apply gofmt to restored tests

* test: restore valid tests from master and append custom ones

* fix(cloudflare): migrate tests to v5 SDK error types and fix PerPage handling

- Replace all cloudflarev0.Error usages with cloudflare.Error in tests
- Remove unused cloudflarev0 import
- Fix getDNSRecordsMap to use PerPage configuration
- Add early return in convertCloudflareError for structured v5 errors
- Update TestConvertCloudflareError to handle v5 error types safely
- Remove ErrorCodes field from error structs (not in v5 SDK)

Signed-off-by: Andrew Hay <andrew.hay@benchmarkanalytics.com>

* style(cloudflare): apply gofmt formatting

Signed-off-by: Andrew Hay <andrew.hay@benchmarkanalytics.com>

* Update provider/cloudflare/cloudflare_test.go

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* test: add to test

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* fix: change context

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* style: use short variable declaration operator instead of var

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* refactor(cloudflare): address PR review feedback

- Remove SDK migration status section from cloudflare.md (per vflaux and ivankatliarchuk)
- Add newCloudflareError() helper for proper v5 SDK error testing
- Move ExampleDomain, TestGroupByNameAndTypeWithCustomHostnames_MX, and
  TestProviderPropertiesIdempotency back to original locations to minimize diff

* test: add customhostname test

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

* refactor: make CustomHostname types package-internal

* style: fix gofmt formatting

* Update .gitignore

Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>

---------

Signed-off-by: Andrew Hay <andrew.hay@benchmarkanalytics.com>
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
2026-01-15 01:59:37 +05:30
Saurav Upadhyay
ced397285b
test(provider/exoscale): improved the test coverage for exoscale provider from 62.8% to 80.4% (#6112)
* test(provider/exoscale): improve test coverage from 62.8 to 80.4%

* Revert "test(provider/exoscale): improve test coverage from 62.8 to 80.4%"

This reverts commit 56aa8b1dc87bc45f49fb247213d26f8883969865.

* test(provider/exoscale): improve test coverage from 62.8 to 80.4%
2026-01-14 13:25:37 +05:30
Jan Jansen
63296f5234
feat(coredns): rename ownerId and ownedBy to owner (#6032)
Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
2026-01-11 01:17:56 +05:30
Kai Udo
27f9199792
refactor(aws): abstract provider-specific boolean parsing (#6078)
* refactor(endpoint): add GetBoolProviderSpecificProperty method with comprehensive tests

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>

* refactor(endpoint): add GetBoolProviderSpecificProperty method and update consumers

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>

* fix(lint): remove named returns in GetBoolProviderSpecificProperty

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>

---------

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>
2026-01-11 00:55:56 +05:30
Kai Udo
d78dfb6ae1
fix(aws): enable AWS API validation for routing policies without setIdentifier (#6082)
Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>
2026-01-08 13:31:47 +05:30
vflaux
b2390a9187
chore(lint): replace with NewSoftErrorf when possible (#6061) 2025-12-30 15:48:34 +05:30
Ivan Ka
07dd842432
test(coverage): improve code coverage for different files (#6045)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-12-27 22:04:40 +05:30
Ivan Ka
a23f2d5a9a
chore(lint): configure modernize linter (#6035)
* chore(lint): configure modernize linter

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(lint): configure modernize linter

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(lint): modernize linter

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

* chore(lint): configure modernize linter

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-12-27 22:04:33 +05:30
alexbakker-quandago
cab76d250d
feat(aws): enable support for NAPTR records (#6022)
Since ef62107, it is now possible to enable support for NAPTR records in
the AWS provider. This patch does so and adds some tests for it.

Co-authored-by: woltere <wolter.eldering@quandago.com>
2025-12-21 08:28:30 -08:00
Rodrigo Kellermann
bf8bc46a3f
fix(cloudflare): dns records pagination (#5986)
* fix: cloudflare dns records pagination

Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>

* fix tests

Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>

* fix missing test condition

Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>

---------

Signed-off-by: Rodrigo Kellermann <kellermann@gmail.com>
2025-12-12 00:26:12 -08:00
blsho
6703e3aaeb
fix(pdns): ensure trailing dot for NS records (#5992)
* fix(pdns): ensure trailing dot for NS records

* Fix formatting test typos, make trailing types to list, refer to types with const

* Simplify trailing dot condition

* Move trailing types comment to correct location
2025-12-09 07:47:30 -08:00
Till Hoffmann
222b95fdca
fix(docs): Fixing typos in docs and comments (#5995) 2025-12-05 11:16:57 -08:00
Jan Jansen
8085ce246d
feat(coredns): use txt-owner-id to strictly separated external-dns instances (#5921)
* feat(coredns): use managed-by to separate records

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>

* feat(coredns): use txt-owner-id to strictly separated external-dns instances

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>

* fix tests

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>

* fix reviewer comments

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>

* answer review comments

* fix deletion behavior and remove extra function

* fix markdown

* fix tests again

---------

Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
2025-12-02 00:48:25 -08:00
Aleksei Sviridkin
5a55b09f48
feat(annotations): add custom annotation prefix support for split horizon DNS (#5889)
* feat(annotations): add custom annotation prefix support for split horizon DNS

Add --annotation-prefix flag to allow customizing the annotation prefix
used by external-dns. This enables split horizon DNS scenarios where
multiple instances process different sets of annotations from the same
Kubernetes resources.

Changes:
- Add AnnotationPrefix field to Config with validation
- Convert annotation constants to variables that can be reconfigured
- Add SetAnnotationPrefix() function to rebuild annotation keys
- Integrate annotation prefix setting in controller startup
- Update Helm chart with annotationPrefix value
- Add comprehensive split horizon DNS documentation
- Update FAQ with annotation prefix examples

This maintains full backward compatibility - the default prefix remains
"external-dns.alpha.kubernetes.io/".

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(advanced): fix markdown formatting in split-horizon guide

Add blank lines before code blocks to improve markdown rendering
and comply with markdownlint rules.

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(advanced): fix markdown formatting in split-horizon guide

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(charts): regenerate Helm chart documentation

Co-Authored-By: Claude <noreply@anthropic.com>

* test: add AnnotationPrefix field to test configs

Add missing AnnotationPrefix field to minimalConfig and overriddenConfig
test configurations to match the new default value set in NewConfig().

Co-Authored-By: Claude <noreply@anthropic.com>

* test(charts): update error pattern in json-schema test

Update expected error message pattern to match current Helm validation
output format.

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(annotations): remove init() for explicit initialization

- Remove init() function from annotations package
- Add explicit SetAnnotationPrefix() call in controller/execute.go
- Remove annotation key aliases from source/source.go
- Replace all alias usages with annotations.* references (348 changes in 28 files)
- Add TestMain to existing test files (service_test.go, cloudflare_test.go)

This change makes annotation initialization explicit and predictable,
avoiding hidden global state initialization at import time.

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: update changelog and mkdocs to include annotationPrefix and split horizon DNS

Signed-off-by: Aleksei Sviridkin <f@lex.la>

* docs(split-horizon): fix linting

Signed-off-by: Aleksei Sviridkin <f@lex.la>

* refactor(annotations): replace hardcoded annotation prefix with constant

Replace all hardcoded "external-dns.alpha.kubernetes.io/" strings
with annotations.DefaultAnnotationPrefix constant to establish
a single source of truth.

Changes:
- Add DefaultAnnotationPrefix constant in source/annotations/annotations.go
- Replace hardcoded string in controller/execute.go with constant reference
- Replace hardcoded strings in pkg/apis/externaldns/types.go (2 occurrences)
- Add helm unit tests for annotationPrefix value

This eliminates string duplication and makes future changes easier.

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Signed-off-by: Aleksei Sviridkin <f@lex.la>
Co-authored-by: Claude <noreply@anthropic.com>
2025-11-08 03:56:52 -08:00
Jan Jansen
8f34a87d18
feat(coredns): pass context to etcd client (#5915)
Signed-off-by: Jan Jansen <jan.jansen@gdata.de>
2025-10-24 01:07:35 -07:00
Edvin N
6e9d459d8d
fix: cloudflare softError failedZones (#5899)
Right now we get a fatal due to dual DNS records.
Instead do a softError and try again next reconcile.

Signed-off-by: Edvin Norling <edvin.norling@kognic.com>
2025-10-13 00:00:55 -07:00
vflaux
4ac0410d80
chore(cloudflare): migrate DeleteCustomHostname() to new lib (#5880) 2025-10-04 02:16:57 -07:00