From 7d6d8f310ce57ae515b1580aa40cd8399eb37746 Mon Sep 17 00:00:00 2001 From: jswxstw Date: Thu, 28 Nov 2024 17:00:40 +0800 Subject: [PATCH] fix: Skip execution control for agent pod during pod reconciliation. Fixes #12726 (#12732) 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 b341fa343e2e..9866aedd6bbe 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 }