Skip to content

Commit

Permalink
Fix indent.
Browse files Browse the repository at this point in the history
  • Loading branch information
antejavor committed Nov 28, 2024
1 parent 14c94bd commit 0ca8087
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
12 changes: 6 additions & 6 deletions charts/memgraph-high-availability/templates/coordinators.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ spec:
instance-type: coordinator

spec:
{{- if $.Values.affinity.enabled }}
{{- if $.Values.memgraph.affinity.enabled }}
affinity:
{{- if $.Values.affinity.nodeSelection }}
{{- if $.Values.memgraph.affinity.nodeSelection }}
# Node Selection Affinity: Scheduled on nodes with specific label key and value
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ $.Values.affinity.roleLabelKey }}
- key: {{ $.Values.memgraph.affinity.roleLabelKey }}
operator: In
values:
- {{ $.Values.affinity.coordinatorNodeLabelValue }}
- {{ $.Values.memgraph.affinity.coordinatorNodeLabelValue }}
podAntiAffinity :
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
Expand All @@ -39,7 +39,7 @@ spec:
values:
- coordinator
topologyKey: "kubernetes.io/hostname"
{{- else if $.Values.affinity.unique }}
{{- else if $.Values.memgraph.affinity.unique }}
# Unique Affinity: Schedule pods on different nodes
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -51,7 +51,7 @@ spec:
- coordinator
- data
topologyKey: "kubernetes.io/hostname"
{{- else if $.Values.affinity.parity }}
{{- else if $.Values.memgraph.affinity.parity }}
# Parity Affinity: One coordinator and one data node per node
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down
12 changes: 6 additions & 6 deletions charts/memgraph-high-availability/templates/data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@ spec:
instance-type: data

spec:
{{- if $.Values.affinity.enabled }}
{{- if $.Values.memgraph.affinity.enabled }}
affinity:
{{- if $.Values.affinity.nodeSelection }}
{{- if $.Values.memgraph.affinity.nodeSelection }}
# Node Selection Affinity: Scheduled on nodes with specific label key and value
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: {{ $.Values.affinity.roleLabelKey }}
- key: {{ $.Values.memgraph.affinity.roleLabelKey }}
operator: In
values:
- {{ $.Values.affinity.dataNodeLabelValue }}
- {{ $.Values.memgraph.affinity.dataNodeLabelValue }}
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
Expand All @@ -39,7 +39,7 @@ spec:
values:
- data
topologyKey: "kubernetes.io/hostname"
{{- else if $.Values.affinity.unique }}
{{- else if $.Values.memgraph.affinity.unique }}
# Unique Affinity: Schedule pods on different nodes where there is no coordinator or data pod
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
Expand All @@ -51,7 +51,7 @@ spec:
- coordinator
- data
topologyKey: "kubernetes.io/hostname"
{{- else if $.Values.affinity.parity }}
{{- else if $.Values.memgraph.affinity.parity }}
# Parity Affinity: One coordinator and one data node per node
podAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
Expand Down
25 changes: 12 additions & 13 deletions charts/memgraph-high-availability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,18 @@ memgraph:
coordinatorPort: 12000
coordLoadBalancer:
enabled: true

# Affinity controls the scheduling of the memgraph-high-availability pods, by disabling affinity, pods will be schedule on random nodes in the cluster that k8s scheduler chooses.
affinity:
enabled: true
# The unique affinity, will schedule the pods on different nodes in the cluster. This means coordinators and data nodes will not be scheduled on the same node. If there is more pods than nodes, deployment will fail.
unique: false
# The parity affinity, will enable scheduling of the pods on the same node, but with the rule that one node can host pair made of coordinator and data node. This means each node can have max two pods, one coordinator and one data node. If not sufficient nodes, deployment will fail.
parity: false
# The nodeSelection affinity, will enable scheduling of the pods on the nodes with specific labels. So the coordinators will be scheduled on the nodes with label coordinator-node and data nodes will be scheduled on the nodes with label data-node. If not sufficient nodes, deployment will fail.
nodeSelection: false
roleLabelKey: "role"
dataNodeLabelValue: "data-node"
coordinatorNodeLabelValue: "coordinator-node"
# Affinity controls the scheduling of the memgraph-high-availability pods, by disabling affinity, pods will be schedule on random nodes in the cluster that k8s scheduler chooses.
affinity:
enabled: true
# The unique affinity, will schedule the pods on different nodes in the cluster. This means coordinators and data nodes will not be scheduled on the same node. If there is more pods than nodes, deployment will fail.
unique: false
# The parity affinity, will enable scheduling of the pods on the same node, but with the rule that one node can host pair made of coordinator and data node. This means each node can have max two pods, one coordinator and one data node. If not sufficient nodes, deployment will fail.
parity: false
# The nodeSelection affinity, will enable scheduling of the pods on the nodes with specific labels. So the coordinators will be scheduled on the nodes with label coordinator-node and data nodes will be scheduled on the nodes with label data-node. If not sufficient nodes, deployment will fail.
nodeSelection: false
roleLabelKey: "role"
dataNodeLabelValue: "data-node"
coordinatorNodeLabelValue: "coordinator-node"

# If you are experiencing issues with the sysctlInitContainer, you can disable it here.
# This is made to increase the max_map_count, necessary for high memory loads in Memgraph
Expand Down

0 comments on commit 0ca8087

Please sign in to comment.