1502 Commits

Author SHA1 Message Date
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
Pascal Bourdier
699e994a9c
ci(linter): add go-critic (#5875)
* ci: add go-critic linter

follow go-critic advices when possible

* docs: add a short description about go-critic
2025-10-01 09:06:19 -07:00
Andrew Hay
e22ceab66f
refactor(pihole): reduce cyclomatic complexity of TestProviderV6 (#5876)
* refactor(pihole): reduce cyclomatic complexity of TestProviderV6

* chore(pihole): increase coverage

* style: linting

* style: linting

* fix: remove coverage html
2025-10-01 00:50:23 -07:00
Nikhil
92cf223b69
feat(provider/cloudflare): add support for tags (#5862)
* feat(provider/cloudflare): Add support for Cloudflare Tags

Signed-off-by: nikhil-m_neteinc <nikhil.m@netenrich.com>

* fix/reconcile the tags

* fix/reconcile the tags

* fix(lint): Address code formatting issues

Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>

* test(provider/cloudflare): Add unit tests for tags feature

Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>

* test(provider/cloudflare): Edited the unit cases

Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>

* test(provider/cloudflare): Added the unit cases and created function for cloudflareTag

Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>

* update(provider/cloudflare): Updated the cloudflare tutorial document with cloudflare-tags

Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>

* update(provider/cloudflare): Updated the cloudflare tutorial document with cloudflare-tags

Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>

* ci: Trigger CI checks

* update(provider/cloudflare): Updated the cloudflare tutorial document

Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>

---------

Signed-off-by: nikhil-m_neteinc <nikhil.m@netenrich.com>
Signed-off-by: nkhl99 <nkhlkumar01@gmail.com>
2025-09-29 06:24:23 -07:00
Andrew Hay
c657f74ffc
refactor(pihole): reduce cyclomatic complexity of TestProvider (#5865)
* Refactor pihole tests to reduce cyclomatic complexity and preserve coverage

* refactor: split TestProvider into focused test functions to reduce cyclomatic complexity

- Split monolithic TestProvider into four focused test functions:
  - TestProvider_InitialState: tests empty provider state
  - TestProvider_CreateRecords: tests record creation
  - TestProvider_DeleteRecords: tests record deletion
  - TestProvider_UpdateRecords: tests record updates
- Each function tests a single scenario, reducing complexity
- Preserves all original test logic and maintains 89% coverage
- Passes cyclop linter with complexity threshold of 10
2025-09-25 10:06:20 -07:00
Kai Udo
fe753cb8e9
test(cloudflare): clear environment variables before setting test values (#5851)
* test(cloudflare): clear environment variables before setting test values

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

* refactor(cloudflare): extract environment variable names to package constants

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

* refactor(cloudflare): use testutils helper for test environment setup

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

* refactor(cloudflare): simplify token handling and improve test env setup

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

---------

Signed-off-by: u-kai <76635578+u-kai@users.noreply.github.com>
2025-09-22 05:10:17 -07:00
vflaux
f7793950cc
test(cloudflare): mock provider for cf change tests (#5852) 2025-09-20 02:26:13 -07:00
vflaux
69429a5e47
test(cloudflare): modernize zoneDomainFilter test (#5853) 2025-09-19 10:50:15 -07:00