From 0ca808759d9efa5fddd2b37d4dabc8d63a4cad25 Mon Sep 17 00:00:00 2001 From: antejavor Date: Thu, 28 Nov 2024 14:31:58 +0100 Subject: [PATCH] Fix indent. --- .../templates/coordinators.yaml | 12 ++++----- .../templates/data.yaml | 12 ++++----- charts/memgraph-high-availability/values.yaml | 25 +++++++++---------- 3 files changed, 24 insertions(+), 25 deletions(-) diff --git a/charts/memgraph-high-availability/templates/coordinators.yaml b/charts/memgraph-high-availability/templates/coordinators.yaml index 4cf710f..35fb970 100644 --- a/charts/memgraph-high-availability/templates/coordinators.yaml +++ b/charts/memgraph-high-availability/templates/coordinators.yaml @@ -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: @@ -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: @@ -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: diff --git a/charts/memgraph-high-availability/templates/data.yaml b/charts/memgraph-high-availability/templates/data.yaml index af85019..af2f10f 100644 --- a/charts/memgraph-high-availability/templates/data.yaml +++ b/charts/memgraph-high-availability/templates/data.yaml @@ -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: @@ -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: @@ -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: diff --git a/charts/memgraph-high-availability/values.yaml b/charts/memgraph-high-availability/values.yaml index 066d563..22264a9 100644 --- a/charts/memgraph-high-availability/values.yaml +++ b/charts/memgraph-high-availability/values.yaml @@ -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