Skip to content

Commit

Permalink
fix: Fixed podName in killing daemon pods. Fixes #8692 (#8708)
Browse files Browse the repository at this point in the history
Signed-off-by: i342464 <[email protected]>
Signed-off-by: Saravanan Balasubramanian <[email protected]>
  • Loading branch information
KesavanKing authored and sarabala1979 committed Aug 8, 2022
1 parent 6ec0ca0 commit 15f9d52
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion workflow/controller/exec_control.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
"github.com/argoproj/argo-workflows/v3/workflow/common"
"github.com/argoproj/argo-workflows/v3/workflow/util"
)

// applyExecutionControl will ensure a pod's execution control annotation is up-to-date
Expand Down Expand Up @@ -101,7 +102,8 @@ func (woc *wfOperationCtx) killDaemonedChildren(nodeID string) {
if !childNode.IsDaemoned() {
continue
}
woc.controller.queuePodForCleanup(woc.wf.Namespace, childNode.ID, shutdownPod)
podName := util.PodName(woc.wf.Name, childNode.Name, childNode.TemplateName, childNode.ID, util.GetWorkflowPodNameVersion(woc.wf))
woc.controller.queuePodForCleanup(woc.wf.Namespace, podName, terminateContainers)
childNode.Phase = wfv1.NodeSucceeded
childNode.Daemoned = nil
woc.wf.Status.Nodes[childNode.ID] = childNode
Expand Down

0 comments on commit 15f9d52

Please sign in to comment.