Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Include minimal reference for templating mechanism #4122

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
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
28 changes: 28 additions & 0 deletions docs/variables.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
# Workflow Variables

Some fields in a workflow specification allow for variable references which are automatically substituted by Argo.

??? note "How to use variables"
Variables are enclosed in curly braces and **must not** include whitespace.

``` yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: hello-world-parameters-
spec:
entrypoint: whalesay
arguments:
parameters:
- name: message
value: hello world
templates:
- name: whalesay
inputs:
parameters:
- name: message
container:
image: docker/whalesay
command: [cowsay]
# args: ["{{ inputs.parameters.message }}"] <- bad
args: ["{{inputs.parameters.message}}"] # good
```

The following variables are made available to reference various metadata of a workflow:

## All Templates
Expand Down
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ google_analytics:
markdown_extensions:
- codehilite
- admonition
- pymdownx.superfences
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this please?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems as if this is needed so that admonitions can render code blocks. (The ones enclosed in triple backticks, formally referred to as a "code fence")

- pymdownx.details
- toc:
permalink: true
nav:
Expand Down