-
Notifications
You must be signed in to change notification settings - Fork 1
/
deployment.yaml
63 lines (62 loc) · 1.27 KB
/
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
kind: Deployment
apiVersion: apps/v1
metadata:
labels:
app: rpc-balance
name: rpc-balance
namespace: dev-platform
spec:
replicas: 3
selector:
matchLabels:
app: rpc-balance
template:
metadata:
labels:
app: rpc-balance
spec:
containers:
- name: rpc-balance
env:
- name: GIN_MODE
value: release
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: SERVICE
value: balance
image: {{image}}
imagePullPolicy: Always
ports:
- containerPort: 8080
name: http
- containerPort: 8081
name: tcp
livenessProbe:
httpGet:
path: /alive
port: 8080
initialDelaySeconds: 5
readinessProbe:
httpGet:
path: /alive
port: 8080
initialDelaySeconds: 5
---
apiVersion: v1
kind: Service
metadata:
name: rpc-balance
namespace: dev-platform
spec:
ports:
- name: http
port: 8080
targetPort: 8080
- name: tcp
port: 8081
targetPort: 8081
selector:
app: rpc-balance
clusterIP: None