Skip to content

Commit

Permalink
Add optionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
antejavor committed Aug 12, 2024
1 parent c02bc7b commit 7794e3b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/memgraph-high-availability/templates/coordinators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
labels:
app: memgraph-coordinator-{{ $coordinator.id }}
spec:
{{ if $.Values.memgraph.affinity.enabled }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -25,7 +26,10 @@ spec:
- memgraph-coordinator-1
- memgraph-coordinator-2
- memgraph-coordinator-3
- memgraph-data-0
- memgraph-data-1
topologyKey: "kubernetes.io/hostname"
{{ end }}
initContainers:
- name: init
image: "{{ $.Values.memgraph.image.repository }}:{{ $.Values.memgraph.image.tag }}"
Expand Down
5 changes: 5 additions & 0 deletions charts/memgraph-high-availability/templates/data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ spec:
labels:
app: memgraph-data-{{ $data.id }}
spec:
{{ if $.Values.memgraph.affinity.enabled }}
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -22,9 +23,13 @@ spec:
- key: app
operator: In
values:
- memgraph-coordinator-1
- memgraph-coordinator-2
- memgraph-coordinator-3
- memgraph-data-0
- memgraph-data-1
topologyKey: "kubernetes.io/hostname"
{{ end }}
initContainers:
- name: init
image: "{{ $.Values.memgraph.image.repository }}:{{ $.Values.memgraph.image.tag }}"
Expand Down
2 changes: 2 additions & 0 deletions charts/memgraph-high-availability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ memgraph:
logPVCClassName: ""
logPVC: true
logPVCSize: "256Mi"
affinity:
enabled: false


data:
Expand Down

0 comments on commit 7794e3b

Please sign in to comment.