From 0b5e45f1a03b71e9ba60ee3cd1b464ecf68a1d63 Mon Sep 17 00:00:00 2001 From: jswxstw Date: Sat, 4 May 2024 14:59:46 +0800 Subject: [PATCH] fix: Skip execution control for agent pod. Fixes #12726 Signed-off-by: jswxstw --- workflow/controller/exec_control.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/workflow/controller/exec_control.go b/workflow/controller/exec_control.go index a58ac0376776..b80ad92e8ea8 100644 --- a/workflow/controller/exec_control.go +++ b/workflow/controller/exec_control.go @@ -13,9 +13,9 @@ import ( ) // applyExecutionControl will ensure a pod's execution control annotation is up-to-date -// kills any pending and running pods when workflow has reached it's deadline +// kills any pending and running pods (except agent pod) when workflow has reached its deadline func (woc *wfOperationCtx) applyExecutionControl(pod *apiv1.Pod, wfNodesLock *sync.RWMutex) { - if pod == nil { + if pod == nil || woc.isAgentPod(pod) { return }