-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Alex Collins <alex_collins@intuit.com>
- Loading branch information
Showing
24 changed files
with
954 additions
and
548 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Templates | ||
|
||
See [core concepts](core-concepts.md) for DAG, steps, container templates. | ||
|
||
## Container Set Template | ||
|
||
See [container set template](container-set-template.md). | ||
|
||
## Inline Templates | ||
|
||
![alpha](assets/alpha.svg) | ||
|
||
> v3.2 and after | ||
You can inline other templates within DAG and steps. | ||
|
||
Examples: | ||
|
||
* [DAG](examples/dag-inline-workflow.yaml) | ||
* [Steps](examples/steps-inline-workflow.yaml) | ||
|
||
!!! Warning | ||
You can only inline once. Inlining a DAG within a DAG will not work. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: ClusterWorkflowTemplate | ||
metadata: | ||
name: dag-inline | ||
annotations: | ||
workflows.argoproj.io/description: | | ||
This examples demonstrates running a DAG with inline templates. | ||
workflows.argoproj.io/version: ">= 3.2.0" | ||
spec: | ||
entrypoint: main | ||
templates: | ||
- name: main | ||
dag: | ||
tasks: | ||
- name: a | ||
inline: | ||
container: | ||
image: argoproj/argosay:v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: CronWorkflow | ||
metadata: | ||
name: dag-inline | ||
annotations: | ||
workflows.argoproj.io/description: | | ||
This example demonstrates running cron workflow that has a DAG with inline templates. | ||
workflows.argoproj.io/version: ">= 3.2.0" | ||
spec: | ||
schedule: "*/5 * * * *" | ||
workflowSpec: | ||
workflowTemplateRef: | ||
name: dag-inline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: dag-inline- | ||
labels: | ||
workflows.argoproj.io/test: "true" | ||
annotations: | ||
workflows.argoproj.io/description: | | ||
This example demonstrates running a DAG with inline templates. | ||
workflows.argoproj.io/version: ">= 3.2.0" | ||
workflows.argoproj.io/verify.py: | | ||
assert status["phase"] == "Succeeded" | ||
spec: | ||
entrypoint: main | ||
templates: | ||
- name: main | ||
dag: | ||
tasks: | ||
- name: a | ||
inline: | ||
container: | ||
image: argoproj/argosay:v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: WorkflowTemplate | ||
metadata: | ||
name: dag-inline | ||
annotations: | ||
workflows.argoproj.io/description: | | ||
This example demonstrates running a DAG with inline templates. | ||
workflows.argoproj.io/version: ">= 3.2.0" | ||
spec: | ||
entrypoint: main | ||
templates: | ||
- name: main | ||
dag: | ||
tasks: | ||
- name: a | ||
inline: | ||
container: | ||
image: argoproj/argosay:v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: steps-inline- | ||
labels: | ||
workflows.argoproj.io/test: "true" | ||
annotations: | ||
workflows.argoproj.io/description: | | ||
This workflow demonstrates running a steps with inline templates. | ||
workflows.argoproj.io/version: ">= 3.2.0" | ||
workflows.argoproj.io/verify.py: | | ||
assert status["phase"] == "Succeeded" | ||
spec: | ||
entrypoint: main | ||
templates: | ||
- name: main | ||
steps: | ||
- - name: a | ||
inline: | ||
container: | ||
image: argoproj/argosay:v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2437,6 +2437,7 @@ spec: | |
- template | ||
type: object | ||
type: object | ||
inline: {} | ||
name: | ||
type: string | ||
onExit: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.