Kubernetes mirror pods (kube-apiserver, kube-controller-manager, kube-scheduler, kube-vip, etcd) don't use the same directory pattern for their log files. Regular kubernetes pods work with the structure /var/log/pods/*<pod uid>/<container name>/*.log, but mirror pods use the mirror hash in place of the pod uid. This fix should use the mirror hash if the annotation is available, otherwise it uses the pod uid.
Kubernetes mirror pods (kube-apiserver, kube-controller-manager, kube-scheduler, kube-vip, etcd) don't use the same directory pattern for their log files. Regular kubernetes pods work with the structure
/var/log/pods/*<pod uid>/<container name>/*.log
, but mirror pods use the mirror hash in place of the pod uid. This fix should use the mirror hash if the annotation is available, otherwise it uses the pod uid.