| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 1 | --- |
| 2 | kind: Service |
| 3 | apiVersion: v1 |
| 4 | metadata: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 5 | name: pfs-controller-service |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 6 | spec: |
| 7 | type: ClusterIP |
| 8 | selector: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 9 | app: pfs-controller |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 10 | ports: |
| 11 | - nodePort: |
| 12 | port: 111 |
| 13 | targetPort: 123 |
| 14 | --- |
| 15 | kind: Deployment |
| 16 | apiVersion: apps/v1 |
| 17 | metadata: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 18 | name: pfs-controller |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 19 | spec: |
| 20 | selector: |
| 21 | matchLabels: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 22 | app: pfs-controller |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 23 | replicas: 1 |
| 24 | template: |
| 25 | metadata: |
| 26 | labels: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 27 | app: pfs-controller |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 28 | spec: |
| 29 | containers: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 30 | - name: pfs-controller |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 31 | image: pcloud:latest |
| 32 | imagePullPolicy: Never |
| 33 | ports: |
| 34 | - containerPort: 123 |
| 35 | volumeMounts: |
| 36 | - name: code |
| giolekva | b47be77 | 2020-04-11 15:23:37 +0400 | [diff] [blame] | 37 | mountPath: /src/go/src/github.com/giolekva/pcloud/pfs |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 38 | command: ["/bin/sh"] |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 39 | args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run controller_server.go --port=123"] |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 40 | volumes: |
| 41 | - name: code |
| 42 | hostPath: |
| giolekva | b47be77 | 2020-04-11 15:23:37 +0400 | [diff] [blame] | 43 | path: "/Users/lekva/dev/go/src/github.com/giolekva/pcloud/pfs" |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 44 | --- |
| 45 | kind: Deployment |
| 46 | apiVersion: apps/v1 |
| 47 | metadata: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 48 | name: pfs-chunk |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 49 | spec: |
| 50 | selector: |
| 51 | matchLabels: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 52 | app: pfs-chunk |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 53 | replicas: 3 |
| 54 | template: |
| 55 | metadata: |
| 56 | labels: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 57 | app: pfs-chunk |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 58 | spec: |
| 59 | containers: |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 60 | - name: pfs-chunk |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 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 |
| giolekva | b47be77 | 2020-04-11 15:23:37 +0400 | [diff] [blame] | 72 | mountPath: /src/go/src/github.com/giolekva/pcloud/pfs |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 73 | command: ["/bin/sh"] |
| giolekva | 3ea9049 | 2020-03-26 12:36:23 +0400 | [diff] [blame] | 74 | args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run chunk_server.go --controller=pfs-controller-service:111 --self=$(SELF_IP):234"] |
| Giorgi Lekveishvili | c548ec5 | 2020-03-16 21:59:14 +0400 | [diff] [blame] | 75 | volumes: |
| 76 | - name: code |
| 77 | hostPath: |
| giolekva | b47be77 | 2020-04-11 15:23:37 +0400 | [diff] [blame] | 78 | path: "/Users/lekva/dev/go/src/github.com/giolekva/pcloud/pfs" |