18 Commits

Author SHA1 Message Date
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
Ivan Ka
4de8bd6fde
fix(endpoint): deduplicate targets (#5805)
* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

* fix(deduplicate): deduplicate targets

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-09-08 05:01:31 -07:00
Ivan Ka
22c709bace
chore(source/istio): replace kube API calls with caching and ingress informers (#5743)
* chore(source/istio): ingress to use informers instead of kube API calls

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

* chore(source/istio): ingress to use informers instead of kube API calls

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

* chore(source/istio): ingress to use informers instead of kube API calls

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

* chore(source/istio): ingress to use informers instead of kube API calls

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

* chore(source/istio): ingress to use informers instead of kube API calls

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

* chore(source/istio): ingress to use informers instead of kube API calls

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-08-19 09:33:38 -07:00
Ivan Ka
d2d2b40a96
refactor(source/istio): add transformers (#5728)
* chore(source/istio): added transfomrers

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

* chore(source/istio): added transfomrers

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

* chore(source/istio): added transfomrers

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

* chore(source/istio): added transfomrers

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-08-16 00:59:07 -07:00
Ivan Ka
74debed578
chore(github-actions): test execution with low resources (#5729)
* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

* chore(gihtub-actions): added test execution with low resources

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-08-14 00:55:09 -07:00
Ivan Ka
4a27943a34
chore(source/istio): added missing tests (#5715)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-08-05 14:45:24 -07:00
Ivan Ka
252a5e016c
feat(source/istio): support version 1.25+ (#5611)
* feat(source/istio): support version 1.22

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

* feat(source/istio): support version 1.22

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

* feat(source/istio): support version 1.22

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

* feat(source/istio): support version 1.22

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

* feat(source/istio): support version 1.22

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

* feat(source/istio): support version 1.22

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

* feat(source/istio): support version 1.22

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

* feat(source/istio): support version 1.25+

Co-authored-by: mthemis-provenir <168411899+mthemis-provenir@users.noreply.github.com>

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: mthemis-provenir <168411899+mthemis-provenir@users.noreply.github.com>
2025-07-07 10:19:28 -07:00
Ivan Ka
36e3e53190
perf(source): benchmarks on EndpointTargetsFromServices (#5536)
* chore(benchmarking): added benchmarks to EndpointTargetsFromServices

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

* chore(benchmarking): added benchmarks to EndpointTargetsFromServices

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

* chore(benchmarking): added benchmarks to EndpointTargetsFromServices

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

* chore(benchmarking): added benchmarks to EndpointTargetsFromServices

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

---------

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-06-19 15:31:00 -07:00
ivan katliarchuk
11fd3a87aa
chore(codebase): enable copyloopvar 2025-05-20 09:37:39 +01:00
Ivan Ka
ba64e8bb01
chore(deps): code cleanup, do not use pkg/errors (#5335)
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
2025-04-29 01:17:57 -07:00
Karsten Siemer
87a53778a8
fix(istio): support for ExternalIPs in Istio resources
 Add support for ExternalIPs in Istio Gateway and VirtualService
ℹ️ This commit extends Istio Gateway and VirtualService resources
to support ExternalIPs. The changes include:
- Checking if service has ExternalIPs defined
- If yes, adding them to the list of targets
- If not, continuing with the existing process

👌 Now you can have your Istio resources use `externalIPs` too! 🎉

Not to be `ip`-percritical, but don't we all love an `ip`grade! 🎈

Signed-off-by: Karsten Siemer <karsten.siemer@sda.se>
2023-12-06 08:52:35 +01:00
David Pait
bd989eeac4 fix imports 2023-08-09 08:35:00 -04:00
David Pait
0354d76ce0 add unit tests for gateway ingress source annotation 2023-08-08 11:51:42 -04:00
Michel Loiseleur
4da80b2ffb partial fix on istio 2023-06-19 10:06:05 +02:00
Michel Loiseleur
e06ed8cc5d build(deps): bump dev-dependencies group with 40 updates 2023-06-16 17:15:35 +02:00
John Gardiner Myers
06227c1fbf Make unit tests more strict about record type 2023-03-30 17:47:59 -07:00
Andrey Lebedev
4f41229820 Pass stop channel to informer factory instances 2022-01-22 21:31:29 +01:00
Andy Bursavich
5069c3f0fb source: name files consistently with their source name 2021-07-28 07:46:35 -07:00