This is an automated email from the ASF dual-hosted git repository.

mrproliu pushed a commit to branch crash-support
in repository https://gitbox.apache.org/repos/asf/skywalking-banyandb-helm.git

commit af618f03472ca216296e88e0ab75ef999726b1f6
Author: mrproliu <[email protected]>
AuthorDate: Mon Jun 29 14:13:53 2026 +0800

    Enable FODC panic/crash diagnostics collection
---
 CHANGES.md                                       |  2 ++
 chart/templates/cluster_data_statefulset.yaml    | 31 ++++++++++++++++++++----
 chart/templates/cluster_liaison_statefulset.yaml | 24 ++++++++++++++++--
 chart/templates/standalone_statefulset.yaml      | 24 ++++++++++++++++--
 chart/values.yaml                                |  7 ++++++
 5 files changed, 79 insertions(+), 9 deletions(-)

diff --git a/CHANGES.md b/CHANGES.md
index a3cfa38..b7d5355 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -10,6 +10,8 @@ Release Notes.
 - Remove etcd support (breaking change).
   If upgrading, remove `etcd-client.*` and `cluster.*.tls.etcdSecretName`
   from your values overrides.
+- Enable FODC panic/crash diagnostics collection by default.
+  Configure via `cluster.fodc.agent.config.crashCollection.{enabled,dir}`.
 
 0.6.0
 -----------------
diff --git a/chart/templates/cluster_data_statefulset.yaml 
b/chart/templates/cluster_data_statefulset.yaml
index d22e3e8..9568682 100644
--- a/chart/templates/cluster_data_statefulset.yaml
+++ b/chart/templates/cluster_data_statefulset.yaml
@@ -191,9 +191,13 @@ spec:
             - name: {{ $env.name }}
               value: {{ .value | toString | quote }}
             {{- end }}
-           
+            {{- if and $.Values.cluster.fodc.enabled 
$.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - name: BYDB_PANIC_DIAGNOSTICS_DIR
+              value: {{ $.Values.cluster.fodc.agent.config.crashCollection.dir 
| quote }}
+            {{- end }}
+
           args:
-            - data 
+            - data
           ports:
             - containerPort: 17912
               name: grpc
@@ -253,7 +257,7 @@ spec:
           {{- $schemaClientTls := $schemaProperty.tls | default dict }}
           {{- $schemaServer := $schemaProperty.server | default dict }}
           {{- $schemaServerTls := $schemaServer.tls | default dict }}
-          {{- if or $.Values.storage.data.enabled $roleConfig.tls 
$schemaClientTls.secretName $schemaServerTls.secretName $nodeDiscoveryFileMode 
}}
+          {{- if or $.Values.storage.data.enabled $roleConfig.tls 
$schemaClientTls.secretName $schemaServerTls.secretName $nodeDiscoveryFileMode 
(and $.Values.cluster.fodc.enabled 
$.Values.cluster.fodc.agent.config.crashCollection.enabled) }}
           volumeMounts:
             {{- if $.Values.storage.data.enabled }}
             {{- range $claim := $.Values.storage.data.persistentVolumeClaims }}
@@ -294,6 +298,10 @@ spec:
               name: node-discovery-file
               readOnly: true
             {{- end }}
+            {{- if and $.Values.cluster.fodc.enabled 
$.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - name: crash-shared
+              mountPath: {{ 
$.Values.cluster.fodc.agent.config.crashCollection.dir }}
+            {{- end }}
           {{- end }}
         {{- if and $.Values.cluster.enabled $.Values.cluster.fodc.enabled }}
         - name: fodc-agent
@@ -319,6 +327,9 @@ spec:
             - --max-metrics-memory-usage-percentage={{ 
$.Values.cluster.fodc.agent.config.ktmEnabled | ternary 20 10 }}
             - --heartbeat-interval={{ 
$.Values.cluster.fodc.agent.config.heartbeatInterval }}
             - --reconnect-interval={{ 
$.Values.cluster.fodc.agent.config.reconnectInterval }}
+            {{- if $.Values.cluster.fodc.agent.config.crashCollection.enabled 
}}
+            - --crash-source-dir={{ 
$.Values.cluster.fodc.agent.config.crashCollection.dir }}
+            {{- end }}
           env:
             - name: POD_NAME
               valueFrom:
@@ -350,10 +361,16 @@ spec:
               {{- end }}
             {{- end }}
           {{- end }}
-          {{- if $roleConfig.lifecycleSidecar.enabled }}
+          {{- if or $roleConfig.lifecycleSidecar.enabled (and 
$.Values.cluster.fodc.enabled 
$.Values.cluster.fodc.agent.config.crashCollection.enabled) }}
           volumeMounts:
+            {{- if $roleConfig.lifecycleSidecar.enabled }}
             - name: lifecycle-report-shared
               mountPath: {{ default "/tmp/lifecycle-reports" 
$roleConfig.lifecycleSidecar.reportDir }}
+            {{- end }}
+            {{- if and $.Values.cluster.fodc.enabled 
$.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - name: crash-shared
+              mountPath: {{ 
$.Values.cluster.fodc.agent.config.crashCollection.dir }}
+            {{- end }}
           {{- end }}
         {{- end }}
         {{- if $roleConfig.backupSidecar.enabled }}
@@ -508,7 +525,7 @@ spec:
           {{- end }}
         {{- end }}
 
-      {{- if or $roleConfig.tls $schemaClientTls.secretName 
$schemaServerTls.secretName $nodeDiscoveryFileMode (and 
$roleConfig.lifecycleSidecar.enabled $.Values.cluster.fodc.enabled) }}
+      {{- if or $roleConfig.tls $schemaClientTls.secretName 
$schemaServerTls.secretName $nodeDiscoveryFileMode (and 
$roleConfig.lifecycleSidecar.enabled $.Values.cluster.fodc.enabled) (and 
$.Values.cluster.fodc.enabled 
$.Values.cluster.fodc.agent.config.crashCollection.enabled) }}
       volumes:
         {{- if $roleConfig.tls }}
         {{- if $roleConfig.tls.grpcSecretName }}
@@ -539,6 +556,10 @@ spec:
         - name: lifecycle-report-shared
           emptyDir: {}
         {{- end }}
+        {{- if and $.Values.cluster.fodc.enabled 
$.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+        - name: crash-shared
+          emptyDir: {}
+        {{- end }}
       {{- end }}
 
       {{- if $roleConfig.tolerations }}
diff --git a/chart/templates/cluster_liaison_statefulset.yaml 
b/chart/templates/cluster_liaison_statefulset.yaml
index 7182256..a2e9a41 100644
--- a/chart/templates/cluster_liaison_statefulset.yaml
+++ b/chart/templates/cluster_liaison_statefulset.yaml
@@ -157,6 +157,10 @@ spec:
             - name: {{ $env.name }}
               value: {{ $env.value }}
             {{- end }}
+            {{- if and .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - name: BYDB_PANIC_DIAGNOSTICS_DIR
+              value: {{ .Values.cluster.fodc.agent.config.crashCollection.dir 
| quote }}
+            {{- end }}
           args:
             - liaison
             {{- if .Values.auth.enabled }}
@@ -233,7 +237,7 @@ spec:
 
           {{- $schemaProperty := (.Values.cluster.schemaStorage).property | 
default dict }}
           {{- $schemaClientTls := $schemaProperty.tls | default dict }}
-          {{- if or .Values.storage.liaison.enabled 
.Values.cluster.liaison.tls $schemaClientTls.secretName .Values.auth.enabled 
$nodeDiscoveryFileMode }}
+          {{- if or .Values.storage.liaison.enabled 
.Values.cluster.liaison.tls $schemaClientTls.secretName .Values.auth.enabled 
$nodeDiscoveryFileMode (and .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled) }}
           volumeMounts:
             {{- if .Values.storage.liaison.enabled }}
             {{- range $claim := .Values.storage.liaison.persistentVolumeClaims 
}}
@@ -267,6 +271,10 @@ spec:
               name: node-discovery-file
               readOnly: true
             {{- end }}
+            {{- if and .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - name: crash-shared
+              mountPath: {{ 
.Values.cluster.fodc.agent.config.crashCollection.dir }}
+            {{- end }}
           {{- end }}
 
         {{- if and .Values.cluster.enabled .Values.cluster.fodc.enabled }}
@@ -290,6 +298,9 @@ spec:
             - --max-metrics-memory-usage-percentage={{ 
.Values.cluster.fodc.agent.config.ktmEnabled | ternary 20 10 }}
             - --heartbeat-interval={{ 
.Values.cluster.fodc.agent.config.heartbeatInterval }}
             - --reconnect-interval={{ 
.Values.cluster.fodc.agent.config.reconnectInterval }}
+            {{- if .Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - --crash-source-dir={{ 
.Values.cluster.fodc.agent.config.crashCollection.dir }}
+            {{- end }}
           env:
             - name: POD_NAME
               valueFrom:
@@ -321,9 +332,14 @@ spec:
               {{- end }}
             {{- end }}
           {{- end }}
+          {{- if .Values.cluster.fodc.agent.config.crashCollection.enabled }}
+          volumeMounts:
+            - name: crash-shared
+              mountPath: {{ 
.Values.cluster.fodc.agent.config.crashCollection.dir }}
+          {{- end }}
         {{- end }}
 
-      {{- if or .Values.cluster.liaison.tls $schemaClientTls.secretName 
.Values.auth.enabled $nodeDiscoveryFileMode }}
+      {{- if or .Values.cluster.liaison.tls $schemaClientTls.secretName 
.Values.auth.enabled $nodeDiscoveryFileMode (and .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled) }}
       volumes:
         {{- if .Values.cluster.liaison.tls }}
         {{- if .Values.cluster.liaison.tls.grpcSecretName }}
@@ -364,6 +380,10 @@ spec:
         - name: banyandb-auth-writable
           emptyDir: {}
         {{- end }}
+        {{- if and .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+        - name: crash-shared
+          emptyDir: {}
+        {{- end }}
       {{- end }}
 
       {{- if .Values.cluster.liaison.tolerations }}
diff --git a/chart/templates/standalone_statefulset.yaml 
b/chart/templates/standalone_statefulset.yaml
index 231c0b3..4718fb0 100644
--- a/chart/templates/standalone_statefulset.yaml
+++ b/chart/templates/standalone_statefulset.yaml
@@ -128,6 +128,10 @@ spec:
             - name: {{ $env.name }}
               value: {{ $env.value }}
             {{- end }}
+            {{- if and .Values.cluster.enabled .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - name: BYDB_PANIC_DIAGNOSTICS_DIR
+              value: {{ .Values.cluster.fodc.agent.config.crashCollection.dir 
| quote }}
+            {{- end }}
           args:
             - standalone
             {{- if .Values.auth.enabled }}
@@ -200,7 +204,7 @@ spec:
             {{- end }}
           {{- end }}
 
-          {{- if or .Values.storage.standalone.enabled .Values.standalone.tls 
.Values.auth.enabled }}
+          {{- if or .Values.storage.standalone.enabled .Values.standalone.tls 
.Values.auth.enabled (and .Values.cluster.enabled .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled) }}
           volumeMounts:
             {{- if .Values.storage.standalone.enabled }}
             {{- range $claim := 
.Values.storage.standalone.persistentVolumeClaims }}
@@ -234,6 +238,10 @@ spec:
             - mountPath: /etc/banyandb
               name: banyandb-auth-writable
             {{- end }}
+            {{- if and .Values.cluster.enabled .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - name: crash-shared
+              mountPath: {{ 
.Values.cluster.fodc.agent.config.crashCollection.dir }}
+            {{- end }}
           {{- end }}
 
         {{- if and .Values.cluster.enabled .Values.cluster.fodc.enabled }}
@@ -257,6 +265,9 @@ spec:
             - --max-metrics-memory-usage-percentage={{ 
.Values.cluster.fodc.agent.config.ktmEnabled | ternary 20 10 }}
             - --heartbeat-interval={{ 
.Values.cluster.fodc.agent.config.heartbeatInterval }}
             - --reconnect-interval={{ 
.Values.cluster.fodc.agent.config.reconnectInterval }}
+            {{- if .Values.cluster.fodc.agent.config.crashCollection.enabled }}
+            - --crash-source-dir={{ 
.Values.cluster.fodc.agent.config.crashCollection.dir }}
+            {{- end }}
           env:
             - name: POD_NAME
               valueFrom:
@@ -288,9 +299,14 @@ spec:
               {{- end }}
             {{- end }}
           {{- end }}
+          {{- if .Values.cluster.fodc.agent.config.crashCollection.enabled }}
+          volumeMounts:
+            - name: crash-shared
+              mountPath: {{ 
.Values.cluster.fodc.agent.config.crashCollection.dir }}
+          {{- end }}
         {{- end }}
 
-      {{- if or .Values.standalone.tls .Values.auth.enabled }}
+      {{- if or .Values.standalone.tls .Values.auth.enabled (and 
.Values.cluster.enabled .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled) }}
       volumes:
         {{- if .Values.standalone.tls }}
         {{- if .Values.standalone.tls.grpcSecretName }}
@@ -318,6 +334,10 @@ spec:
         - name: banyandb-auth-writable
           emptyDir: {}
         {{- end }}
+        {{- if and .Values.cluster.enabled .Values.cluster.fodc.enabled 
.Values.cluster.fodc.agent.config.crashCollection.enabled }}
+        - name: crash-shared
+          emptyDir: {}
+        {{- end }}
       {{- end }}
 
       {{- if .Values.standalone.tolerations }}
diff --git a/chart/values.yaml b/chart/values.yaml
index 051f779..4c180ad 100644
--- a/chart/values.yaml
+++ b/chart/values.yaml
@@ -1056,6 +1056,13 @@ cluster:
         ktmEnabled: true
         ## @param cluster.fodc.agent.config.pollClusterStateInterval Interval 
for polling cluster state from Proxy (poll-cluster-state-interval flag)
         pollClusterStateInterval: 30s
+        ## Panic/crash diagnostics collection. Shares an emptyDir between the 
banyand
+        ## container (writes panic.json) and the fodc-agent (reads & reports 
it).
+        crashCollection:
+          ## @param cluster.fodc.agent.config.crashCollection.enabled Enable 
panic/crash diagnostics collection
+          enabled: true
+          ## @param cluster.fodc.agent.config.crashCollection.dir Shared path 
where banyand writes panic.json and fodc-agent reads it
+          dir: /tmp/crash
       ## Liveness probe for Agent
       livenessProbe:
         ## @param cluster.fodc.agent.livenessProbe.initialDelaySeconds Initial 
delay for Agent liveness probe

Reply via email to