blob: ca8f173c01a1e1832285dd508e6b6ddcb4f1edad [file] [log] [blame]
Giorgi Lekveishvilic548ec52020-03-16 21:59:14 +04001---
2kind: Service
3apiVersion: v1
4metadata:
5 name: pcloud-master-service
6spec:
7 type: ClusterIP
8 selector:
9 app: pcloud-master
10 ports:
11 - nodePort:
12 port: 111
13 targetPort: 123
14---
15kind: Deployment
16apiVersion: apps/v1
17metadata:
18 name: pcloud-master
19spec:
20 selector:
21 matchLabels:
22 app: pcloud-master
23 replicas: 1
24 template:
25 metadata:
26 labels:
27 app: pcloud-master
28 spec:
29 containers:
30 - name: pcloud-master
31 image: pcloud:latest
32 imagePullPolicy: Never
33 ports:
34 - containerPort: 123
35 volumeMounts:
36 - name: code
37 mountPath: /src/go/src/pcloud
38 command: ["/bin/sh"]
giolekvacc47c362020-03-21 16:40:11 +040039 args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run master.go --port=123"]
Giorgi Lekveishvilic548ec52020-03-16 21:59:14 +040040 volumes:
41 - name: code
42 hostPath:
Giorgi Lekveishvili45b4d522020-03-19 21:11:18 +040043 path: "/Users/lekva/dev/go/src/pcloud"
Giorgi Lekveishvilic548ec52020-03-16 21:59:14 +040044---
45kind: Deployment
46apiVersion: apps/v1
47metadata:
48 name: pcloud-chunk
49spec:
50 selector:
51 matchLabels:
52 app: pcloud-chunk
53 replicas: 3
54 template:
55 metadata:
56 labels:
57 app: pcloud-chunk
58 spec:
59 containers:
60 - name: pcloud-chunk
61 image: pcloud:latest
62 imagePullPolicy: Never
63 ports:
64 - containerPort: 234
65 env:
66 - name: SELF_IP
67 valueFrom:
68 fieldRef:
69 fieldPath: status.podIP
70 volumeMounts:
71 - name: code
72 mountPath: /src/go/src/pcloud
73 command: ["/bin/sh"]
giolekvacc47c362020-03-21 16:40:11 +040074 args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run chunk.go --master=pcloud-master-service:111 --self=$(SELF_IP):234"]
Giorgi Lekveishvilic548ec52020-03-16 21:59:14 +040075 volumes:
76 - name: code
77 hostPath:
Giorgi Lekveishvili45b4d522020-03-19 21:11:18 +040078 path: "/Users/lekva/dev/go/src/pcloud"
giolekva1f6577a2020-03-25 12:53:06 +040079---
80kind: Deployment
81apiVersion: apps/v1
82metadata:
83 name: pcloud-client
84spec:
85 selector:
86 matchLabels:
87 app: pcloud-client
88 replicas: 1
89 template:
90 metadata:
91 labels:
92 app: pcloud-client
93 spec:
94 containers:
95 - name: pcloud-client
96 image: pcloud:latest
97 imagePullPolicy: Never
98 volumeMounts:
99 - name: code
100 mountPath: /src/go/src/pcloud
101 command: ["/bin/sh"]
102 args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run client.go --master=pcloud-master-service:111 --file=data/foo"]
103 volumes:
104 - name: code
105 hostPath:
106 path: "/Users/lekva/dev/go/src/pcloud"