Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/walk-through/parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,5 @@ spec:
```

In this workflow, both steps `A` and `B` would have the same log-level set to `INFO` and can easily be changed between workflow submissions using the `-p` flag.

`-p` is not restricted to the parameters a spec already lists. Any name you pass is added to `spec.arguments.parameters`, so a template can refer to `{{workflow.parameters.log-level}}` even when the workflow itself never declares `log-level`, as long as you supply a value every time you submit. If you forget one, submission fails validation with `failed to resolve {{workflow.parameters.log-level}}`, which is why declaring the parameter with a default is usually the better choice.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Outdated
2 changes: 2 additions & 0 deletions docs/workflow-templates.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,8 @@ If you need to submit a `WorkflowTemplate` as a `Workflow` with parameters:
argo submit --from workflowtemplate/workflow-template-submittable -p message=value1
```

The parameters you pass this way do not have to be declared by the `WorkflowTemplate`. A template may reference `{{workflow.parameters.<name>}}` for a parameter it never declares, and you supply the value when you submit it.

### `kubectl`

Using `kubectl apply -f` and `kubectl get wftmpl`
Expand Down