Skip to content

Conversation

@Raffo
Copy link
Contributor

@Raffo Raffo commented Oct 31, 2025

What does it do ?

This pull request implements end to end testing by using the coredns provider. This is a much simpler approach than what I originally proposed with a custom provider.

Motivation

We have custom end-to-end testing infrastructure since almost the beginning of this project that I've been maintaining myself. That infrastructure has relied on an AWS account, and a private zone. Unfortunately, due to security requirements, I cannot make that infrastructure available to the bigger project, and that meant that I was always the bottleneck to run end to end tests. The motivation behind this work is to stop using that infrastructure and relying only on kind and local tests.

#5601

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

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
@k8s-ci-robot
Copy link
Contributor

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. provider Issues or PRs related to a provider labels Oct 31, 2025
@k8s-ci-robot k8s-ci-robot added scripts Issues or PRs related to internal scripts size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 31, 2025
@coveralls
Copy link

coveralls commented Oct 31, 2025

Pull Request Test Coverage Report for Build 19495451846

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 116 unchanged lines in 6 files lost coverage.
  • Overall coverage decreased (-0.008%) to 78.658%

Files with Coverage Reduction New Missed Lines %
openshift_route.go 1 79.49%
apis/externaldns/types.go 1 99.71%
source.go 3 83.33%
istio_gateway.go 8 90.1%
gloo_proxy.go 47 74.18%
execute.go 56 64.72%
Totals Coverage Status
Change from base Build 18968339179: -0.008%
Covered Lines: 15951
Relevant Lines: 20279

💛 - Coveralls

@mloiseleur
Copy link
Collaborator

mloiseleur commented Nov 5, 2025

For the feature, it would really help and improve quality to have CI like this 👍 .

For the implementation choice, I'm still unsure 🤔.

✔️ On one hand, having a small custom DNS implementation allows behavior flexibility and speed
❌ on the other hand, it will require us to implement every new feature we want to add in e2e testing and we may miss some specific details that will be in standard implementation.

💡 It remembers me that I've opened a PR about documenting usage of coredns for local dev testing (#5887).

@Raffo Did you consider using coredns as an option for the implementation ?

Raffo and others added 2 commits November 8, 2025 18:03
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
@Raffo
Copy link
Contributor Author

Raffo commented Nov 8, 2025

@mloiseleur Yes, I considered it. Unfortunately coreDNS doesn't really work. It re needs a whole etcd server up and running. And that sounded more complicated than what we wanted to do. Remind that we're not testing a provider, any provider, not the coredns provider, not this fake provider, but we're testing the core of the project like the image can start and the plan works and and so on. Happy to change, but currently a bit unsure of the benefits as well 🤔

@Raffo
Copy link
Contributor Author

Raffo commented Nov 14, 2025

I'm working to refactor this towards using etcd.

Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
@k8s-ci-robot k8s-ci-robot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Nov 15, 2025
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
@Raffo Raffo changed the title feat: end to end testing with local provider implementation feat: end to end testing with coredns provider Nov 15, 2025
@Raffo
Copy link
Contributor Author

Raffo commented Nov 15, 2025

@mloiseleur ok update this test to not have a custom provider and rely entirely on the coredns one. This a much simpler approach and I wish I did it from the beginning. Nonetheless, I'm quite happy with it. You can see the run of the tests here: https://github.com/Raffo/external-dns/actions/runs/19392854519/job/55488802798

@Raffo Raffo marked this pull request as ready for review November 15, 2025 17:41
@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 Nov 15, 2025
# Test our DNS server with dig
echo "Testing DNS server with dig..."

# Create DNS test job that uses dig to query our DNS server
Copy link
Collaborator

Choose a reason for hiding this comment

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

@Raffo Wdyt about requesting coredns directly ?
It can be done either by exposing coredns port like exposed in kind documentation, or even via port-forward ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But we are essentially asking coredns, just by using hostnetwork and the direct port. I think that is not a bad hack as it relies on dig directly which seems quite fine as a contract.

Raffo and others added 2 commits November 17, 2025 10:37
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Nov 17, 2025
@szuecs
Copy link
Contributor

szuecs commented Nov 18, 2025

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 18, 2025
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 19, 2025
Copy link
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 Nov 19, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mloiseleur

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

The pull request process is described here

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 Nov 19, 2025
@k8s-ci-robot k8s-ci-robot merged commit cfe7481 into kubernetes-sigs:master Nov 19, 2025
18 checks passed
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. provider Issues or PRs related to a provider scripts Issues or PRs related to internal scripts size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants