-
Notifications
You must be signed in to change notification settings - Fork 34
491 lines (414 loc) · 17.9 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
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
name: Check changes to charts do not break user experience
# Only runs when charts have changed
# Test changes to charts against released images
# TODO: test if changes to kustomize have been replicated for charts
# NOTE: charts/controller is being tested in all of the http and grpc tests
on:
pull_request:
branches:
- master
paths:
- charts/**
# Kind versions used to test Iter8 on different versions of Kubernetes
# From: https://github.com/kubernetes-sigs/kind/releases
env:
versions: |
kindest/node:v1.28.0@sha256:b7a4cad12c197af3ba43202d3efe03246b3f0793f162afb40a33c923952d5b31
kindest/node:v1.27.3@sha256:3966ac761ae0136263ffdb6cfd4db23ef8a83cba8a463690e98317add2c9ba72
kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
kindest/node:v1.25.11@sha256:227fa11ce74ea76a0474eeefb84cb75d8dad1b08638371ecf0e86259b35be0c8
kindest/node:v1.24.15@sha256:7db4f8bea3e14b82d12e044e25e34bd53754b7f2b0e9d56df21774e6f66a70ab
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 }}
# TODO: add check to verify when a change is made to kustomize, a similar change is made to charts
http:
name: HTTP performance 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: Start kind cluster ${{ matrix.version }}
uses: helm/kind-action@v1.5.0
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create httpbin application
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: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
- name: Start performance test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm upgrade --install httpbin-test charts/iter8 \
--set "tasks={http}" \
--set http.url="http://httpbin.default/get" \
--set logLevel=trace
kubectl wait --for=condition=complete --timeout=180s job/httpbin-test-1-job
- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all
- name: View test logs and delete test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl logs -l iter8.tools/test=httpbin-test
helm delete httpbin-test
- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &
- name: Check GET /httpDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/httpDashboard?namespace=default&test=httpbin-test" -f
http-payload:
name: HTTP performance test with payload
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: Start kind cluster ${{ matrix.version }}
uses: helm/kind-action@v1.5.0
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create httpbin application
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: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
- name: Start performance test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm upgrade --install httpbin-test charts/iter8 \
--set "tasks={http}" \
--set http.url="http://httpbin.default/post" \
--set http.payloadStr=hello \
--set logLevel=trace
kubectl wait --for=condition=complete --timeout=180s job/httpbin-test-1-job
- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all
- name: View test logs and delete test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl logs -l iter8.tools/test=httpbin-test
helm delete httpbin-test
- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &
- name: Check GET /httpDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/httpDashboard?namespace=default&test=httpbin-test" -f
http-multiple:
name: HTTP performance test with multiple endpoints
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: Start kind cluster ${{ matrix.version }}
uses: helm/kind-action@v1.5.0
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create httpbin application
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: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
- name: Start performance test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm upgrade --install httpbin-test charts/iter8 \
--set "tasks={http}" \
--set http.endpoints.get.url=http://httpbin.default/get \
--set http.endpoints.getAnything.url=http://httpbin.default/anything \
--set http.endpoints.post.url=http://httpbin.default/post \
--set http.endpoints.post.payloadStr=hello \
--set logLevel=trace
kubectl wait --for=condition=complete --timeout=180s job/httpbin-test-1-job
- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all
- name: View test logs and delete test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl logs -l iter8.tools/test=httpbin-test
helm delete httpbin-test
- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &
- name: Check GET /httpDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/httpDashboard?namespace=default&test=httpbin-test" -f
grpc:
name: gRPC performance 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: Start kind cluster ${{ matrix.version }}
uses: helm/kind-action@v1.5.0
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create routeguide application
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl create deployment routeguide --image=golang --port=50051 \
-- bash -c "git clone -b v1.52.0 --depth 1 https://github.com/grpc/grpc-go; cd grpc-go/examples/route_guide; sed -i "''" "'"s/localhost//"'" server/server.go; go run server/server.go"
kubectl expose deployment routeguide --port=50051
kubectl wait --for=condition=available --timeout=60s deployment/routeguide
- name: Test gRPC service with grpcurl
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl -sO https://gist.githubusercontent.com/kalantar/510737f0fd58c0432a08e5b6e45ec97f/raw/524d6660284bf653ce0f29f3a25ed0e913c3df80/grpcurl-routeguide.yaml
kubectl apply -f grpcurl-routeguide.yaml
sleep 180
kubectl logs deploy/sleep
- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
- name: Start performance test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm upgrade --install routeguide-test charts/iter8 \
--set "tasks={ready,grpc}" \
--set ready.deploy=routeguide \
--set ready.service=routeguide \
--set ready.timeout=60s \
--set grpc.host=routeguide.default:50051 \
--set grpc.protoURL=https://raw.githubusercontent.com/grpc/grpc-go/v1.52.0/examples/route_guide/routeguide/route_guide.proto \
--set grpc.call=routeguide.RouteGuide.GetFeature \
--set grpc.dataURL=https://raw.githubusercontent.com/iter8-tools/docs/v0.13.13/samples/grpc-payload/unary.json \
--set logLevel=trace
kubectl wait --for=condition=complete --timeout=180s job/routeguide-test-1-job
- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all
- name: View test logs and delete test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl logs -l iter8.tools/test=routeguide-test
helm delete routeguide-test
- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &
- name: Check GET /grpcDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/grpcDashboard?namespace=default&test=routeguide-test" -f
grpc-multiple:
name: gRPC performance test with multiple endpoints
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: Start kind cluster ${{ matrix.version }}
uses: helm/kind-action@v1.5.0
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create routeguide application
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl create deployment routeguide --image=golang --port=50051 \
-- bash -c "git clone -b v1.52.0 --depth 1 https://github.com/grpc/grpc-go; cd grpc-go/examples/route_guide; sed -i "''" "'"s/localhost//"'" server/server.go; go run server/server.go"
kubectl expose deployment routeguide --port=50051
kubectl wait --for=condition=available --timeout=60s deployment/routeguide
- name: Test gRPC service with grpcurl
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl -sO https://gist.githubusercontent.com/kalantar/510737f0fd58c0432a08e5b6e45ec97f/raw/524d6660284bf653ce0f29f3a25ed0e913c3df80/grpcurl-routeguide.yaml
kubectl apply -f grpcurl-routeguide.yaml
sleep 180
kubectl logs deploy/sleep
- name: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
- name: Start performance test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm upgrade --install routeguide-test charts/iter8 \
--set "tasks={ready,grpc}" \
--set ready.deploy=routeguide \
--set ready.service=routeguide \
--set ready.timeout=60s \
--set grpc.host=routeguide.default:50051 \
--set grpc.protoURL=https://raw.githubusercontent.com/grpc/grpc-go/v1.52.0/examples/route_guide/routeguide/route_guide.proto \
--set grpc.endpoints.getFeature.call=routeguide.RouteGuide.GetFeature \
--set grpc.endpoints.getFeature.dataURL=https://raw.githubusercontent.com/iter8-tools/docs/v0.13.13/samples/grpc-payload/unary.json \
--set grpc.endpoints.listFeatures.call=routeguide.RouteGuide.ListFeatures \
--set grpc.endpoints.listFeatures.dataURL=https://raw.githubusercontent.com/iter8-tools/docs/v0.13.13/samples/grpc-payload/server.json \
--set logLevel=trace
kubectl wait --for=condition=complete --timeout=180s job/routeguide-test-1-job
- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all
- name: View test logs and delete test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl logs -l iter8.tools/test=routeguide-test
helm delete routeguide-test
- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &
- name: Check GET /grpcDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/grpcDashboard?namespace=default&test=routeguide-test" -f
grpc2:
name: gRPC performance test 2
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: Start kind cluster ${{ matrix.version }}
uses: helm/kind-action@v1.5.0
if: steps.modified-files.outputs.any_modified == 'true'
with:
wait: 300s
node_image: ${{ matrix.version }}
- name: Create hello application
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: Install controller
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm install iter8 charts/controller --set logLevel=trace
kubectl rollout status --watch --timeout=60s statefulset/iter8
- name: Start performance test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
helm upgrade --install hello-test 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 logLevel=trace
kubectl wait --for=condition=complete --timeout=180s job/hello-test-1-job
- name: Get Kubernetes status
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl get all
- name: View test logs and delete test
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl logs -l iter8.tools/test=hello-test
helm delete hello-test
- name: Expose metrics service
if: steps.modified-files.outputs.any_modified == 'true'
run: |
kubectl port-forward service/iter8 8080:8080 &
- name: Check GET /grpcDashboard
if: steps.modified-files.outputs.any_modified == 'true'
run: |
curl "http://localhost:8080/grpcDashboard?namespace=default&test=hello-test" -f