Skip to content

Commit

Permalink
Signed-off-by: tooptoop4 <[email protected]>
Browse files Browse the repository at this point in the history
  • Loading branch information
tooptoop4 authored Oct 19, 2024
1 parent 81786e3 commit 83d37f0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions workflow/controller/workflowpod.go
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,23 @@ func (woc *wfOperationCtx) createWorkflowPod(ctx context.Context, nodeName strin
}
simplifiedTmpl.Container.VolumeMounts = filteredVolumeMounts
}
if simplifiedTmpl.Script != nil && simplifiedTmpl.Script.VolumeMounts != nil {
var filteredVolumeMountsScript []apiv1.VolumeMount
for _, mnt := range simplifiedTmpl.Script.VolumeMounts {
isConfigMapVolumeScript := false
for _, vol := range pod.Spec.Volumes {
if vol.Name == mnt.Name && vol.ConfigMap != nil && vol.Name != "argo-env-config" {
isConfigMapVolumeScript = true
break
}
}
if isConfigMapVolumeScript {
continue
}
filteredVolumeMountsScript = append(filteredVolumeMountsScript, mnt)
}
simplifiedTmpl.Script.VolumeMounts = filteredVolumeMountsScript
}

envVarTemplateValue := wfv1.MustMarshallJSON(simplifiedTmpl)

Expand Down

0 comments on commit 83d37f0

Please sign in to comment.