mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-09-26 17:51:13 +08:00
Merge pull request #953 from Vafilor/fix/workflow.volumes
fix: workflow volumes don't delete on failed workflow
This commit is contained in:
@@ -929,7 +929,14 @@ func (c *Client) CreateWorkflowExecution(namespace string, workflow *WorkflowExe
|
||||
return nil, fmt.Errorf("workflow Template contained more than 1 workflow execution")
|
||||
}
|
||||
|
||||
createdWorkflow, err := c.createWorkflow(namespace, workflowTemplate.ID, workflowTemplate.WorkflowTemplateVersionID, &workflows[0], opts, workflow.Labels)
|
||||
wf := &workflows[0]
|
||||
if wf.Spec.VolumeClaimGC == nil {
|
||||
wf.Spec.VolumeClaimGC = &wfv1.VolumeClaimGC{
|
||||
Strategy: wfv1.VolumeClaimGCOnCompletion,
|
||||
}
|
||||
}
|
||||
|
||||
createdWorkflow, err := c.createWorkflow(namespace, workflowTemplate.ID, workflowTemplate.WorkflowTemplateVersionID, wf, opts, workflow.Labels)
|
||||
if err != nil {
|
||||
log.WithFields(log.Fields{
|
||||
"Namespace": namespace,
|
||||
|
Reference in New Issue
Block a user