forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
output-artifact-gcs.yaml
39 lines (38 loc) · 1.61 KB
/
output-artifact-gcs.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# This is an example of a workflow producing a GCP Storage output artifact which is saved to a hard-wired
# location. This is useful for workflows which want to publish results to a well known or
# pre-determined location.
#
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: output-artifact-gcs-
spec:
entrypoint: whalesay
templates:
- name: whalesay
container:
image: docker/whalesay:latest
command: [sh, -c]
args: ["cowsay hello world | tee /tmp/hello_world.txt"]
outputs:
artifacts:
- name: message
path: /tmp
gcs:
bucket: my-bucket
# NOTE: by default, output artifacts are automatically tarred and gzipped before saving.
# As a best practice, .tgz or .tar.gz should be suffixed into the key name so the
# resulting object has an accurate file extension and mime-type. If archive is set to
# 'none', then preserve the appropriate file extension for the key name
key: path/in/bucket/hello_world.txt.tgz
# serviceAccountKeySecret is a secret selector.
# It references the k8s secret named 'my-gcs-credentials'.
# This secret is expected to have have the key 'serviceAccountKey',
# containing the base64 encoded Google Cloud Service Account Key (json)
# to the bucket.
#
# If it's running on GKE, and Workload Identity is used,
# serviceAccountKeySecret is not needed.
serviceAccountKeySecret:
name: my-gcs-credentials
key: serviceAccountKey