-
Notifications
You must be signed in to change notification settings - Fork 34
351 lines (300 loc) · 11.7 KB
/
testcharts.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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
name: Tests to ensure that changes to charts do not break user experience
on:
pull_request:
branches:
- master
# Kind versions used to test Iter8 on different versions of Kubernetes
# From: https://github.com/kubernetes-sigs/kind/releases
env:
versions: |
kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f
kindest/node:v1.25.8@sha256:00d3f5314cc35327706776e95b2f8e504198ce59ac545d0200a89e69fce10b7f
kindest/node:v1.24.12@sha256:1e12918b8bc3d4253bc08f640a231bb0d3b2c5a9b28aa3f2ca1aee93e1e8db16
kindest/node:v1.23.17@sha256:e5fd1d9cd7a9a50939f9c005684df5a6d145e8d695e78463637b79464292e66c
kindest/node:v1.22.17@sha256:c8a828709a53c25cbdc0790c8afe12f25538617c7be879083248981945c38693
kindest/node:v1.21.14@sha256:27ef72ea623ee879a25fe6f9982690a3e370c68286f4356bf643467c552a3888
kindest/node:v1.27.1@sha256:9915f5629ef4d29f35b478e819249e89cfaffcbfeebda4324e5c01d53d937b09
kindest/node:v1.27.0@sha256:c6b22e613523b1af67d4bc8a0c38a4c3ea3a2b8fbc5b367ae36345c9cb844518
jobs:
# Get the different Kind versions
get_versions:
runs-on: ubuntu-latest
steps:
- name: Get the different Kind versions
id: set-matrix
run: |
# Serialize versions into JSON array
jsonVersions=$(jq -ncR '[inputs]' <<< "$versions")
echo $jsonVersions
# Output serialized jsonVersions
echo "matrix=$jsonVersions" | sed -e "s/,\"\"//" >> $GITHUB_OUTPUT
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
http-experiment:
name: HTTP load test
needs: get_versions
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.get_versions.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8
- name: Install Iter8
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
- name: Start kind cluster ${{ matrix.version }}
uses: helm/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create app
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl create deployment httpbin --image=kennethreitz/httpbin
kubectl expose deployment httpbin --type=ClusterIP --port=80
kubectl wait --for=condition=available --timeout=60s deploy/httpbin
- name: iter8 k launch
if: steps.modified-files.outputs.any_modified == 'true'
run: |
iter8 k launch \
--localChart \
--chartName charts/iter8 \
--set tasks={http} \
--set http.url="http://httpbin.default/get" \
--set runner=job
- name: Try other iter8 k commands
if: steps.modified-files.outputs.any_modified == 'true'
run: |
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k report
iter8 k log
iter8 k delete
http-looped-experiment:
name: HTTP looped load test
needs: get_versions
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.get_versions.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8
- name: Install Iter8
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
- name: Start kind cluster ${{ matrix.version }}
uses: helm/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create app
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl create deployment httpbin --image=kennethreitz/httpbin
kubectl expose deployment httpbin --type=ClusterIP --port=80
kubectl wait --for=condition=available --timeout=60s deploy/httpbin
- name: iter8 k launch
if: steps.modified-files.outputs.any_modified == 'true'
run: |
iter8 k launch \
--localChart \
--chartName charts/iter8 \
--set tasks={http} \
--set http.url="http://httpbin.default/get" \
--set runner=cronjob \
--set cronjobSchedule="*/1 * * * *"
- name: Try other iter8 k commands
if: steps.modified-files.outputs.any_modified == 'true'
run: |
sleep 120
iter8 k assert -c nofailure --timeout 60s
iter8 k report
iter8 k log
iter8 k delete
grpc-experiment:
name: gRPC load test
needs: get_versions
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.get_versions.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8
- name: Install Iter8
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
- name: Start kind cluster ${{ matrix.version }}
uses: helm/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create app
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051
kubectl expose deploy hello --port=50051
kubectl wait --for=condition=available --timeout=60s deploy/hello
- name: iter8 k launch
if: steps.modified-files.outputs.any_modified == 'true'
run: |
iter8 k launch \
--localChart \
--chartName charts/iter8 \
--set tasks={grpc} \
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set runner=job
- name: Try other iter8 k commands
if: steps.modified-files.outputs.any_modified == 'true'
run: |
iter8 k assert -c completed -c nofailure --timeout 60s
iter8 k report
iter8 k log
iter8 k delete
grpc-looped-experiment:
name: gRPC looped load test
needs: get_versions
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.get_versions.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/iter8 folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/iter8
- name: Install Iter8
run: GOBIN=/usr/local/bin go install github.com/iter8-tools/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
- name: Start kind cluster ${{ matrix.version }}
uses: helm/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create app
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl create deploy hello --image=docker.io/grpc/java-example-hostname:latest --port=50051
kubectl expose deploy hello --port=50051
kubectl wait --for=condition=available --timeout=60s deploy/hello
- name: iter8 k launch
if: steps.modified-files.outputs.any_modified == 'true'
run: |
iter8 k launch \
--localChart \
--chartName charts/iter8 \
--set tasks={grpc} \
--set grpc.host="hello.default:50051" \
--set grpc.call="helloworld.Greeter.SayHello" \
--set grpc.protoURL="https://raw.githubusercontent.com/grpc/grpc-go/master/examples/helloworld/helloworld/helloworld.proto" \
--set runner=cronjob \
--set cronjobSchedule="*/1 * * * *"
- name: Try other iter8 k commands
if: steps.modified-files.outputs.any_modified == 'true'
run: |
sleep 120
iter8 k assert -c nofailure --timeout 60s
iter8 k report
iter8 k log
iter8 k delete
autox:
name: AutoX test
needs: get_versions
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.get_versions.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/autox folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/autox
- name: Start kind cluster ${{ matrix.version }}
uses: helm/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create namespace
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl create namespace argocd
- name: Start AutoX controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install autox charts/autox \
--set 'groups.httpbin.trigger.name=httpbin' \
--set 'groups.httpbin.trigger.namespace=default' \
--set 'groups.httpbin.trigger.group=apps' \
--set 'groups.httpbin.trigger.version=v1' \
--set 'groups.httpbin.trigger.resource=deployments' \
--set 'groups.httpbin.specs.iter8.name=iter8' \
--set 'groups.httpbin.specs.iter8.values.tasks={ready,http,assess}' \
--set 'groups.httpbin.specs.iter8.values.ready.deploy=httpbin' \
--set 'groups.httpbin.specs.iter8.values.ready.service=httpbin' \
--set 'groups.httpbin.specs.iter8.values.ready.timeout=60s' \
--set 'groups.httpbin.specs.iter8.values.http.url=http://httpbin.default/get' \
--set 'groups.httpbin.specs.iter8.values.assess.SLOs.upper.http/error-count=0' \
--set 'groups.httpbin.specs.iter8.values.assess.SLOs.upper.http/latency-mean=50' \
--set 'groups.httpbin.specs.iter8.version=0.15.0' \
--set 'groups.httpbin.specs.iter8.values.runner=job'
- name: Check AutoX controller
if: steps.modified-files.outputs.any_modified == 'true'
run: kubectl wait --for=condition=available --timeout=60s deploy/autox -n argocd
traffic:
name: Traffic test
needs: get_versions
runs-on: ubuntu-latest
strategy:
matrix:
version: ${{ fromJson(needs.get_versions.outputs.matrix) }}
steps:
- name: Check out code
uses: actions/checkout@v3
- name: Get modified files in the charts/traffic folder
id: modified-files
uses: tj-actions/changed-files@v35
with:
files: charts/traffic
- name: Start kind cluster ${{ matrix.version }}
uses: helm/[email protected]
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Start traffic
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install traffic charts/traffic -f charts/traffic/testdata/values.yaml
- name: Check traffic
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl rollout status --watch --timeout=60s statefulset.apps/traffic