add k8s and buid it for arm
parent
5acdde1026
commit
78061c3d46
|
@ -9,8 +9,10 @@ RUN go mod download
|
|||
COPY . .
|
||||
COPY pb ../pb
|
||||
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=arm64
|
||||
RUN go install -v ./...
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "client" ]
|
||||
CMD [ "/go/bin/linux_arm64/client" ]
|
||||
|
|
|
@ -9,8 +9,10 @@ RUN go mod download
|
|||
COPY . .
|
||||
COPY pb ../pb
|
||||
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=arm64
|
||||
RUN go install -v ./...
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "server" ]
|
||||
CMD [ "/go/bin/linux_arm64/server" ]
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
apiVersion: apps/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: client-deployment
|
||||
namespace: grpc-mocker
|
||||
labels:
|
||||
app: client
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: client
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: client
|
||||
spec:
|
||||
containers:
|
||||
- name: client
|
||||
image: harbor.strikerlulu.me/works/grpc-mocker/client
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- name: client-service
|
||||
containerPort: 3000
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: client-service
|
||||
spec:
|
||||
type: NodePort
|
||||
selector:
|
||||
app: client
|
||||
ports:
|
||||
- port: 3000
|
||||
targetPort: client-service
|
|
@ -0,0 +1,35 @@
|
|||
apiVersion: apps/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: server-deployment
|
||||
namespace: grpc-mocker
|
||||
labels:
|
||||
app: server
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: gcd
|
||||
replicas: 3
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: server
|
||||
spec:
|
||||
containers:
|
||||
- name: server
|
||||
image: harbor.strikerlulu.me/works/grpc-mocker/server
|
||||
imagePullPolicy: Never
|
||||
ports:
|
||||
- name: grpc-server
|
||||
containerPort: 3000
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: grpc-server
|
||||
spec:
|
||||
selector:
|
||||
app: grpc-srever
|
||||
ports:
|
||||
- port: 3000
|
||||
targetPort: grpc-server
|
Loading…
Reference in New Issue