-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcite3.yml
555 lines (544 loc) · 10.8 KB
/
cite3.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
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
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
apiVersion: apps/v1
kind: Deployment
metadata:
name: search
spec:
selector:
matchLabels:
app: search
template:
metadata:
labels:
app: search
spec:
containers:
- name: search
image: ghcr.io/academey/distributed_tracing_shopping_mall-search:main
imagePullPolicy: Always
ports:
- containerPort: 8001
protocol: TCP
env:
- name: PRODUCT_PORT
value: "8007"
- name: PRODUCT_HOST
value: "product"
# livenessProbe:
# httpGet:
# path: /
# port: 8001
---
apiVersion: v1
kind: Service
metadata:
name: search
spec:
type: NodePort
ports:
- port: 8001
nodePort: 31001
protocol: TCP
selector:
app: search
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: purchase
spec:
selector:
matchLabels:
app: purchase
template:
metadata:
labels:
app: purchase
spec:
containers:
- name: purchase
image: ghcr.io/academey/distributed_tracing_shopping_mall-purchase:main
imagePullPolicy: Always
ports:
- containerPort: 8002
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: purchase
spec:
type: NodePort
ports:
- port: 8002
nodePort: 31002
protocol: TCP
selector:
app: purchase
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
selector:
matchLabels:
app: frontend
template:
metadata:
labels:
app: frontend
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: "true"
spec:
serviceAccountName: default
containers:
- name: server
image: ghcr.io/academey/distributed_tracing_shopping_mall-frontend:main
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: SEARCH_HOST
value: "http://search"
- name: SEARCH_PORT
value: "8001"
- name: PRODUCT_HOST
value: "http://product"
- name: PRODUCT_PORT
value: "8007"
- name: CART_HOST
value: "http://cart"
- name: CART_PORT
value: "8008"
- name: CHECKOUT_HOST
value: "http://checkout"
- name: CHECKOUT_PORT
value: "8009"
- name: AD_HOST
value: "http://ad"
- name: AD_PORT
value: "8003"
---
apiVersion: v1
kind: Service
metadata:
name: frontend
spec:
type: ClusterIP
selector:
app: frontend
ports:
- name: http
port: 3000
targetPort: 3000
---
apiVersion: v1
kind: Service
metadata:
name: frontend-external
spec:
type: LoadBalancer
selector:
app: frontend
ports:
- name: http
port: 3000
targetPort: 3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: loadgenerator
spec:
selector:
matchLabels:
app: loadgenerator
tier: app
version: v1
template:
metadata:
labels:
app: loadgenerator
tier: app
version: v1
spec:
containers:
- name: loadgenerator
image: ghcr.io/academey/distributed_tracing_shopping_mall-loadgenerator:main
imagePullPolicy: Always
env:
- name: GET_ALL_RPODUCT_ENDPOINT
value: "http://product:8007/product"
- name: SEARCH_PRODUCT_ENDPOINT
value: "http://search:8001/search"
- name: GET_ONE_PRODUCT_ENDPOINT
value: "http://product:8007/product/1"
- name: SEE_AD_ENDPOINT
value: "http://ad:8003/ad"
- name: ADD_PRODUCT_TO_CART_ENDPOINT
value: "http://cart:8008/cart_add/1"
- name: CHECKOUT_CART_ENDPOINT
value: "http://checkout:8009/checkout"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ad
spec:
selector:
matchLabels:
app: ad
template:
metadata:
labels:
app: ad
spec:
containers:
- name: ad
image: ghcr.io/academey/distributed_tracing_shopping_mall-ad:main
imagePullPolicy: Always
ports:
- containerPort: 8003
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: ad
spec:
type: NodePort
ports:
- port: 8003
nodePort: 31003
protocol: TCP
selector:
app: ad
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: cart
spec:
selector:
matchLabels:
app: cart
template:
metadata:
labels:
app: cart
spec:
containers:
- name: cart
image: ghcr.io/academey/distributed_tracing_shopping_mall-cart:main
imagePullPolicy: Always
ports:
- containerPort: 8008
protocol: TCP
env:
- name: PRODUCT_HOST
value: "product"
- name: PRODUCT_PORT
value: "8007"
# ---
# # error version cart
# apiVersion: apps/v1
# kind: Deployment
# metadata:
# name: cart-error-version
# spec:
# selector:
# matchLabels:
# app: cart
# replicas: 1
# template:
# metadata:
# labels:
# app: cart
# version: error
# spec:
# containers:
# - name: cart
# image: ghcr.io/academey/distributed_tracing_shopping_mall-cart:error
# imagePullPolicy: Always
# env:
# - name: PRODUCT_HOST
# value: "product"
# - name: PRODUCT_PORT
# value: "8007"
# ---
# apiVersion: networking.istio.io/v1alpha3
# kind: DestinationRule
# metadata:
# name: circuit-breaker-for-the-cart-service
# spec:
# host: cart.default.svc.cluster.local
# trafficPolicy:
# outlierDetection:
# maxEjectionPercent: 50
# consecutive5xxErrors: 2
# interval: 10s
# baseEjectionTime: 30s
# ---
---
apiVersion: v1
kind: Service
metadata:
name: cart
spec:
type: NodePort
ports:
- port: 8008
nodePort: 31008
protocol: TCP
selector:
app: cart
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: checkout
spec:
selector:
matchLabels:
app: checkout
template:
metadata:
labels:
app: checkout
spec:
containers:
- name: checkout
image: ghcr.io/academey/distributed_tracing_shopping_mall-checkout:main
imagePullPolicy: Always
ports:
- containerPort: 8009
protocol: TCP
env:
- name: PURCHASE_HOST
value: "purchase"
- name: PURCHASE_PORT
value: "8002"
- name: CART_HOST
value: "cart"
- name: CART_PORT
value: "8008"
- name: CURRENCY_HOST
value: "currency"
- name: CURRENCY_PORT
value: "8005"
- name: SHIPPING_HOST
value: "shipping"
- name: SHIPPING_PORT
value: "8006"
- name: INFO_HOST
value: "info"
- name: INFO_PORT
value: "8010"
---
apiVersion: v1
kind: Service
metadata:
name: checkout
spec:
type: NodePort
ports:
- port: 8009
nodePort: 31009
protocol: TCP
selector:
app: checkout
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: currency
spec:
selector:
matchLabels:
app: currency
template:
metadata:
labels:
app: currency
spec:
containers:
- name: currency
image: ghcr.io/academey/distributed_tracing_shopping_mall-currency:main
imagePullPolicy: Always
ports:
- containerPort: 8005
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: currency
spec:
type: NodePort
ports:
- port: 8005
nodePort: 31005
protocol: TCP
selector:
app: currency
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: email
spec:
selector:
matchLabels:
app: email
template:
metadata:
labels:
app: email
spec:
containers:
- name: email
image: ghcr.io/academey/distributed_tracing_shopping_mall-email:main
imagePullPolicy: Always
ports:
- containerPort: 8004
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: email
spec:
type: NodePort
ports:
- port: 8004
nodePort: 31004
protocol: TCP
selector:
app: email
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: product
spec:
selector:
matchLabels:
app: product
template:
metadata:
labels:
app: product
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8001"
prometheus.io/path: "/metrics"
kiali.io/dashboards: hj-custom
spec:
containers:
- name: product
image: ghcr.io/academey/distributed_tracing_shopping_mall-product:main
imagePullPolicy: Always
ports:
- containerPort: 8007
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: product
spec:
type: NodePort
ports:
- port: 8007
nodePort: 31007
protocol: TCP
selector:
app: product
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: shipping
spec:
selector:
matchLabels:
app: shipping
template:
metadata:
labels:
app: shipping
spec:
containers:
- name: shipping
image: ghcr.io/academey/distributed_tracing_shopping_mall-shipping:main
imagePullPolicy: Always
ports:
- containerPort: 8006
protocol: TCP
env:
- name: CART_HOST
value: "cart"
- name: CART_PORT
value: "8008"
- name: PRODUCT_HOST
value: "PRODUCT"
- name: PRODUCT_PORT
value: "8007"
---
apiVersion: v1
kind: Service
metadata:
name: shipping
spec:
type: NodePort
ports:
- port: 8006
nodePort: 31006
protocol: TCP
selector:
app: shipping
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: info
spec:
selector:
matchLabels:
app: info
template:
metadata:
labels:
app: info
annotations:
prometheus.io/scrape: "true"
prometheus.io/port: "8010"
prometheus.io/path: "/metrics"
kiali.io/dashboards: cite3-statistic
spec:
containers:
- name: info
image: ghcr.io/academey/distributed_tracing_shopping_mall-info:main
imagePullPolicy: Always
ports:
- containerPort: 8010
protocol: TCP
env:
- name: SHIPPING_HOST
value: "SHIPPING"
- name: SHIPPING_PORT
value: "8006"
---
apiVersion: v1
kind: Service
metadata:
name: info
spec:
type: NodePort
ports:
- port: 8010
nodePort: 31010
protocol: TCP
selector:
app: info
---