Skip to content

Commit

Permalink
Update HA.
Browse files Browse the repository at this point in the history
  • Loading branch information
antejavor committed May 2, 2024
1 parent fce6d6d commit 551ff33
Show file tree
Hide file tree
Showing 7 changed files with 124 additions and 73 deletions.
2 changes: 1 addition & 1 deletion charts/memgraph-high-availability/Chart.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ dependencies:
repository: file://../memgraph
version: 0.1.2
digest: sha256:adc3cf9945b8b2cd9bfc23cb257bf0990fde78f12620d95f8955345f799d408c
generated: "2024-04-30T14:15:55.895968+02:00"
generated: "2024-05-02T14:40:10.824062+02:00"
Binary file modified charts/memgraph-high-availability/charts/memgraph-0.1.2.tgz
Binary file not shown.
62 changes: 0 additions & 62 deletions charts/memgraph-high-availability/templates/_helpers.tpl

This file was deleted.

29 changes: 29 additions & 0 deletions charts/memgraph-high-availability/templates/coordinators.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{{- range $index, $coord := .Values.memgraph.coordinators }}
---
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "memgraph.fullname" $ }}-coordinator-{{ $coord.id }}
spec:
serviceName: {{ include "memgraph.fullname" $ }}-coordinator-{{ $coord.id }}
replicas: 1
selector:
matchLabels:
app: {{ include "memgraph.fullname" $ }}-coordinator
coordinator-id: "{{ $coord.id }}"
template:
metadata:
labels:
app: {{ include "memgraph.fullname" $ }}-coordinator
coordinator-id: "{{ $coord.id }}"
spec:
containers:
- name: memgraph-coordinator-{{ $coord.id }}
image: "{{ $.Values.memgraph.image.repository }}:{{ $.Values.memgraph.image.tag }}"
imagePullPolicy: "{{ $.Values.memgraph.image.pullPolicy }}"
args: {{ toYaml $coord.args | nindent 10 }}
ports:
- name: coord-port
containerPort: {{ $coord.port }}
...
{{- end }}
23 changes: 23 additions & 0 deletions charts/memgraph-high-availability/templates/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "memgraph.fullname" . }}-main
spec:
serviceName: {{ include "memgraph.fullname" . }}-main
replicas: 1
selector:
matchLabels:
app: {{ include "memgraph.fullname" . }}-main
template:
metadata:
labels:
app: {{ include "memgraph.fullname" . }}-main
spec:
containers:
- name: memgraph-main
image: "{{ .Values.memgraph.image.repository }}:{{ .Values.memgraph.image.tag }}"
imagePullPolicy: "{{ .Values.memgraph.image.pullPolicy }}"
args: {{ toYaml .Values.memgraph.main.memgraphConfig | nindent 12 }}
ports:
- name: bolt
containerPort: 7687
23 changes: 23 additions & 0 deletions charts/memgraph-high-availability/templates/replica.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: {{ include "memgraph.fullname" . }}-replica
spec:
serviceName: {{ include "memgraph.fullname" . }}-replica
replicas: 1
selector:
matchLabels:
app: {{ include "memgraph.fullname" . }}-replica
template:
metadata:
labels:
app: {{ include "memgraph.fullname" . }}-replica
spec:
containers:
- name: memgraph-replica
image: "{{ .Values.memgraph.image.repository }}:{{ .Values.memgraph.image.tag }}"
imagePullPolicy: "{{ .Values.memgraph.image.pullPolicy }}"
args: {{ toYaml .Values.memgraph.replica.memgraphConfig | nindent 12 }}
ports:
- name: bolt
containerPort: 7688
58 changes: 48 additions & 10 deletions charts/memgraph-high-availability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,57 @@
# Declare variables to be passed into your templates.

memgraph:
replicaCount: 3
image:
repository: memgraph/memgraph
tag: 2.16.0
pullPolicy: IfNotPresent
tag: "2.16.0"
memgraphConfig:
- "--also-log-to-stderr=true"
service:
type: ClusterIP
port: 7687
persistentVolumeClaim:
storagePVC: true
logPVC: true


main:
memgraphConfig:
- "--experimental-enabled=high-availability"
- "--management-port=19001"
- "--bolt-port=7687"

replica:
memgraphConfig:
- "--experimental-enabled=high-availability"
- "--management-port=19002"
- "--bolt-port=7688"

coordinators:
- id: 1
port: 20001
args:
- "--experimental-enabled=high-availability"
- "--coordinator-id=1"
- "--coordinator-port=20001"
- id: 2
port: 20002
args:
- "--experimental-enabled=high-availability"
- "--coordinator-id=2"
- "--coordinator-port=20002"
- id: 3
port: 20003
args:
- "--experimental-enabled=high-availability"
- "--coordinator-id=3"
- "--coordinator-port=20003"



Check failure on line 45 in charts/memgraph-high-availability/values.yaml

View workflow job for this annotation

GitHub Actions / lint-test

45:1 [empty-lines] too many blank lines (3 > 2)
# ha:
# main:
# args:
# - "--experimental-enabled=high-availability"
# - "--management-port=19001"
# - "--bolt-port=7687"
# replica:
# args:
# - "--experimental-enabled=high-availability"
# - "--management-port=19002"
# - "--bolt-port=7688"


# replicaCount: 1
Expand Down

0 comments on commit 551ff33

Please sign in to comment.