| --- |
| kind: Service |
| apiVersion: v1 |
| metadata: |
| name: pcloud-master-service |
| spec: |
| type: ClusterIP |
| selector: |
| app: pcloud-master |
| ports: |
| - nodePort: |
| port: 111 |
| targetPort: 123 |
| --- |
| kind: Deployment |
| apiVersion: apps/v1 |
| metadata: |
| name: pcloud-master |
| spec: |
| selector: |
| matchLabels: |
| app: pcloud-master |
| replicas: 1 |
| template: |
| metadata: |
| labels: |
| app: pcloud-master |
| spec: |
| containers: |
| - name: pcloud-master |
| image: pcloud:latest |
| imagePullPolicy: Never |
| ports: |
| - containerPort: 123 |
| volumeMounts: |
| - name: code |
| mountPath: /src/go/src/pcloud |
| command: ["/bin/sh"] |
| args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run master.go --port=123"] |
| volumes: |
| - name: code |
| hostPath: |
| path: "/Users/lekva/dev/go/src/pcloud" |
| --- |
| kind: Deployment |
| apiVersion: apps/v1 |
| metadata: |
| name: pcloud-chunk |
| spec: |
| selector: |
| matchLabels: |
| app: pcloud-chunk |
| replicas: 3 |
| template: |
| metadata: |
| labels: |
| app: pcloud-chunk |
| spec: |
| containers: |
| - name: pcloud-chunk |
| image: pcloud:latest |
| imagePullPolicy: Never |
| ports: |
| - containerPort: 234 |
| env: |
| - name: SELF_IP |
| valueFrom: |
| fieldRef: |
| fieldPath: status.podIP |
| volumeMounts: |
| - name: code |
| mountPath: /src/go/src/pcloud |
| command: ["/bin/sh"] |
| args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run chunk.go --master=pcloud-master-service:111 --self=$(SELF_IP):234"] |
| volumes: |
| - name: code |
| hostPath: |
| path: "/Users/lekva/dev/go/src/pcloud" |
| --- |
| kind: Deployment |
| apiVersion: apps/v1 |
| metadata: |
| name: pcloud-client |
| spec: |
| selector: |
| matchLabels: |
| app: pcloud-client |
| replicas: 1 |
| template: |
| metadata: |
| labels: |
| app: pcloud-client |
| spec: |
| containers: |
| - name: pcloud-client |
| image: pcloud:latest |
| imagePullPolicy: Never |
| volumeMounts: |
| - name: code |
| mountPath: /src/go/src/pcloud |
| command: ["/bin/sh"] |
| args: ["-c", "protoc api/api.proto --go_out=plugins=grpc:. && go run client.go --master=pcloud-master-service:111 --file=data/foo"] |
| volumes: |
| - name: code |
| hostPath: |
| path: "/Users/lekva/dev/go/src/pcloud" |