If there is no hostname entry on an endpoint of a headless service, a DNS record is created with a hostname part based on some sort of hash, ultimately derived from the pod ip:
https://github.com/kubernetes/dns/blob/master/pkg/dns/dns.go#L486
The PTR record is then explicitly not generated:
https://github.com/kubernetes/dns/blob/master/pkg/dns/dns.go#L503
The spec states:
Given a ready endpoint with hostname of <hostname> and IP address <a>.<b>.<c>.<d>, a PTR record of the following form must exist.
hostname is defined earlier as the value of the hostname field on the endpoint or a "unique, system-assigned identifier", which in this case is the hash generated on line 486.
I would expect either of the following:
- A PTR records is always generated, dropping the conditional on line 503, satisfying the spec.
- No DNS records are generated in these cases and the spec is updated to reflect this behaviour.
If there is no hostname entry on an endpoint of a headless service, a DNS record is created with a hostname part based on some sort of hash, ultimately derived from the pod ip:
https://github.com/kubernetes/dns/blob/master/pkg/dns/dns.go#L486
The PTR record is then explicitly not generated:
https://github.com/kubernetes/dns/blob/master/pkg/dns/dns.go#L503
The spec states:
hostname is defined earlier as the value of the hostname field on the endpoint or a "unique, system-assigned identifier", which in this case is the hash generated on line 486.
I would expect either of the following: