Change:
} } <ins> func TestStatusNormalizeTimeStamp(t *testing.T) { pod := v1.Pod{ Spec: v1.PodSpec{}, } now := metav1.Now() podStatus := v1.PodStatus{ ContainerStatuses: []v1.ContainerStatus{ {State: v1.ContainerState{Running: &v1.ContainerStateRunning{StartedAt: now}}}, {State: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{StartedAt: now, FinishedAt: now}}}, }, InitContainerStatuses: []v1.ContainerStatus{ {State: v1.ContainerState{Running: &v1.ContainerStateRunning{StartedAt: now}}}, {State: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{StartedAt: now, FinishedAt: now}}}, }, EphemeralContainerStatuses: []v1.ContainerStatus{ {State: v1.ContainerState{Running: &v1.ContainerStateRunning{StartedAt: now}}}, {State: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{StartedAt: now, FinishedAt: now}}}, }, } expectedTime := now.DeepCopy().Rfc3339Copy() expectedPodStatus := v1.PodStatus{ ContainerStatuses: []v1.ContainerStatus{ {State: v1.ContainerState{Running: &v1.ContainerStateRunning{StartedAt: expectedTime}}}, {State: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{StartedAt: expectedTime, FinishedAt: expectedTime}}}, }, InitContainerStatuses: []v1.ContainerStatus{ {State: v1.ContainerState{Running: &v1.ContainerStateRunning{StartedAt: expectedTime}}}, {State: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{StartedAt: expectedTime, FinishedAt: expectedTime}}}, }, EphemeralContainerStatuses: []v1.ContainerStatus{ {State: v1.ContainerState{Running: &v1.ContainerStateRunning{StartedAt: expectedTime}}}, {State: v1.ContainerState{Terminated: &v1.ContainerStateTerminated{StartedAt: expectedTime, FinishedAt: expectedTime}}}, }, } normalizedStatus := normalizeStatus(&pod, &podStatus) if !isPodStatusByKubeletEqual(&expectedPodStatus, normalizedStatus) { t.Fatalf("The timestamp is not correctly converted to RFC3339 format.") } } </ins> func TestStaticPod(t *testing.T) { staticPod := getTestPod() staticPod.Annotations = map[string]string{kubetypes.ConfigSourceAnnotationKey: "file"}

Discussion:
is not normalized in in the status manager: This does not seem to cause any user facing problem because is sorted before passed to the status manager and timestamps are normalized at marshaling to create a patch: However, an unexpected behavior is caused internally because timestamps are not normalized. If the log verbosity is 3 or larger, the following messages are logged periodically in kubelet when an ephemeral container exists: This message is emitted here: After returns , is called. This does not look so harmful because gets eventually: API is called once unnecessarily in , though: It might be better to normalize ephemeral container statuses, at least timestamps, in the status manager to avoid this unexpected behavior. Set the log verbosity of kubelet to 3 or larger. Then, create an ephemeral container like . No response <details</details<detailsNone </details<details</details<details</details<details</details<details</details
/sig node
This is a bug. Can you submit a PR to fix it? If not, I'd be happy to work on it
If you are interested, please feel free to assign yourself.
thx
/assign
/triage accepted /priority important-longterm