mirror of
https://github.com/IT4Change/Ocelot-Social.git
synced 2025-12-13 07:45:56 +00:00
Point the backend to the local neo4j service
This commit is contained in:
parent
330fd9a8e9
commit
5cd0485117
@ -59,8 +59,7 @@ Wait until all pods turn green and they don't show a warning `Waiting: Container
|
||||
## Expose the services
|
||||
|
||||
```shell
|
||||
kubectl expose deployment nitro-backend --namespace=staging --type=LoadBalancer --port=4000
|
||||
kubectl expose deployment nitro-web --namespace=staging --type=LoadBalancer --port=3000
|
||||
kubectl create -f services/
|
||||
```
|
||||
|
||||
## Access the service
|
||||
|
||||
22
services/backend.yml
Normal file
22
services/backend.yml
Normal file
@ -0,0 +1,22 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nitro-backend
|
||||
namespace: staging
|
||||
labels:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-backend
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
protocol: TCP
|
||||
port: 4000
|
||||
targetPort: 4000
|
||||
nodePort: 32612
|
||||
selector:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-backend
|
||||
type: LoadBalancer
|
||||
sessionAffinity: None
|
||||
externalTrafficPolicy: Cluster
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
23
services/neo4j.yml
Normal file
23
services/neo4j.yml
Normal file
@ -0,0 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: neo4j
|
||||
namespace: staging
|
||||
labels:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-neo4j
|
||||
spec:
|
||||
selector:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-neo4j
|
||||
ports:
|
||||
- name: bolt
|
||||
protocol: TCP
|
||||
port: 7687
|
||||
targetPort: 7687
|
||||
- name: web
|
||||
protocol: TCP
|
||||
port: 7474
|
||||
targetPort: 7474
|
||||
type: LoadBalancer
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
|
||||
21
services/web.yml
Normal file
21
services/web.yml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nitro-web
|
||||
namespace: staging
|
||||
labels:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-web
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
protocol: "TCP"
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
selector:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-web
|
||||
type: LoadBalancer
|
||||
sessionAffinity: None
|
||||
externalTrafficPolicy: Cluster
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
21
services/webapp.yml
Normal file
21
services/webapp.yml
Normal file
@ -0,0 +1,21 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: nitro-web
|
||||
namespace: staging
|
||||
labels:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-web
|
||||
spec:
|
||||
ports:
|
||||
- name: web
|
||||
protocol: "TCP"
|
||||
port: 3000
|
||||
targetPort: 3000
|
||||
selector:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-web
|
||||
type: LoadBalancer
|
||||
sessionAffinity: None
|
||||
externalTrafficPolicy: Cluster
|
||||
status:
|
||||
loadBalancer: {}
|
||||
|
||||
@ -7,11 +7,6 @@ spec:
|
||||
replicas: 2
|
||||
minReadySeconds: 15
|
||||
progressDeadlineSeconds: 60
|
||||
# strategy:
|
||||
# rollingUpdate:
|
||||
# maxSurge: 1
|
||||
# maxUnavailable: 0
|
||||
# type: RollingUpdate
|
||||
selector:
|
||||
matchLabels:
|
||||
workload.user.cattle.io/workloadselector: deployment-staging-backend
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
data:
|
||||
NEO4J_URI: "bolt://neo4j:7687"
|
||||
NEO4J_URI: "bolt://neo4j.staging:7687"
|
||||
NEO4J_USER: "neo4j"
|
||||
NEO4J_AUTH: none
|
||||
metadata:
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
annotations:
|
||||
field.cattle.io/ipAddresses: "null"
|
||||
field.cattle.io/targetDnsRecordIds: "null"
|
||||
field.cattle.io/targetWorkloadIds: '["deployment:staging:nitro-neo4j"]'
|
||||
labels:
|
||||
cattle.io/creator: norman
|
||||
name: neo4j
|
||||
namespace: staging
|
||||
spec:
|
||||
clusterIP: None
|
||||
ports:
|
||||
- name: default
|
||||
port: 42
|
||||
protocol: TCP
|
||||
targetPort: 42
|
||||
selector:
|
||||
workloadID_neo4j: "true"
|
||||
sessionAffinity: None
|
||||
type: ClusterIP
|
||||
Loading…
x
Reference in New Issue
Block a user