Skip to content

Commit

Permalink
fix: golbal parameters.
Browse files Browse the repository at this point in the history
Signed-off-by: shuangkun <[email protected]>
  • Loading branch information
shuangkun committed Nov 14, 2024
1 parent 4891935 commit ef43d74
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions workflow/controller/operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -655,12 +655,7 @@ func (woc *wfOperationCtx) setGlobalParameters(executionParameters wfv1.Argument
} else {
woc.globalParams["workflow.parameters."+param.Name] = cmValue
}
} else if param.Value != nil {
woc.globalParams["workflow.parameters."+param.Name] = param.Value.String()
} else {
return fmt.Errorf("either value or valueFrom must be specified in order to set global parameter %s", param.Name)
}
if param.ValueFrom != nil && param.ValueFrom.SecretKeyRef != nil {
} else if param.ValueFrom != nil && param.ValueFrom.SecretKeyRef != nil {
secretValue, err := common.GetSecretValue(woc.controller.secretInformer.GetIndexer(), woc.wf.ObjectMeta.Namespace, param.ValueFrom.SecretKeyRef.Name, param.ValueFrom.SecretKeyRef.Key)
if err != nil {
if param.ValueFrom.Default != nil {
Expand Down

0 comments on commit ef43d74

Please sign in to comment.