forked from efficient/epaxos
-
Notifications
You must be signed in to change notification settings - Fork 4
/
epaxos.yaml
96 lines (96 loc) · 1.96 KB
/
epaxos.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
apiVersion: v1
kind: Service
metadata:
name: epaxos-master
labels:
app: epaxos-master
spec:
ports:
- port: 7087
selector:
app: epaxos-master
---
apiVersion: v1
kind: ConfigMap
metadata:
name: epaxos-config
data:
port.master: "7087"
port.server: "7001"
addr.master: "epaxos-master"
num.replicas: "5"
extra.server: ""
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: epaxos-master
spec:
replicas: 1
template:
metadata:
labels:
app: epaxos-master
spec:
containers:
- name: epaxos-master
image: 0track/epaxos
ports:
- containerPort: 7087
env:
- name : TYPE
value: "master"
- name : MPORT
valueFrom:
configMapKeyRef:
name: epaxos-config
key: port.master
- name : NREPLICAS
valueFrom:
configMapKeyRef:
name: epaxos-config
key: num.replicas
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: epaxos-server
spec:
replicas: 5
template:
metadata:
labels:
app: epaxos-server
spec:
containers:
- name: epaxos-server
image: 0track/epaxos
ports:
- containerPort: 7001
env:
- name : TYPE
value: "server"
- name: ADDR
valueFrom:
fieldRef:
fieldPath: status.podIP
- name : SPORT
valueFrom:
configMapKeyRef:
name: epaxos-config
key: port.server
- name : MADDR
valueFrom:
configMapKeyRef:
name: epaxos-config
key: addr.master
- name : MPORT
valueFrom:
configMapKeyRef:
name: epaxos-config
key: port.master
- name : SERVER_EXTRA_ARGS
valueFrom:
configMapKeyRef:
name: epaxos-config
key: extra.server