mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 21:17:23 +00:00
fix kubectl describe static pod cann't get event messages
This commit is contained in:
parent
40c91a0951
commit
5efbdb02bf
@ -642,6 +642,9 @@ func (d *PodDescriber) Describe(namespace, name string, describerSettings descri
|
|||||||
klog.Errorf("Unable to construct reference to '%#v': %v", pod, err)
|
klog.Errorf("Unable to construct reference to '%#v': %v", pod, err)
|
||||||
} else {
|
} else {
|
||||||
ref.Kind = ""
|
ref.Kind = ""
|
||||||
|
if _, isMirrorPod := pod.Annotations[corev1.MirrorPodAnnotationKey]; isMirrorPod {
|
||||||
|
ref.UID = types.UID(pod.Annotations[corev1.MirrorPodAnnotationKey])
|
||||||
|
}
|
||||||
events, _ = d.Core().Events(namespace).Search(scheme.Scheme, ref)
|
events, _ = d.Core().Events(namespace).Search(scheme.Scheme, ref)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user