-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathboutique.yaml
279 lines (269 loc) · 8.29 KB
/
boutique.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
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
name: boutique
namespace: default
spec:
components:
- name: frontend
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/frontend:v0.2.2
servicePort: 80
containerPort: 8080
env:
PORT: "8080"
PRODUCT_CATALOG_SERVICE_ADDR: "productcatalogservice:3550"
CURRENCY_SERVICE_ADDR: "currencyservice:7000"
CART_SERVICE_ADDR: "cartservice:7070"
RECOMMENDATION_SERVICE_ADDR: "recommendationservice:8080"
SHIPPING_SERVICE_ADDR: "shippingservice:50051"
CHECKOUT_SERVICE_ADDR: "checkoutservice:5050"
AD_SERVICE_ADDR: "adservice:9555"
cpu: "100m"
memory: "64Mi"
traits:
- type: patch-annotations
properties:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: "true"
- type: patch-http-probe
properties:
readinessProbe:
port: 8080
path: "/_healthz"
httpHeaders:
Cookie: "shop_session-id=x-readiness-probe"
livenessProbe:
port: 8080
path: "/_healthz"
httpHeaders:
Cookie: "shop_session-id=x-liveness-probe"
- type: patch-resources-limits
properties:
cpu: "200m"
memory: "128Mi"
- type: patch-loadbalancer
properties:
servicePort: 80
containerPort: 8080
- name: cartservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/cartservice:v0.2.2
servicePort: 7070
env:
REDIS_ADDR: "redis-cart:6379"
cpu: "200m"
memory: "64Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
cmd: ["/bin/grpc_health_probe", "-addr=:7070", "-rpc-timeout=5s"]
livenessProbe:
periodSeconds: 10
cmd: ["/bin/grpc_health_probe", "-addr=:7070", "-rpc-timeout=5s"]
- type: patch-resources-limits
properties:
cpu: "300m"
memory: "128Mi"
- name: currencyservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/currencyservice:v0.2.2
servicePort: 7000
env:
PORT: "7000"
cpu: "100m"
memory: "64Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
cmd: ["/bin/grpc_health_probe", "-addr=:7000"]
livenessProbe:
cmd: ["/bin/grpc_health_probe", "-addr=:7000"]
- type: patch-resources-limits
properties:
cpu: "200m"
memory: "128Mi"
- name: paymentservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/paymentservice:v0.2.2
servicePort: 50051
env:
PORT: "50051"
cpu: "100m"
memory: "64Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
cmd: ["/bin/grpc_health_probe", "-addr=:50051"]
livenessProbe:
cmd: ["/bin/grpc_health_probe", "-addr=:50051"]
- type: patch-resources-limits
properties:
cpu: "200m"
memory: "128Mi"
- name: shippingservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/shippingservice:v0.2.2
servicePort: 50051
env:
PORT: "50051"
cpu: "100m"
memory: "64Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
cmd: ["/bin/grpc_health_probe", "-addr=:50051"]
livenessProbe:
cmd: ["/bin/grpc_health_probe", "-addr=:50051"]
- type: patch-resources-limits
properties:
cpu: "200m"
memory: "128Mi"
- name: emailservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/emailservice:v0.2.2
servicePort: 5000
env:
PORT: "8080"
DISABLE_PROFILER: "1"
cpu: "100m"
memory: "64Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
periodSeconds: 5
cmd: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe:
periodSeconds: 5
cmd: ["/bin/grpc_health_probe", "-addr=:8080"]
- type: patch-resources-limits
properties:
cpu: "200m"
memory: "128Mi"
- name: checkoutservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/checkoutservice:v0.2.2
servicePort: 5050
env:
PORT: "5050"
PRODUCT_CATALOG_SERVICE_ADDR: "productcatalogservice:3550"
CURRENCY_SERVICE_ADDR: "currencyservice:7000"
CART_SERVICE_ADDR: "cartservice:7070"
SHIPPING_SERVICE_ADDR: "shippingservice:50051"
EMAIL_SERVICE_ADDR: "emailservice:5000"
PAYMENT_SERVICE_ADDR: "paymentservice:50051"
cpu: "100m"
memory: "64Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
periodSeconds: 5
cmd: ["/bin/grpc_health_probe", "-addr=:5050"]
livenessProbe:
periodSeconds: 5
cmd: ["/bin/grpc_health_probe", "-addr=:5050"]
- type: patch-resources-limits
properties:
cpu: "200m"
memory: "128Mi"
- name: recommendationservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/recommendationservice:v0.2.2
servicePort: 8080
env:
PORT: "8080"
PRODUCT_CATALOG_SERVICE_ADDR: "productcatalogservice:3550"
cpu: "100m"
memory: "64Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
periodSeconds: 5
cmd: ["/bin/grpc_health_probe", "-addr=:8080"]
livenessProbe:
periodSeconds: 5
cmd: ["/bin/grpc_health_probe", "-addr=:8080"]
- type: patch-resources-limits
properties:
cpu: "200m"
memory: "128Mi"
- name: adservice
type: microservice
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/adservice:v0.2.2
servicePort: 9555
env:
PORT: "9555"
cpu: "200m"
memory: "180Mi"
traits:
- type: patch-cmd-probe
properties:
readinessProbe:
periodSeconds: 15
cmd: ["/bin/grpc_health_probe", "-addr=:9555"]
livenessProbe:
periodSeconds: 15
cmd: ["/bin/grpc_health_probe", "-addr=:9555"]
- type: patch-resources-limits
properties:
cpu: "300m"
memory: "300Mi"
- name: loadgenerator
type: enhanced-worker
properties:
image: registry.cn-hangzhou.aliyuncs.com/vela-samples/loadgenerator:v0.2.2
env:
FRONTEND_ADDR: "frontend:80"
USERS: "10"
cpu: "300m"
memory: "256Mi"
traits:
- type: patch-resources-limits
properties:
cpu: "500m"
memory: "512Mi"
- name: redis-cart
type: microservice
properties:
image: redis:alpine
servicePort: 6379
cpu: "70m"
memory: "200Mi"
traits:
- type: patch-annotations
properties:
annotations:
sidecar.istio.io/rewriteAppHTTPProbers: "true"
- type: patch-tcp-probe
properties:
readinessProbe:
periodSeconds: 5
port: 6379
livenessProbe:
periodSeconds: 5
port: 6379
- type: patch-volume
properties:
volumeMounts:
- name: redis-data
path: "/data"
- type: patch-resources-limits
properties:
cpu: "125m"
memory: "256Mi"