-
Notifications
You must be signed in to change notification settings - Fork 0
/
k8s-services.yml
152 lines (151 loc) · 2.63 KB
/
k8s-services.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
apiVersion: apps/v1
kind: Deployment
metadata:
name: transaction-deployment
labels:
app: transaction
spec:
replicas: 1
selector:
matchLabels:
app: transaction
template:
metadata:
labels:
app: transaction
spec:
containers:
- name: transaction
image: eu.gcr.io/rugged-shuttle-195322/transaction-api:latest
ports:
- containerPort: 5000
livenessProbe:
httpGet:
path: /health
port: 5000
env:
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: jwt
key: jwt
---
kind: Service
apiVersion: v1
metadata:
name: transaction
spec:
selector:
app: transaction
ports:
- protocol: TCP
port: 80
targetPort: 5000
type: LoadBalancer
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: loyalty-deployment
labels:
app: loyalty
spec:
replicas: 1
selector:
matchLabels:
app: loyalty
template:
metadata:
labels:
app: loyalty
spec:
containers:
- name: loyalty
image: eu.gcr.io/rugged-shuttle-195322/loyalty-worker:latest
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: auth-deployment
labels:
app: auth
spec:
replicas: 1
selector:
matchLabels:
app: auth
template:
metadata:
labels:
app: auth
spec:
containers:
- name: auth
image: eu.gcr.io/rugged-shuttle-195322/auth-api:latest
ports:
- containerPort: 5000
livenessProbe:
httpGet:
path: /health
port: 5000
env:
- name: JWT_SECRET
valueFrom:
secretKeyRef:
name: jwt
key: jwt
---
kind: Service
apiVersion: v1
metadata:
name: auth
spec:
selector:
app: auth
ports:
- protocol: TCP
port: 80
targetPort: 5000
type: LoadBalancer
--- ---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-deployment
labels:
app: redis
spec:
replicas: 1
selector:
matchLabels:
app: redis
template:
metadata:
labels:
app: redis
spec:
containers:
- name: redis
image: redis:4-alpine
ports:
- containerPort: 6379
livenessProbe:
exec:
command:
- sh
- -c
- "redis-cli -h $(hostname) ping"
initialDelaySeconds: 20
periodSeconds: 3
---
kind: Service
apiVersion: v1
metadata:
name: redis
spec:
selector:
app: redis
ports:
- protocol: TCP
port: 6379
targetPort: 6379