Skip to content

Commit f98a5d6

Browse files
committed
fix(controller): podSpecPatch updates override the ref template in Secure mode
Signed-off-by: joey <[email protected]>
1 parent 683377c commit f98a5d6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

workflow/controller/operator.go

+3
Original file line numberDiff line numberDiff line change
@@ -4070,6 +4070,9 @@ func (woc *wfOperationCtx) setStoredWfSpec(ctx context.Context) error {
40704070
wfutil.JoinWorkflowMetaData(&woc.wf.ObjectMeta, &wfDefault.ObjectMeta)
40714071
workflowTemplateSpec = wftHolder.GetWorkflowSpec()
40724072
}
4073+
if len(woc.execWf.Spec.PodSpecPatch) > 0 && woc.controller.Config.WorkflowRestrictions.MustNotChangeSpec() {
4074+
return fmt.Errorf("PodSpecPatch may not be setted during execution when the controller is set `templateReferencing: Secure`")
4075+
}
40734076
// Update the Entrypoint, ShutdownStrategy and Suspend
40744077
if woc.needsStoredWfSpecUpdate() {
40754078
// Join workflow, workflow template, and workflow default metadata to workflow spec.

0 commit comments

Comments
 (0)