-
Notifications
You must be signed in to change notification settings - Fork 0
/
workflow-template.yaml
65 lines (64 loc) · 2.32 KB
/
workflow-template.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: publish-template
spec:
# Start of variable mappings
{{- $accessKeyIdSecretName := .Values.s3.accessKeyIdSecret.name -}}
{{- $accessKeyIdSecretKey := .Values.s3.accessKeyIdSecret.key -}}
{{- $secretAccessKeySecretName := .Values.s3.secretAccessKeySecret.name -}}
{{- $secretAccessKeySecretKey := .Values.s3.secretAccessKeySecret.key -}}
{{- $regionSecretName := .Values.s3.regionSecret.name -}}
{{- $regionSecretKey := .Values.s3.regionSecret.key -}}
{{- $sessionTokenSecretName := .Values.s3.sessionTokenSecret.name -}}
{{- $sessionTokenSecretKey := .Values.s3.sessionTokenSecret.key -}}
{{- $dataBucketSecretName := .Values.s3.dataBucketSecret.name -}}
{{- $dataBucketSecretKey := .Values.s3.dataBucketSecret.key -}}
{{- $serviceAccountName := .Values.publishTemplateTaskServiceAccountName -}}
# End of global variable mappings
serviceAccountName: {{ $serviceAccountName }}
templates:
- name: publish
inputs:
artifacts:
- name: input
path: /mnt/input.json
container:
env:
- name: AWS_ACCESS_KEY_ID
valueFrom:
secretKeyRef:
name: {{ $accessKeyIdSecretName }}
key: {{ $accessKeyIdSecretKey }}
- name: AWS_SECRET_ACCESS_KEY
valueFrom:
secretKeyRef:
name: {{ $secretAccessKeySecretName }}
key: {{ $secretAccessKeySecretKey }}
{{- if .Values.s3.region }}
- name: AWS_DEFAULT_REGION
valueFrom:
secretKeyRef:
name: {{ $regionSecretName }}
key: {{ $regionSecretKey }}
{{- end }}
{{- if .Values.s3.sessionToken }}
- name: AWS_SESSION_TOKEN
valueFrom:
secretKeyRef:
name: {{ $sessionTokenSecretName }}
key: {{ $sessionTokenSecretKey }}
{{- end }}
- name: SWOOP_DATA_BUCKET
valueFrom:
secretKeyRef:
name: {{ $dataBucketSecretName }}
key: {{ $dataBucketSecretKey }}
# should pin to a specific version or label here
image: quay.io/element84/publish-stac-task:latest
imagePullPolicy: IfNotPresent
args:
- run
- /mnt/input.json
- --output
- /mnt/output.json