Skip to content

Commit

Permalink
Restore NodePort svcs on data instances
Browse files Browse the repository at this point in the history
  • Loading branch information
as51340 committed Nov 25, 2024
1 parent 15a6fa8 commit 3e60e2d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ spec:
# Run the mgconsole commands
echo "Running mgconsole commands..."
echo 'ADD COORDINATOR 2 WITH CONFIG {"bolt_server": "memgraph-coordinator-2.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-2.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-2.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'ADD COORDINATOR 3 WITH CONFIG {"bolt_server": "memgraph-coordinator-3.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-3.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-3.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'ADD COORDINATOR 2 WITH CONFIG {"bolt_server": "memgraph-coordinator-2.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-2.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-2.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'ADD COORDINATOR 3 WITH CONFIG {"bolt_server": "memgraph-coordinator-3.default.svc.cluster.local:7687", "management_server": "memgraph-coordinator-3.default.svc.cluster.local:10000", "coordinator_server": "memgraph-coordinator-3.default.svc.cluster.local:12000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'REGISTER INSTANCE instance_1 WITH CONFIG {"bolt_server": "memgraph-data-0.default.svc.cluster.local:7687", "management_server": "memgraph-data-0.default.svc.cluster.local:10000", "replication_server": "memgraph-data-0.default.svc.cluster.local:20000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'REGISTER INSTANCE instance_2 WITH CONFIG {"bolt_server": "memgraph-data-1.default.svc.cluster.local:7687", "management_server": "memgraph-data-1.default.svc.cluster.local:10000", "replication_server": "memgraph-data-1.default.svc.cluster.local:20000"};' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
echo 'SET INSTANCE instance_1 TO MAIN;' | mgconsole --host memgraph-coordinator-1.default.svc.cluster.local --port 7687
Expand Down
18 changes: 18 additions & 0 deletions charts/memgraph-high-availability/templates/services-data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,21 @@ spec:
port: {{ $.Values.memgraph.ports.replicationPort }}
targetPort: {{ $.Values.memgraph.ports.replicationPort }}
{{- end }}

# Service for data instances external
{{- range .Values.data }}
---
apiVersion: v1
kind: Service
metadata:
name: memgraph-data-{{ .id }}-external
spec:
type: NodePort
selector:
app: memgraph-data-{{ .id }}
ports:
- protocol: TCP
name: bolt
port: {{ $.Values.memgraph.ports.boltPort }}
targetPort: {{ $.Values.memgraph.ports.boltPort }}
{{- end }}

0 comments on commit 3e60e2d

Please sign in to comment.