WIP: fix for issue 17790
As discussed in the kOps meeting yesterday, given a pod with HostNetwork and AnnotationNameDNSInternal we can use directly the pod IP to create the DNS names.
Once this patch is applied the dns-controller correctly creates DNS entries for kops-controller and api internal endpoints:
I1205 10:18:18.568880 1 dnscontroller.go:586] Adding DNS changes to batch {A kops-controller.internal.ernie.example.com.} [10.101.18.248 10.101.53.90 10.101.64.234]
I1205 10:18:18.568937 1 dnscontroller.go:586] Adding DNS changes to batch {A api.internal.ernie.example.com.} [10.101.18.248 10.101.53.90 10.101.64.234]
and
❯ kubectl get nodes -o wide | awk '/control/ {print $6}'
10.101.53.90
10.101.18.248
10.101.64.234
Ping @justinsb as requested
Hi @dezmodue. Thanks for your PR.
I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.
Once the patch is verified, the new status will be reflected by the ok-to-test label.
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-sigs/prow repository.
/ok-to-test /assign @justinsb
[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: Once this PR has been reviewed and has the lgtm label, please ask for approval from justinsb. For more information see the Code Review Process.
The full list of commands accepted by this bot can be found here.
Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment
Hi, I was wondering if the same issues are present for AnnotationNameDNSExternal as the dns-controller might create DNS entries that point to IPs that are associated with the node but not the pod itself (I cannot verify this).
I could extend the PR to adopt the same logic also for AnnotationNameDNSExternal if that makes sense.
@justinsb
We are running this fix in our clusters and we've seen no issues over the last couple weeks. The time for a node to join the cluster is now consistently and reliably around 1 minute while before it could take over 10 minutes in the worst cases.
@justinsb @hakman I added the suggested changes and some additional tests
- If the pod has a single IP just use that and avoid any calls to API
- Set record type correctly for IPv4 and IPv6