From 7930c2db4c0088fe635366ccf77af958eaaf7c6e Mon Sep 17 00:00:00 2001 From: Jan Safranek Date: Tue, 23 Sep 2025 17:52:53 +0200 Subject: [PATCH] Fix SELinux e2e tests waiting for "container created" event A recent PR has changed the content of "Started container" event to "Container started". Instead of checking the exact event message, check the event source ("kubelet") and reason ("Started"), that should uniquely identify the event. --- test/e2e/storage/csimock/csi_selinux_mount.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/e2e/storage/csimock/csi_selinux_mount.go b/test/e2e/storage/csimock/csi_selinux_mount.go index 3a7045cbaf9..09470056c7c 100644 --- a/test/e2e/storage/csimock/csi_selinux_mount.go +++ b/test/e2e/storage/csimock/csi_selinux_mount.go @@ -353,7 +353,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount", func() { } else { // There is nothing blocking the second pod from starting, wait for the second pod to fullly start. reason = string(events.StartedContainer) - msg = "Started container" + msg = "" // the message has changed in Kubernetes 1.35, the Reason must be enough. } } eventSelector := fields.Set{ @@ -361,6 +361,7 @@ var _ = utils.SIGDescribe("CSI Mock selinux on mount", func() { "involvedObject.name": pod2.Name, "involvedObject.namespace": pod2.Namespace, "reason": reason, + "source": "kubelet", }.AsSelector().String() err = e2eevents.WaitTimeoutForEvent(ctx, m.cs, pod2.Namespace, eventSelector, msg, f.Timeouts.PodStart) framework.ExpectNoError(err, "waiting for event %q in the second test pod", msg)