The Argo Workflow spec: CAPA practice questions
The spec of a Workflow is mostly a list of templates and the name of the entrypoint, the template that runs first. Around that core sit fields that shape the whole run, and reading a manifest quickly depends on knowing which level each field lives at.
By Ibrahim Yesilay · Published · Updated
Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.
What The Argo Workflow spec covers in CAPA
The spec of a Workflow is mostly a list of templates and the name of the entrypoint, the template that runs first. Around that core sit fields that shape the whole run, and reading a manifest quickly depends on knowing which level each field lives at.
spec.arguments holds the global inputs. Parameters declared there are readable in any template as {{workflow.parameters.name}}, and argo submit -p name=value overrides them at submit time without editing the file. Inside a template, inputs.parameters declares what that template expects and {{inputs.parameters.name}} reads it. A step passes values to a template through its own arguments block. Outputs work the same way in reverse: an output parameter takes its value from a file with valueFrom.path, and a script template's standard output appears as outputs.result. Workflow variables also expose run metadata, such as {{workflow.name}} and {{workflow.status}}.
Several spec fields set limits for the whole run. serviceAccountName chooses the service account for all of the workflow's Pods. activeDeadlineSeconds stops the workflow once it has run for that many seconds. parallelism caps how many Pods of this workflow run at once. ttlStrategy deletes the finished Workflow object after a delay that can depend on success or failure, and podGC deletes completed Pods, for example as soon as each one completes. volumeClaimTemplates asks the controller to create persistent volume claims when the run starts and delete them when it ends, which lets steps share a scratch volume.
onExit names an exit handler, a template that runs at the end of the workflow whatever the result was, and reads {{workflow.status}} to decide between cleanup and a failure notice. Lifecycle hooks extend the idea to individual steps or the whole workflow when a condition such as a phase change is met. Many fields also exist on a single template with a narrower scope: retryStrategy, activeDeadlineSeconds, parallelism and the template's own metadata. When a question shows a field, the first thing to settle is whether it sits under spec, which governs the whole run, or under one template, which governs only that task.
Key points
- spec.arguments parameters are global and read as {{workflow.parameters.name}}.
- activeDeadlineSeconds, parallelism and serviceAccountName at spec level apply to the whole run.
- ttlStrategy removes finished Workflow objects; podGC removes completed Pods.
- onExit runs its template after the workflow ends, whatever the outcome.
Three sample questions
13 CAPA questions on The Argo Workflow spec, 13 with explanations. How practice works
Question 1
outputs section?- A.To define the workflow's exit conditions, such as which phase triggers the onExit handler
- B.To declare the parameters and artifacts the template produces
- C.To configure output logging
- D.To set environment variables
Correct answer: B
outputs section declares the output parameters (for example from a file via valueFrom.path) and output artifacts it produces, so later steps or tasks can consume them. Why the other options are wrong. "To define the workflow's exit conditions, such as which...": exit handling is configured with the onExit field of the Workflow spec, not in outputs. "To configure output logging": logs are collected separately, and archived with archiveLogs. "To set environment variables": environment variables go in the container spec.Sources: Argo Workflows docs: Output Parameters, Argo Workflows docs: Artifacts
Question 2
- A.Using
when: "{{workflow.status}} == Failed"evaluated against the overall workflow result - B.Using
when: "{{steps.STEPNAME.status}} == Failed" - C.Using
if: failedon the step so it runs only after the preceding step has errored out - D.Using
condition: failed
Correct answer: B
when: "{{workflow.status}} == Failed" evaluated...": workflow.status is documented only in the exit-handler variable set and describes the whole workflow, not one earlier step. "Using if: failed on the step so it runs only after th...": the step spec has no if field; conditional execution is expressed with when. "Using condition: failed": condition is not a step field either; when is the documented conditional.Sources: Argo Workflows docs: Conditional Execution, Argo Workflows docs: Workflow Variables
Question 3
- A.
$(inputs.parameters.PARAM_NAME)as in Kubernetes command-argument expansion - B.
{{inputs.parameters.PARAM_NAME}} - C.
${inputs.parameters.PARAM_NAME}as used for shell variables in the container command - D.
%inputs.parameters.PARAM_NAME%
Correct answer: B
$(inputs.parameters.PARAM_NAME) as in Kubernetes comm...": Argo only interpolates {{ }} tags (simple tags or expression tags starting with {{=); the $(...) form is not a template tag. "${inputs.parameters.PARAM_NAME} as used for shell var...": ${...} is not an Argo template tag, so it would be left as literal text in the container args. "%inputs.parameters.PARAM_NAME%": %...% is not a template tag either; the only documented kinds are simple and expression tags in double braces.Sources: Argo Workflows docs: Workflow Variables, Argo Workflows docs: Parameters
Practice this topic
Focus mode keeps every question on The Argo Workflow spec until you leave it. 10 free guest answers, then a free account; no credit card.
Or open CAPA practice across all topics.
Sources
The explanation above was checked against these official documents.
- Argo Workflows docs: Core concepts (checked 2026-10-28)
- Argo Workflows docs: Field reference (checked 2026-10-28)
- Argo Workflows docs: Workflow variables (checked 2026-10-28)
- Argo Workflows docs: Output parameters (checked 2026-10-28)
- Argo Workflows docs: Exit handlers (checked 2026-10-28)
- Argo Workflows docs: Cost optimisation (checked 2026-10-28)