-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Only create PTR records for endpoints with hostname defined #6623
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
Circleci k8s PTR tests need adjusted. |
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.
Aside from fixing tests it seems reasonable
State of the tests...
The latter 3 tests (4th-6th) pass because they are negative tests expecting NXDOMAINs. The 2nd and 3rd fail because they are explicitly defined Endpoints without hostname defined. The test uses explicitly defined Endpoints so that IPs for headless services are static. Hopefully we can explicitly define hostnames for these endpoints. I'll have to play with it. The test object creation yaml ... https://github.com/coredns/ci/blob/master/build/kubernetes/dns-test.yaml |
Adjusted tests: coredns/ci#153 |
Since with this change we will no longer produce PTR records that we did previously, I think we may want to defer this change to the next minor release - or make the next release a minor release (per coredns backward compatibility change policy). |
I've reverted the adjusted tests, since they don't work as expected. I suspect we may need to re-write all A/AAAA, SRV, and PTR tests for Headless Services to work with dynamically assigned Pod IP instead of relying on manually defined Endpoints. |
1. Why is this pull request needed and what does it do?
Per discussion in https://kubernetes.slack.com/archives/C09QYUH5W/p1713088975540039,
We should only be creating PTR records for Endpoints that have a hostname defined in the endpoint address object.
This should normally result in producing one PTR record for each IP, even if multiple Services select the same Pod. K8s enforces that only one endpoints has a hostname defined at any time. If for some reason more than one have hostname defined, we will return both rather than select one arbitrarily - but IIUC, this would only happen if something is awry in k8s.
2. Which issues (if any) are related?
https://kubernetes.slack.com/archives/C09QYUH5W/p1713088975540039
3. Which documentation changes (if any) need to be made?
4. Does this introduce a backward incompatible change or deprecation?