Skip to content

Commit e27b47d

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

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
@@ -4023,6 +4023,9 @@ func (woc *wfOperationCtx) setStoredWfSpec(ctx context.Context) error {
40234023
wfutil.JoinWorkflowMetaData(&woc.wf.ObjectMeta, &wfDefault.ObjectMeta)
40244024
workflowTemplateSpec = wftHolder.GetWorkflowSpec()
40254025
}
4026+
if len(woc.execWf.Spec.PodSpecPatch) > 0 && woc.controller.Config.WorkflowRestrictions.MustNotChangeSpec() {
4027+
return fmt.Errorf("PodSpecPatch may not be setted during execution when the controller is set `templateReferencing: Secure`")
4028+
}
40264029
// Update the Entrypoint, ShutdownStrategy and Suspend
40274030
if woc.needsStoredWfSpecUpdate() {
40284031
// Join workflow, workflow template, and workflow default metadata to workflow spec.

0 commit comments

Comments
 (0)