-
Notifications
You must be signed in to change notification settings - Fork 0
/
swoop-config.yml
169 lines (162 loc) · 4.38 KB
/
swoop-config.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
handlers:
argoHandler:
type: argoWorkflows
argoConf:
k8sOptions:
# relative paths must be relative to cwd of process when it runs
kubeconfig: ./kubeconfig.yaml
configOverrides:
context:
namespace: swoop-test-conductor-e2e
cirrusHandler:
type: cirrus
cirrusConf:
sqsUrl: https://sqs.aws.com/0142354653636::sqs::queue
noopHandler:
type: noop
parameters:
workflowUuid:
type: string
format: uuid
publishS3Handler:
type: synchttp
backoff:
retries: 10
seconds: 5
factor: 2
max: 25
parameters:
workflowName:
type: string
default: a_value
feature:
type: object
secrets:
# simplest approach for secret renewal is to have a ttl
# and periodically re-resolve the secret values, but does mean
# invalid secrets may be used for some time until the ttl expires
#
# how to handle secrets that need to resolve a token,
# have some other initialization step, or are of some built-in
# limited duration?
- name: user
type: file
path: /secrets-mount/username-secret
ttl: 1200
request:
url: https://{secrets.minio-user}:{secrets.minio-password}@our-minio:9000
method: POST
body: |
{
"fixed": "a_value",
"name": "{{ .parameters.workflowName -}}",
"date": "{{ .parameters.feature.properties.datetime -}}"
}
headers:
Authorization: "Basic {{ .secrets.user }} {{ .secrets.password}}"
Content-Type: "application/json"
X-Workflow-Name: "{{ .parameters.workflowName }}"
followRedirects: true
responses:
# first matched wins
# by default any 2xx is success and anything else will be retried
- statusCode: 400
message: ".*timed out.*"
result: error
- statusCode: 400
result: fatal
testCbHandler:
type: synchttp
parameters:
workflowName:
type: string
default: a_value
feature:
type: object
request:
url: http://localhost:{{ env "TEST_SERVER_PORT" }}
method: POST
body: |
{
"id": "{{ .uuid }}",
"fixed": "a_value",
"name": "{{ .parameters.workflowName -}}",
"date": "{{ .parameters.feature.properties.datetime -}}"
}
headers:
Content-Type: "application/json"
X-Workflow-Name: "{{ .parameters.workflowName }}"
followRedirects: true
responses:
- statusCode: 400
message: ".*timeout.*"
result: error
- statusCode: 404
result: fatal
conductors:
instance-a:
handlers:
- argoHandler
- testCbHandler
instance-b: {}
callbacks:
publishS3Push: &callbacksPublishS3Push
handler: publishS3Handler
type: perFeature
when:
- "successful"
featureFilter: "@.id =~ 'fake*' & @.properties.gsd <= 0"
parameters:
workflowName:
path: .input.features[0].id
feature:
value: { "feature": true }
enabled: true
workflows:
mirror:
description: "A workflow to copy STAC items into a local mirror"
version: 2
handler: argoHandler
argoOpts:
template: workflowtemplate/mirror-workflow
cacheKeyHashIncludes:
- .features[].id
- .features[].collection
cacheKeyHashExcludes: []
callbacks:
publishS3Push:
<<: *callbacksPublishS3Push
failed:
handler: noopHandler
type: single
when:
- "!successful"
parameters:
workflowUuid:
path: .workflow.uuid
cirrus-example:
callbacks:
publishS3Push:
<<: *callbacksPublishS3Push
when:
- "!failed"
- "successful"
title: "Cirrus example workflow"
description: "An example workflow config for a cirrus workflow"
version: 1
handler: cirrusHandler
cirrusOpts:
sfnArn: arn:aws:states:us-west-2:09876543210:stateMachine:cirrus-example
cacheKeyHashIncludes:
- .features[].id
- .features[].collection
cacheKeyHashExcludes: []
links:
- href: https://example.com/repo
rel: external
type: text/html
title: "source repository"
- href: https://example.com/docs
rel: external
type: text/html
title: "process documentation"