-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.yaml
103 lines (103 loc) · 2.1 KB
/
install.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
---
apiVersion: v1
kind: Namespace
metadata:
name: unique
---
apiVersion: v1
kind: Service
metadata:
name: controller
namespace: unique
spec:
type: ClusterIP
selector:
app: controller
ports:
- name: controller
port: 8080
targetPort: controller
protocol: TCP
---
apiVersion: batch/v1
kind: Job
metadata:
name: workers
namespace: unique
spec:
parallelism: 30
completions: 30
template:
metadata:
labels:
app: worker
spec:
restartPolicy: Never
containers:
- name: worker
image: giolekva/unique:v0.1
imagePullPolicy: IfNotPresent
env:
- name: POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
ports:
- name: worker
containerPort: 1234
protocol: TCP
command:
- "server_worker"
- "--controller-address=controller.unique.svc.cluster.local:8080"
- "--num-workers=10"
- "--num-bits=1024"
- "--port=1234"
- "--name=$(POD_NAME)"
- "--address=$(POD_IP)"
resources:
requests:
cpu: "200m"
# limits:
# cpu: "3000m"
# tolerations:
# - key: "pcloud"
# operator: "Equal"
# value: "role"
# effect: "NoSchedule"
---
apiVersion: batch/v1
kind: Job
metadata:
name: controller
namespace: unique
spec:
parallelism: 1
template:
metadata:
labels:
app: controller
spec:
restartPolicy: Never
containers:
- name: controller
image: giolekva/unique:v0.1
imagePullPolicy: IfNotPresent
ports:
- name: controller
containerPort: 4321
protocol: TCP
command:
- "server_controller"
- "--num-bits=1024"
- "--port=4321"
- "--start-from=https://gio.lekva.me"
- "--num-documents=10000"
tolerations:
- key: "pcloud"
operator: "Equal"
value: "role"
effect: "NoSchedule"