Skip to content

Commit ad227e0

Browse files
authored
docs: usage of podSpecPatch for large size artifacts Fixes argoproj#9525 (argoproj#9921)
Signed-off-by: awwwd <[email protected]>
1 parent e47db00 commit ad227e0

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

docs/walk-through/artifacts.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,31 @@ spec:
5757
The `whalesay` template uses the `cowsay` command to generate a file named `/tmp/hello-world.txt`. It then `outputs` this file as an artifact named `hello-art`. In general, the artifact's `path` may be a directory rather than just a file. The `print-message` template takes an input artifact named `message`, unpacks it at the `path` named `/tmp/message` and then prints the contents of `/tmp/message` using the `cat` command.
5858
The `artifact-example` template passes the `hello-art` artifact generated as an output of the `generate-artifact` step as the `message` input artifact to the `print-message` step. DAG templates use the tasks prefix to refer to another task, for example `{{tasks.generate-artifact.outputs.artifacts.hello-art}}`.
5959

60+
Optionally, for large artifacts, you can set `podSpecPatch` in the workflow spec to increase the resource request for the init container and avoid any Out of memory issues.
61+
62+
```yaml
63+
<... snipped ...>
64+
- name: large-artifact
65+
# below patch gets merged with the actual pod spec and increses the memory
66+
# request of the init container.
67+
podSpecPatch: |
68+
initContainers:
69+
- name: init
70+
resources:
71+
requests:
72+
memory: 2Gi
73+
cpu: 300m
74+
inputs:
75+
artifacts:
76+
- name: data
77+
path: /tmp/large-file
78+
container:
79+
image: alpine:latest
80+
command: [sh, -c]
81+
args: ["cat /tmp/large-file"]
82+
<... snipped ...>
83+
```
84+
6085
Artifacts are packaged as Tarballs and gzipped by default. You may customize this behavior by specifying an archive strategy, using the `archive` field. For example:
6186

6287
```yaml

0 commit comments

Comments
 (0)