This is an automated email from the ASF dual-hosted git repository.
hanahmily pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-helm.git
The following commit(s) were added to refs/heads/master by this push:
new 577716b Support data node list in the liaison (#39)
577716b is described below
commit 577716b2228faa81065a1d76fc28a15b0f8f959a
Author: mrproliu <[email protected]>
AuthorDate: Mon Nov 10 14:27:54 2025 +0900
Support data node list in the liaison (#39)
* Support data node list in the liaison
* Simplified the dataNodeListValue implementation
* remove confiuguration
---
chart/templates/_helpers.tpl | 25 +++++++++++++++++++++++-
chart/templates/cluster_liaison_statefulset.yaml | 6 +++++-
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/chart/templates/_helpers.tpl b/chart/templates/_helpers.tpl
index 66029e3..ad2a5b5 100644
--- a/chart/templates/_helpers.tpl
+++ b/chart/templates/_helpers.tpl
@@ -98,4 +98,27 @@ EtcdEndpoints
{{- end }}
- name: BYDB_ETCD_ENDPOINTS
value: "{{- $endpoints | join "," -}}"
-{{- end }}
\ No newline at end of file
+{{- end }}
+
+{{- define "banyandb.hasDataNodeListValue" -}}
+{{- $dataNodeList := include "banyandb.dataNodeListValue" . }}
+{{- if ne $dataNodeList "" }}true{{- end }}
+{{- end }}
+
+{{/*
+Generate data node names list for "hot" role only
+*/}}
+{{- define "banyandb.dataNodeListValue" -}}
+{{- $dataNodes := list }}
+{{- $fullname := include "banyandb.fullname" . }}
+{{- range $roleName, $roleConfig := .Values.cluster.data.roles }}
+ {{- if eq $roleName "hot" }}
+ {{- $replicas := $roleConfig.replicas | default
$.Values.cluster.data.nodeTemplate.replicas }}
+ {{- range $i := until (int $replicas) }}
+ {{- $nodeName := printf "%s-data-%s-%d" $fullname $roleName $i }}
+ {{- $dataNodes = append $dataNodes $nodeName }}
+ {{- end }}
+ {{- end }}
+{{- end }}
+{{- $dataNodes | join "," -}}
+{{- end }}
diff --git a/chart/templates/cluster_liaison_statefulset.yaml
b/chart/templates/cluster_liaison_statefulset.yaml
index 72a0643..705e903 100644
--- a/chart/templates/cluster_liaison_statefulset.yaml
+++ b/chart/templates/cluster_liaison_statefulset.yaml
@@ -164,6 +164,10 @@ spec:
{{- else }}
{{- include "banyandb.etcdEndpoints" . | nindent 12 }}
{{- end }}
+ {{- if include "banyandb.hasDataNodeListValue" . }}
+ - name: BYDB_DATA_NODE_LIST
+ value: "{{ include "banyandb.dataNodeListValue" . }}"
+ {{- end }}
{{- range $env := .Values.cluster.liaison.env }}
- name: {{ $env.name }}
value: {{ $env.value }}
@@ -396,4 +400,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
-{{- end }}
\ No newline at end of file
+{{- end }}