From 173932b58e6870ec41bf9fd069cc1146e72bc8aa Mon Sep 17 00:00:00 2001 From: ericsyh Date: Mon, 2 Dec 2024 15:06:38 +0800 Subject: [PATCH] support on the rackAwareTopologyLabels on sn-plaform chart Signed-off-by: ericsyh --- .../sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml | 4 ++++ charts/sn-platform/values.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml index 8f1c1b40..0c1057c8 100644 --- a/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform/templates/bookkeeper/bookkeeper-cluster.yaml @@ -151,6 +151,10 @@ spec: reclaimPolicy: {{ .Values.bookkeeper.volumes.reclaimPolicy | default "Delete" }} {{- end }} config: + {{- with .Values.bookkeeper.rackAwareTopologyLabels }} + rackAwareTopologyLabels: + {{- toYaml . | nindent 4 }} + {{- end }} custom: {{- with .Values.bookkeeper.custom }} {{ toYaml . | indent 6 }} diff --git a/charts/sn-platform/values.yaml b/charts/sn-platform/values.yaml index f1b49c36..f3c7700d 100644 --- a/charts/sn-platform/values.yaml +++ b/charts/sn-platform/values.yaml @@ -901,6 +901,10 @@ bookkeeper: # preferredDuringSchedulingIgnoredDuringExecution - scheduler will try to enforce but not guranentee type: preferredDuringSchedulingIgnoredDuringExecution topologySpreadConstraints: [] + # For BookKeeperCluster, the field rackAwareTopologyLabels should be configured as nodes topology labels the value of which will be set as the rack name. + # When there are multiple labels configured, all their values will be joined by "/". + # The operator will propagate the label value from nodes to pods and ensure the pod container starts with the label values as environment variables automatically. + rackAwareTopologyLabels: [] labels: {} annotations: {} securityContext: