-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat: end to end testing with coredns provider #5933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: end to end testing with coredns provider #5933
Conversation
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
|
Skipping CI for Draft Pull Request. |
Pull Request Test Coverage Report for Build 19495451846Warning: 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
💛 - Coveralls |
|
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 💡 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 ? |
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
|
@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 🤔 |
|
I'm working to refactor this towards using etcd. |
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
|
@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 |
| # Test our DNS server with dig | ||
| echo "Testing DNS server with dig..." | ||
|
|
||
| # Create DNS test job that uses dig to query our DNS server |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
Signed-off-by: Raffaele Di Fazio <difazio.raffaele@gmail.com>
|
/lgtm |
Co-authored-by: Michel Loiseleur <97035654+mloiseleur@users.noreply.github.com>
mloiseleur
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
|
[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 |
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