-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Add nodeLocalDNSCache.kubeDnsOnly option #10111
Add nodeLocalDNSCache.kubeDnsOnly option #10111
Conversation
Welcome @javipolo! |
Hi @javipolo. Thanks for your PR. I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
c11b549
to
4aaaa65
Compare
05f9582
to
460150b
Compare
@olemarkus I did the proposed changes 👍 |
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.
Go convention is to have acronyms in all-caps.
/ok-to-test |
@johngmyers Not quite sure the field name is appropriate. Any thoughts? |
You have a point. It's more like |
460150b
to
52826f3
Compare
I saw "Dns" somewhere in the code so I thought it was OK Here's the new PR |
52826f3
to
c2684bc
Compare
/lgtm |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: javipolo, johngmyers 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 |
Thanks for the work Javi and folks |
Add a kubeDnsOnly option for nodeLocalDNScache
Add ability to use kube-dns as upstream on node-local-dns, instead of using systems default in resolv.conf
With this flag enabled, even if we use the node-local-dns to cache responses, we use as upstream the main kube-dns server for all types of requests, and not only the ones of *.cluster.local
This way we can customize the main kube-dns for external domains and make this changes also effective to the node-local-dns nodes
Example use case
In our case, we're using rewrites on coredns to easily route some requests to internal services without exiting the cluster, and without modifying the application. With this flag we can keep this behaviour and still use node-local-dns:
A dns request of
queue.myapp.com
to coredns will return the internal IP address of the servicequeue-system
inmyapp
namespaceSo far when enabling node-local-dns in kops this behaviour dissapeared and
queue.myapp.com
was resolving to an external internet IP address.With this patch we can decide if to route all traffic to internal kube-dns, or keep the actual behaviour