diff --git a/pkg/kubelet/kubelet.go b/pkg/kubelet/kubelet.go index 4c82febb311..43e26b29d7d 100644 --- a/pkg/kubelet/kubelet.go +++ b/pkg/kubelet/kubelet.go @@ -1956,10 +1956,11 @@ func (kl *Kubelet) SyncPod(ctx context.Context, updateType kubetypes.SyncPodType } } - // TODO(#113606): connect this with the incoming context parameter, which comes from the pod worker. - // Currently, using that context causes test failures. To remove this todoCtx, any wait.Interrupted - // errors need to be filtered from result and bypass the reasonCache - cancelling the context for - // SyncPod is a known and deliberate error, not a generic error. + // TODO(#113606): use cancellation from the incoming context parameter, which comes from the pod worker. + // Currently, using cancellation from that context causes test failures. To remove this WithoutCancel, + // any wait.Interrupted errors need to be filtered from result and bypass the reasonCache - cancelling + // the context for SyncPod is a known and deliberate error, not a generic error. + // Use WithoutCancel instead of a new context.TODO() to propagate trace context // Call the container runtime's SyncPod callback sctx := context.WithoutCancel(ctx) result := kl.containerRuntime.SyncPod(sctx, pod, podStatus, pullSecrets, kl.backOff)