This repository has been archived by the owner on Jul 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 276
/
bookstore-v2.yaml
83 lines (77 loc) · 1.59 KB
/
bookstore-v2.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
# Create bookstore-v2 Service
apiVersion: v1
kind: Service
metadata:
name: bookstore-v2
namespace: bookstore
labels:
app: bookstore-v2
spec:
ports:
- port: 14001
name: bookstore-port
selector:
app: bookstore-v2
---
# Create bookstore-v2 Service Account
apiVersion: v1
kind: ServiceAccount
metadata:
name: bookstore-v2
namespace: bookstore
---
# Create bookstore-v2 Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: bookstore-v2
namespace: bookstore
spec:
replicas: 1
selector:
matchLabels:
app: bookstore-v2
template:
metadata:
labels:
app: bookstore-v2
spec:
serviceAccountName: bookstore-v2
nodeSelector:
kubernetes.io/arch: amd64
kubernetes.io/os: linux
containers:
- name: bookstore
image: openservicemesh/bookstore:v0.9.0
imagePullPolicy: Always
ports:
- containerPort: 14001
name: web
command: ["/bookstore"]
args: ["--path", "./", "--port", "14001"]
env:
- name: BOOKWAREHOUSE_NAMESPACE
value: bookwarehouse
- name: IDENTITY
value: bookstore-v2
---
kind: TrafficTarget
apiVersion: access.smi-spec.io/v1alpha3
metadata:
name: bookstore-v2
namespace: bookstore
spec:
destination:
kind: ServiceAccount
name: bookstore-v2
namespace: bookstore
rules:
- kind: HTTPRouteGroup
name: bookstore-service-routes
matches:
- buy-a-book
- books-bought
sources:
- kind: ServiceAccount
name: bookbuyer
namespace: bookbuyer