Addresses #5901
Related: #4056
Add clear documentation on annotation placement for Gateway API sources
to prevent confusion about which annotations go on Gateway vs Route resources.
Changes:
- Add Gateway API Annotation Placement section to annotations.md
- Add Annotations section with examples to gateway-api.md
- Include Cloudflare and AWS provider examples
- Document common mistakes
Per review feedback, compressed annotations.md section to minimal size:
- Removed annotation placement matrix table
- Removed YAML examples
- Kept concise 2-line summary
- Kept link to comprehensive documentation
Co-authored-by: Claude <noreply@anthropic.com>
Follow-up to #5889 discussion about documentation discoverability.
Add a new "Developer Documentation" section in CONTRIBUTING.md that
references the detailed developer guides in docs/contributing/.
This improves discoverability for contributors and helps avoid split-brain
when looking for development guidance.
Co-authored-by: Claude <noreply@anthropic.com>
* docs: clarify hostname annotation behavior
* docs: specify how hostname annotation behavior can be configured
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
---------
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* fix(txt-register): reset existingTXTs even when ApplyChanges is skipped to avoid stale TXT records
* test(txt-registry): add regression test to ensure TXT records are recreated after deletion
* chore: remove unintended blank line
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>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(controller-gen): move tools under go tools
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
---------
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>
* 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>
* chore(source/service): serviceTypeFilter edge case tests
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
* chore(source/service): serviceTypeFilter edge case tests
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>
* 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
* feat: reduce cyclomatic complexity of service_test
* style: indention added
* style: tab
* refactor: address PR feedback, improve tests, and reduce complexity
* fix(service): address PR feedback and fix linting
* Revert "fix(service): address PR feedback and fix linting"
This reverts commit 4cba488dc741ee1d946b105da952c09893c289c4.
* refactor: address all PR feedback - improve method naming, add test coverage, fix parameter ordering
* refactor: address latest PR feedback - convert to method, use testutils, add test coverage
* test: add coverage for pod hostname scenario
Addresses 4th to last PR comment about missing test coverage for
the case where pod.Spec.Hostname is set, which creates additional
headless domains (pod-specific hostname + base hostname)
* style: remove extra line
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* style: remove extra line
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
---------
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
* [endpoint] [source] Allow '.' in TXT Records
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
* pr feedback; lint fix
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
* using functional interfaces for future cleaners and validators of other record types
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
* Revert "using functional interfaces for future cleaners and validators of other record types"
This reverts commit d9e1c2c3810a40b2cce22f53d8ac86ba64b488e6.
---------
Signed-off-by: hfuss <hayden.fuss@kaleido.io>
* fix(aws): warn on TXT AccessDenied due to ABAC
ExternalDNS writes TXT ownership records. ABAC missing TXT can cause 403
AccessDenied from Route 53.
* Update AWS ABAC docs to include TXT in record types
* Log entries when AccessDenied occurs and batch contains TXT
* Added unit tests for AccessDenied detection, TXT detection and logging
Refs: #5773
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* fix(aws): Drop prescriptive IAM warning
* Return the first Route 53 error from `submitChanges` so operators see
the original AWS message
* Remove IAM-guessing branch while keeping split-and-retry submission
* Tidy error test and fall back to `provider.NewSoftErrorf` when no AWS
error was captured
* Add tests for error return on failures upon zone submission
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* fix(aws): Remove TXT-specific error handling
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* fix(aws): Remove Route53 final error message
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* fix(aws): Remove unused import of `error`
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
---------
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* feat(cli): add Cobra binder and backend switch
* add FlagBinder with Kingpin and Cobra implementations
* support --cli-backend and EXTERNAL_DNS_CLI (default: kingpin)
* add tests for binders and CLI switch
Refs: #5379
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* feat(cli): centralize flag registration and add Cobra parity
Started moving CLI flag registration into a common binder function,
avoiding duplication between Kingpin and Cobra.
Refs: #5820
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* feat(cli): enforce Cobra parity with Kingpin
* Add `regexpValue` and `RegexpVar` to Cobra binder with
`setRegexpDefault`
* Enforce `--provider` presence and validate against `providerNames
* require at least one `--source` and validate against new
`allowedSources`
* Expand tests for Kingpin and Cobra
Refs: #5379
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* feat(cli): Commit go-lint edits
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* feat(cli): add kingpin vs cobra binder parity
* Test parity assertion across binders
* Test Cobra-specific incapabilities (`--no-<flag>` and env vars)
* Deduplicate regexp flag handling
Refs: #5379
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* feat(cli): Rebuild flags documentation
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
---------
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>
* feat(source/f5-virtual-server): add host aliases support for Virtual Server source
* fix: markdown lint
* fix: markdown lint
* refactor(source/f5_virtualserver): remove if check for array length, already taken care of by the iterator
* 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>
* fix: debug message of FilterEndpointsByOwnerID in case owner label is missing
* more consistent messages
* add unit test for changed debug message
---------
Co-authored-by: Pascal Bachor <bachorp@users.noreply.github.com>
* add FlagBinder with Kingpin and Cobra implementations
* support --cli-backend and EXTERNAL_DNS_CLI (default: kingpin)
* add tests for binders and CLI switch
Refs: #5379
Signed-off-by: Tobias Harnickell <tobias.harnickell@bedag.ch>