Skip to content

Commit

Permalink
fix(controller): podSpecPatch updates override the ref template in `S…
Browse files Browse the repository at this point in the history
…ecure` mode

Signed-off-by: joey <[email protected]>
  • Loading branch information
chengjoey committed Nov 16, 2024
1 parent 6da0ff8 commit e27b47d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -4023,6 +4023,9 @@ func (woc *wfOperationCtx) setStoredWfSpec(ctx context.Context) error {
wfutil.JoinWorkflowMetaData(&woc.wf.ObjectMeta, &wfDefault.ObjectMeta)
workflowTemplateSpec = wftHolder.GetWorkflowSpec()
}
if len(woc.execWf.Spec.PodSpecPatch) > 0 && woc.controller.Config.WorkflowRestrictions.MustNotChangeSpec() {
return fmt.Errorf("PodSpecPatch may not be setted during execution when the controller is set `templateReferencing: Secure`")
}
// Update the Entrypoint, ShutdownStrategy and Suspend
if woc.needsStoredWfSpecUpdate() {
// Join workflow, workflow template, and workflow default metadata to workflow spec.
Expand Down

0 comments on commit e27b47d

Please sign in to comment.