I have a controller using the kube crate that manages various worker resources (services/deployments). In those containers, I receive updates from the controller via a ConfigMap and make downstream requests to other Kubernetes services. As part of this, I do DNS queries, via the hickory-resolver crate, to resolve the IP of those down stream services. I'm concerned a bit about the DNS caching.
What event/resource do I need to subscribe to from the controller to initiate a dump the DNS cache in Hickory (it has a method off its resolver to do so)? Or am I over thinking this and the TTL will solve this for me?
.spec.clusterIPin the Service object, so if you're watching Services you can find out what names exist. There shouldn't be special DNS-caching considerations. Headless services might change their address sets more often (as member Pods come and go).