Certified Argo Project Associate (CAPA) free question 2 / 10 · Domain 1: Argo Workflows
An engineer wants a Workflow whose whole spec comes from a stored WorkflowTemplate, and she also passes arguments in the new Workflow. What does the page, marked v2.9 and after, say happens to the arguments?
- The arguments passed to the created Workflow are merged with the WorkflowTemplate's arguments
- The arguments passed to the created Workflow replace the WorkflowTemplate's arguments
- The arguments passed to the created Workflow are ignored, and the WorkflowTemplate's arguments are used
- The arguments passed to the created Workflow are rejected, and workflowTemplateRef allows no arguments
Show the answer and explanation
Answer: A
Why this is correct
The Create Workflow from WorkflowTemplate Spec section, marked v2.9 and after, explains that a Workflow can be created from a WorkflowTemplate's spec using workflowTemplateRef. If you pass arguments to the created Workflow, they are merged with the arguments of the workflow template. The page shows one example that passes the entrypoint and arguments and one that uses the template's own entrypoint and arguments.
Why the other options are wrong
"The arguments passed to the created Workflow replace the WorkflowTemplate's arguments" … The page says they are merged, not that one set replaces the other.
"The arguments passed to the created Workflow are ignored, and the WorkflowTemplate's arguments are used" … Passed arguments are not ignored. The page says they are merged with the template's arguments.
"The arguments passed to the created Workflow are rejected, and workflowTemplateRef allows no arguments" … The page includes an example that refers to a WorkflowTemplate while passing the entrypoint and arguments.
Key points
workflowTemplateRef builds a whole Workflow from a template. templateRef is for calling one template from another.