* refactore(controller): abstract things that should not be in controller
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactore(controller): abstract things that should not be in controller
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactore(controller): abstract things that should not be in controller
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactore(controller): abstract things that should not be in controller
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactore(controller): abstract things that should not be in controller
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactore(controller): abstract things that should not be in controller
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactore(controller): abstract things that should not be in controller
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to folders
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to its own packages
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to its own packages
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to packages
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to packages
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to folders
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to folders
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to folders
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to folders
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* Apply suggestions from code review
Co-authored-by: vflaux <38909103+vflaux@users.noreply.github.com>
* chore(registry): move registries to packages
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(registry): move registries to packages
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>
* 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>
* 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>
* refactor(source/wrappers): move wrappers away from
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(source/wrappers): move wrappers away from
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(source/wrappers): move wrappers away from
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* refactor(source/wrappers): move wrappers away from
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* Reintroduce base config for txt owner migration
# Conflicts:
# controller/execute.go
# registry/txt.go
# Conflicts:
# pkg/apis/externaldns/types.go
* Added label update logic and fixed existing tests
* Fixed existing declaration in tests, re introduced tests for new flag, regened flags.md from make
* Fixed tests logic and target expression evaluation, fixed update of label in the TXT registry process
* Set Old owner id var down the plan to calculate changes correctly
* Lint fixes
* (wip) Code cleaning and test coverage
* Simplified label overwriting on migration and implem tests for coverage
* Fix tests
* Update txt registry doc
* Fix rebase issues in txt test
* Update docs/registry/txt.md
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* Update docs/registry/txt.md
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* Update docs/registry/txt.md
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* Fix label overriding in TXT record generation when migration is enabled
* Make linter happy
* Regen flags, fix types tests after types updates
* Removed boolean flag that enabled migration, evaluate only against old owner flag instead
---------
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* feat(source): add min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source): add min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(source/min-ttl): added min-ttl support
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* feat(source): add min-ttl support
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* chore(source): reorganise sources and wrappers
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(source): reorganise sources and wrappers
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(source): reorganise sources and wrappers
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
- add flag to enable regional hostname feature
- support deletion of regional hostname on annotation edit
- correctly support differences detection with cloudflare state
- increased tests coverage
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* chore(codebase): reduce complexity and improve code coverage for controller/execute.go
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* apply suggestions from code review
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* chore(codebase): reduce complexity and improve code coverage for controller/execute.go
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(codebase): reduce complexity and improve code coverage for controller/execute.go
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* feat(controller): add more metrics for all supported endpoint types
* feat(controller): add cardinality and labels for records metrics
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(controller): add cardinality and labels for records metrics
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(controller): add cardinality and labels for records metrics
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(controller): add cardinality and labels for records metrics
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(controller): add cardinality and labels for records metrics
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(controller): add cardinality and labels for records metrics
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* feat(controller): add cardinality and labels for records metrics
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* feat(controller): add cardinality and labels for records metrics
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* fix rebase
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* fix(azure): Enhance retry logic using azure SDK
* Added the changes for flag based maxretries configuration
* Fixed types.go, flags.md and delected unneccesary comments
* Added the correct image for the Azure Private DNS tutorial
* Following the go naming convention for maxRetriesCount
* Added the correct flag information to the --azure-maxretries-count
* Made the required changes to accept the --azure-maxretries-count flag value from cli/env
* fix(plan): always use managed records
* robust random port in test
* use defaultconfig for managed-record-types
* be explicit about static variable
* fix wait
* re-order flags related to sources + dynamic managedrecordtype help
* fix flag doc
**Description**
In the command line arguments, we see `min-event-sync-interval` as
"The minimum interval between two consecutive synchronizations triggered from kubernetes events"
In the code, it actually acts a different way.
It imposes a certain dealy between syncs.
While this is compliant with the "minimum delay between 2 consecutive
synchronizations", it has side-effects in case of large delays.
In particular, when trying to fine-tune external-dns to match the
provider rate-limits.
In this case, it may be interesting to restrict the rate of reconciling
actions happening by having a high `min-event-sync-interval`, while
keeping a low latency for initial events.
This would allow to maximise the bulk effect of high change rate while
keeping fast enough reaction for isolated changes.
**Checklist**
- [X] Unit tests updated
- [X] End user documentation updated
> End user documentation matches the updated behaviour with more
> accuracy
Change-Id: Ibcea707974a095a2d5861a3974b4c79e5a15b00e