Missing Files for Deployment

This commit is contained in:
Roger 2024-04-10 17:03:59 +00:00
parent 79523310e1
commit 8d8423d082
6 changed files with 142 additions and 10 deletions

View File

@ -8,7 +8,7 @@ spec:
matchLabels:
app: controller
strategy:
type: Recreate # Specify the Recreate strategy
type: Recreate
template:
metadata:
labels:
@ -18,10 +18,10 @@ spec:
- name: controller
image: oktopusp/controller:latest
resources:
#requests:
# requests:
# memory: 64Mi
# cpu: 0.5
#limits:
# limits:
# memory: 256Mi
# cpu: 1
imagePullPolicy: IfNotPresent
@ -36,4 +36,18 @@ spec:
value: "mongodb://oktopusp:oktopusp@mongodb-0.mongodb-svc.mongodb.svc.cluster.local:27017,mongodb-1.mongodb-svc.mongodb.svc.cluster.local:27017,mongodb-2.mongodb-svc.mongodb.svc.cluster.local:27017/adapter?replicaSet=mongodb&ssl=false"
- name: REST_API_PORT
value: "8000"
---
apiVersion: v1
kind: Service
metadata:
name: controller-svc
spec:
selector:
app: controller
ports:
- protocol: TCP
port: 8000
targetPort: 8000
nodePort: 30003
type: NodePort

View File

@ -16,10 +16,16 @@ spec:
spec:
containers:
- name: frontend
image: oktopusp/frontend:latest
image: rogersacchelli/frontend:latest
ports:
- containerPort: 3000
imagePullPolicy: IfNotPresent
env:
- name: NEXT_PUBLIC_REST_ENPOINT
value: "tcp://10.10.10.10:1234"
- name: NEXT_PUBLIC_WS_ENPOINT
value: "tcp://10.11.12.13:2343"
---
apiVersion: v1
kind: Service

View File

@ -19,3 +19,17 @@ spec:
env:
- name: NATS_URL
value: "nats:4222"
---
apiVersion: v1
kind: Service
metadata:
name: socketio-svc
spec:
selector:
app: socketio
ports:
- protocol: TCP
port: 5000
targetPort: 5000
NodePort: 30002
type: NodePort

View File

@ -0,0 +1,46 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ws-adapter
spec:
replicas: 1
selector:
matchLabels:
app: ws-adapter
template:
metadata:
labels:
app: ws-adapter
spec:
containers:
- name: ws-adapter
image: oktopusp/ws-adapter:latest
resources:
#requests:
# memory: 64Mi
# cpu: 0.1
#limits:
# memory: 256Mi
# cpu: 0.2
imagePullPolicy: IfNotPresent
env:
- name: NATS_URL
value: "nats://nats:4222"
- name: NATS_NAME
value: "ws-adapter"
- name: NATS_VERIFY_CERTIFICATES
value: "0" # 0 - DEBUG
- name: WS_TOKEN
value: ""
- name: WS_AUTH_ENABLE
value: "false"
- name: WS_ADDR
value: "ws-svc"
- name: WS_PORT
value: ":8080"
- name: WS_ROUTE
value: "/ws/controller"
- name: WS_TLS_ENABLE
value: "false"
- name: WS_SKIP_TLS_VERIFY
value: "false"

52
deploy/kubernetes/ws.yaml Normal file
View File

@ -0,0 +1,52 @@
apiVersion: v1
kind: Service
metadata:
name: ws-svc
spec:
selector:
app: ws
ports:
- protocol: TCP
port: 8080
targetPort: 8080
nodePort: 30005
type: NodePort
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: ws
spec:
replicas: 1
selector:
matchLabels:
app: ws
template:
metadata:
labels:
app: ws
spec:
containers:
- name: ws
image: oktopusp/ws:latest
ports:
- containerPort: 8080
#resources:
#requests:
#memory: 64Mi
#cpu: 0.1
#limits:
#memory: 256Mi
#cpu: 0.2
imagePullPolicy: IfNotPresent
env:
- name: SERVER_PORT
value: ":8080"
- name: SERVER_AUTH_TOKEN
value: ""
- name: SERVER_AUTH_ENABLE
value: "false"
- name: CONTROLLER_EID
value: "oktopusController"
- name: SERVER_TLS_ENABLE
value: "false"

View File

@ -2,7 +2,7 @@ FROM node:16.20.2-alpine as builder
WORKDIR /app
COPY ../ .
COPY ./ ./
RUN npm install