-
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.
Fix template.parallelism limiting parallelism of entire workflow (res…
…olves #772) Refactor operator to make template execution method signatures consistent
- Loading branch information
Showing
13 changed files
with
260 additions
and
164 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
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,63 @@ | ||
# Example with vertical and horizontal scalability | ||
# | ||
# Imagine we have 'M' workers which work in parallel, | ||
# each worker should performs 'N' loops sequentially | ||
# | ||
apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: parallelism-nested- | ||
spec: | ||
arguments: | ||
parameters: | ||
- name: seq-list | ||
value: | | ||
["a","b","c","d"] | ||
- name: parallel-list | ||
value: | | ||
[1,2,3,4] | ||
entrypoint: parallel-worker | ||
templates: | ||
- name: parallel-worker | ||
inputs: | ||
parameters: | ||
- name: seq-list | ||
- name: parallel-list | ||
steps: | ||
- - name: parallel-worker | ||
template: seq-worker | ||
arguments: | ||
parameters: | ||
- name: seq-list | ||
value: "{{inputs.parameters.seq-list}}" | ||
- name: parallel-id | ||
value: "{{item}}" | ||
withParam: "{{inputs.parameters.parallel-list}}" | ||
|
||
- name: seq-worker | ||
parallelism: 1 | ||
inputs: | ||
parameters: | ||
- name: seq-list | ||
- name: parallel-id | ||
steps: | ||
- - name: seq-step | ||
template: one-job | ||
arguments: | ||
parameters: | ||
- name: parallel-id | ||
value: "{{inputs.parameters.parallel-id}}" | ||
- name: seq-id | ||
value: "{{item}}" | ||
withParam: "{{inputs.parameters.seq-list}}" | ||
|
||
- name: one-job | ||
inputs: | ||
parameters: | ||
- name: seq-id | ||
- name: parallel-id | ||
container: | ||
image: alpine | ||
command: ['/bin/sh', '-c'] | ||
args: ["echo {{inputs.parameters.parallel-id}} {{inputs.parameters.seq-id}}; sleep 10"] |
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
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 @@ | ||
../../../examples/parallelism-nested.yaml |
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.