From c439190a8e9ba9f78981964a0fa5ed4d5b0ea462 Mon Sep 17 00:00:00 2001 From: ericsyh Date: Mon, 2 Dec 2024 15:02:44 +0800 Subject: [PATCH] feat: support rackAwareTopologyLabels field on bk Signed-off-by: ericsyh --- .../templates/bookkeeper/bookkeeper-cluster.yaml | 4 ++++ charts/sn-platform-slim/values.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml b/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml index e35f8950..08deac0f 100644 --- a/charts/sn-platform-slim/templates/bookkeeper/bookkeeper-cluster.yaml +++ b/charts/sn-platform-slim/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-slim/values.yaml b/charts/sn-platform-slim/values.yaml index 5bf2d1ce..30e1e2d6 100644 --- a/charts/sn-platform-slim/values.yaml +++ b/charts/sn-platform-slim/values.yaml @@ -826,6 +826,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: