Skip to content

chore(wrapper): centralized endpoint validation#6041

Merged
k8s-ci-robot merged 4 commits intokubernetes-sigs:masterfrom
gofogo:chore-validate-records
Dec 27, 2025
Merged

chore(wrapper): centralized endpoint validation#6041
k8s-ci-robot merged 4 commits intokubernetes-sigs:masterfrom
gofogo:chore-validate-records

Conversation

@ivankatliarchuk
Copy link
Copy Markdown
Member

@ivankatliarchuk ivankatliarchuk commented Dec 19, 2025

What does it do ?

We are adding support for more Record types across providers.
Examples

This change introduces a centralized endpoint target validation layer that is used by all code paths before creating DNS records. It extracts and unifies the logic that checks whether an endpoint target (such as an IP address or hostname) is valid, and then wraps provider calls so they all consistently apply these rules. As a result, any invalid or unsupported targets are filtered out early in one shared place instead of being handled (or forgotten) separately in each provider.

Behavior when new validation is added to CheckEndpoint

  • When new validation rules are added to CheckEndpoint, all providers that use this centralized check will automatically inherit the stricter or updated behavior without any provider‑specific changes.
  • Endpoints that fail the new validation will be uniformly rejected or filtered out before record creation, so the system’s behavior remains consistent and predictable as validation evolves.

Follow-up

  • add validation for other types A, AAAA, TXT, NAPTR and etc
    • default and potentially provider specific
  • add validation not just for targets, example dns namge length
  • review/refactor sliglhtly Endpoint validation framework

Motivation

Inconsysten behaviour accross providers with endpoint validation. This should filter out all the garbage and warn the users.

More

  • Yes, this PR title follows Conventional Commits
  • Yes, I added unit tests
  • Yes, I updated end user documentation accordingly

Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. source labels Dec 19, 2025
@k8s-ci-robot k8s-ci-robot requested a review from vflaux December 19, 2025 11:58
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 19, 2025
@ivankatliarchuk ivankatliarchuk marked this pull request as draft December 19, 2025 12:00
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2025
Signed-off-by: ivan katliarchuk <ivan.katliarchuk@gmail.com>
@ivankatliarchuk ivankatliarchuk marked this pull request as ready for review December 19, 2025 12:44
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Dec 19, 2025
@ivankatliarchuk ivankatliarchuk changed the title chore(wrapper): centralized endpoint target validation chore(wrapper): centralized endpoint validation Dec 19, 2025
@coveralls
Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 20370410050

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall first build on chore-validate-records at 78.701%

Totals Coverage Status
Change from base Build 20368853975: 78.7%
Covered Lines: 16025
Relevant Lines: 20362

💛 - Coveralls

Copy link
Copy Markdown
Collaborator

@mloiseleur mloiseleur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 27, 2025
@ivankatliarchuk
Copy link
Copy Markdown
Member Author

/approve

@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ivankatliarchuk

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 27, 2025
@k8s-ci-robot k8s-ci-robot merged commit b453ea1 into kubernetes-sigs:master Dec 27, 2025
18 checks passed
ivankatliarchuk added a commit to gofogo/k8s-sigs-external-dns-fork that referenced this pull request Dec 28, 2025
* master:
  somehow single test was not fixed (kubernetes-sigs#6059)
  refactore(registry): move registry selector to registry package (kubernetes-sigs#6047)
  fix(domain-exclusion): domain exclusion filter fix (kubernetes-sigs#6050)
  chore(wrapper): centralized endpoint validation (kubernetes-sigs#6041)
  test(coverage): improve code coverage for different files (kubernetes-sigs#6045)
  chore(lint): configure modernize linter (kubernetes-sigs#6035)
  docs(proposal): Gateway API annotation placement clarity proposal (kubernetes-sigs#5919)
  fix(scripts): helm plugins install disable verify (kubernetes-sigs#6057)
  feat(cli): remove cobra cli support (kubernetes-sigs#6034)
  fix(chart): ptsc indentation (kubernetes-sigs#6054)
  chore(deps): bump renovatebot/github-action (kubernetes-sigs#6051)
  feat(aws): enable support for NAPTR records (kubernetes-sigs#6022)
  refactor: extract normalizeDNSName to idna package for reuse (kubernetes-sigs#6043)
@ivankatliarchuk ivankatliarchuk deleted the chore-validate-records branch December 29, 2025 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants