forked from yanivbh1/FastMart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-deployment.yaml
126 lines (126 loc) · 2.84 KB
/
k8s-deployment.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
apiVersion: v1
kind: Namespace
metadata:
name: fastmart
---
apiVersion: /v1
kind: Service
metadata:
name: orders
namespace: fastmart
spec:
type: ClusterIP
ports:
- protocol: TCP
port: 80
targetPort: 3000
selector:
app: orders-service
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: orders-service
namespace: fastmart
labels:
app: orders-service
spec:
replicas: 1
selector:
matchLabels:
app: orders-service
template:
metadata:
name: orders-service
labels:
app: orders-service
spec:
containers:
- name: orders-service
image: yanivbhamo/fastmart-order-service:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: PORT
value: "3000"
- name: MEMPHIS_HOST
value: "memphis-cluster.memphis.svc.cluster.local"
- name: MEMPHIS_USERNAME
value: "fastmart"
- name: MEMPHIS_TOKEN
value: "memphis"
- name: MONGO_HOST
value: "mongo.memphis.svc.cluster.local"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: email-service
namespace: fastmart
labels:
app: email-service
spec:
replicas: 1
selector:
matchLabels:
app: email-service
template:
metadata:
name: email-service
labels:
app: email-service
spec:
containers:
- name: email-service
image: yanivbhamo/fastmart-email-service:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: MEMPHIS_HOST
value: "memphis-cluster.memphis.svc.cluster.local"
- name: MEMPHIS_USERNAME
value: "fastmart"
- name: MEMPHIS_TOKEN
value: "memphis"
- name: EMAIL_ID
value: "[email protected]"
- name: EMAIL_PWD
value: "test"
- name: MONGO_HOST
value: "mongo.memphis.svc.cluster.local"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: resturant-service
namespace: fastmart
labels:
app: resturant-service
spec:
replicas: 1
selector:
matchLabels:
app: resturant-service
template:
metadata:
name: resturant-service
labels:
app: resturant-service
spec:
containers:
- name: resturant-service
image: yanivbhamo/fastmart-resturant-service:latest
imagePullPolicy: Always
ports:
- containerPort: 3000
env:
- name: MEMPHIS_HOST
value: "memphis-cluster.memphis.svc.cluster.local"
- name: MEMPHIS_USERNAME
value: "fastmart"
- name: MEMPHIS_TOKEN
value: "memphis"
- name: MONGO_HOST
value: "mongo.memphis.svc.cluster.local"