forked from argoproj/argo-workflows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinput-artifact-s3.yaml
46 lines (46 loc) · 2.08 KB
/
input-artifact-s3.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
40
41
42
43
44
45
46
# This example demonstrates the loading of a hard-wired input artifact from an S3 compliant
# store. This can be AWS S3, Google Cloud Storage (GCS) with interoperability enabled,
# or a self-hosted minio service. S3 guards access to buckets using an access key and
# secret key, which will be stored as regular Kubernetes secrets, and referenced in the
# workflow using secret selectors. To create the secret required for this example, first
# run the following command:
# $ kubectl create secret generic my-s3-credentials --from-literal=accessKey=<YOUR-ACCESS-KEY> --from-literal=secretKey=<YOUR-SECRET-KEY>
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: input-artifact-s3-
spec:
entrypoint: input-artifact-s3-example
templates:
- name: input-artifact-s3-example
inputs:
artifacts:
- name: my-art
path: /my-artifact
s3:
# Use the corresponding endpoint depending on your S3 provider:
# AWS: s3.amazonaws.com
# GCS: storage.googleapis.com
# Minio: my-minio-endpoint.default:9000
endpoint: s3.amazonaws.com
bucket: my-bucket-name
key: path/in/bucket
# Specify the bucket region. Note that if you want Argo to figure out this automatically,
# you can set additional statement policy that allows `s3:GetBucketLocation` action.
# For details, check out: https://argo-workflows.readthedocs.io/en/latest/configure-artifact-repository/#configuring-aws-s3
region: us-west-2
# accessKeySecret and secretKeySecret are secret selectors.
# It references the k8s secret named 'my-s3-credentials'.
# This secret is expected to have have the keys 'accessKey'
# and 'secretKey', containing the base64 encoded credentials
# to the bucket.
accessKeySecret:
name: my-s3-credentials
key: accessKey
secretKeySecret:
name: my-s3-credentials
key: secretKey
container:
image: debian:latest
command: [sh, -c]
args: ["ls -l /my-artifact"]