From ef43d747bfb854a06280006035aedcc28863bdb7 Mon Sep 17 00:00:00 2001 From: shuangkun Date: Thu, 14 Nov 2024 16:27:45 +0800 Subject: [PATCH] fix: golbal parameters. Signed-off-by: shuangkun --- workflow/controller/operator.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/workflow/controller/operator.go b/workflow/controller/operator.go index cd9aac28d526..69d8a895611e 100644 --- a/workflow/controller/operator.go +++ b/workflow/controller/operator.go @@ -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 {