-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
dnsmasq integration #194
dnsmasq integration #194
Conversation
Do you think this may also fix #195? |
@montanaflynn not sure, we need to replicate and test that separately after this pull request has been merged into master |
I've been unable to replicate it, maybe he could build the new version from source and test for us. |
This pull request is not finalized, I still need to implement some fixes. |
It looks ok so far, except minor things I'll probably update for the CLI.
On a side note: We need to use the spec_helper to pass directly through the DAO, and insert only the needed for the current tests at |
@@ -33,6 +33,9 @@ Faker.FIXTURES = { | |||
{ name = "API TESTS 6", public_dns = "cors1.com", target_url = "http://mockbin.com" }, | |||
{ name = "API TESTS 7", public_dns = "cors2.com", target_url = "http://mockbin.com" }, | |||
|
|||
{ name = "API TESTS 8 (dns)", public_dns = "dns1.com", target_url = "http://127.0.0.1:7771" }, | |||
{ name = "API TESTS 9 (dns)", public_dns = "dns2.com", target_url = "http://localhost:7771" }, |
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.
@thibaultcha did you mean like this? The name is unfortunate but I am testing DNS resolution so dns1.com
and dns2.com
make sense here.
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.
Yeah it's nice it's enough to know it's for the DNS. We'll move them out of the faker and to their own respective tests later.
@thibaultcha if it looks good I can merge |
I'm having an error when I try to run it:
|
@thibaultcha yes, I need to update the distributions but that is in another branch. The new distributions will include dnsmasq. Also I will need to update the website to list the new requirement, and to document a new configuration property |
Yeah makes sense, it's kinda late here lol, ok nothing to say otherwise, sounds good |
Adding some tests to increase the coverage, then I will merge. |
Related to Kong/docs.konghq.com@7c54540 |
dnsmasq integration
Co-authored-by: Renovate Bot <[email protected]>
This pull request fixes issue #182, #163 and #127.
The nginx
resolver
property specifies which DNS server nginx will use when resolving addresses.The problem with the resolver is that by design nginx doesn't follow the system settings including the
/etc/hosts
file. In order to have a proper DNS resolution that respects the system DNS settings a new dependency needs to be introduces: dnsmasq.dnsmasq is a DNS server that runs locally, can listen on a port (I decided to use
8053
for Kong), and can provide DNS resolution reading both/etc/hosts
file andresolv.conf
. It is the same dependency that we use for the official Kong Dockerfile (https://github.com/Mashape/docker-kong/blob/master/Dockerfile#L17).I have been searching for another solution but everybody seems to be using dnsmasq for this use-case.
So this now works, and if in the future a better way to handle this issue will be found, I will be more than happy to remove the dependency to dnsmasq (which works very well by the way).
I will also update the distributions in a future commit to include dnsmasq as a dependency.