diff --git a/pkg/pod/status.go b/pkg/pod/status.go index 08899729c35..59a18db7414 100644 --- a/pkg/pod/status.go +++ b/pkg/pod/status.go @@ -633,7 +633,9 @@ func areContainersCompleted(ctx context.Context, pod *corev1.Pod) bool { if config.FromContextOrDefaults(ctx).FeatureFlags.ResultExtractionMethod == config.ResultExtractionMethodSidecarLogs { // If we are using sidecar logs to extract results, we need to wait for the sidecar to complete. // Avoid failing to obtain the final result from the sidecar because the sidecar is not yet complete. - nameFilters = append(nameFilters, IsContainerSidecar) + nameFilters = append(nameFilters, func(name string) bool { + return name == pipeline.ReservedResultsSidecarContainerName + }) } return checkContainersCompleted(pod, nameFilters) }