Currently the MongoDB Kubernetes Operator allows specification of annotations on services created by the operator, but only annotations with the same value across all services. The external-dns operator can create DNS names based on annotations on services. In order to support external-dns integration the MongoDB Kubernetes Operator would need to allow one to specify specific annotations for each generated service.
Current spec for external access services:
externalAccess:
externalService:
annotations:
# Same annotations will be applied on all services
You could consider a placeholder/substitution scheme like:
externalAccess:
externalService:
annotations:
external-dns.alpha.kubernetes.io/hostname: mydb-db-.mydns.com
Or some other way of assigning a per-service annotation that can be used by other operators such as external-dns.