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 0b9367034de9f8e7e01f3b53b2fcd1057d3c618e 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 | 39 +++++++++++++++++++++--- chart/templates/cluster_liaison_statefulset.yaml | 32 +++++++++++++++++-- chart/templates/standalone_statefulset.yaml | 32 +++++++++++++++++-- chart/values.yaml | 11 +++++++ 5 files changed, 107 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..e4718a7 100644 --- a/chart/templates/cluster_data_statefulset.yaml +++ b/chart/templates/cluster_data_statefulset.yaml @@ -191,9 +191,21 @@ spec: - name: {{ $env.name }} value: {{ .value | toString | quote }} {{- end }} - + {{- if $.Values.cluster.fodc.enabled }} + - name: BYDB_PANIC_DIAGNOSTICS_ENABLED + value: {{ $.Values.cluster.fodc.agent.config.crashCollection.enabled | quote }} + {{- if $.Values.cluster.fodc.agent.config.crashCollection.enabled }} + - name: BYDB_PANIC_DIAGNOSTICS_DIR + value: {{ $.Values.cluster.fodc.agent.config.crashCollection.dir | quote }} + - name: BYDB_PANIC_DIAGNOSTICS_MAX_ARTIFACTS + value: {{ $.Values.cluster.fodc.agent.config.crashCollection.maxArtifacts | quote }} + - name: BYDB_MAX_DIAGNOSIS_MEMORY_USAGE_PERCENTAGE + value: {{ $.Values.cluster.fodc.agent.config.crashCollection.diagnosisMemoryPercent | quote }} + {{- end }} + {{- end }} + args: - - data + - data ports: - containerPort: 17912 name: grpc @@ -253,7 +265,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 +306,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 +335,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 +369,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 +533,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 +564,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..f0efebf 100644 --- a/chart/templates/cluster_liaison_statefulset.yaml +++ b/chart/templates/cluster_liaison_statefulset.yaml @@ -157,6 +157,18 @@ spec: - name: {{ $env.name }} value: {{ $env.value }} {{- end }} + {{- if .Values.cluster.fodc.enabled }} + - name: BYDB_PANIC_DIAGNOSTICS_ENABLED + value: {{ .Values.cluster.fodc.agent.config.crashCollection.enabled | quote }} + {{- if .Values.cluster.fodc.agent.config.crashCollection.enabled }} + - name: BYDB_PANIC_DIAGNOSTICS_DIR + value: {{ .Values.cluster.fodc.agent.config.crashCollection.dir | quote }} + - name: BYDB_PANIC_DIAGNOSTICS_MAX_ARTIFACTS + value: {{ .Values.cluster.fodc.agent.config.crashCollection.maxArtifacts | quote }} + - name: BYDB_MAX_DIAGNOSIS_MEMORY_USAGE_PERCENTAGE + value: {{ .Values.cluster.fodc.agent.config.crashCollection.diagnosisMemoryPercent | quote }} + {{- end }} + {{- end }} args: - liaison {{- if .Values.auth.enabled }} @@ -233,7 +245,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 +279,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 +306,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 +340,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 +388,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..0ff6015 100644 --- a/chart/templates/standalone_statefulset.yaml +++ b/chart/templates/standalone_statefulset.yaml @@ -128,6 +128,18 @@ spec: - name: {{ $env.name }} value: {{ $env.value }} {{- end }} + {{- if and .Values.cluster.enabled .Values.cluster.fodc.enabled }} + - name: BYDB_PANIC_DIAGNOSTICS_ENABLED + value: {{ .Values.cluster.fodc.agent.config.crashCollection.enabled | quote }} + {{- if .Values.cluster.fodc.agent.config.crashCollection.enabled }} + - name: BYDB_PANIC_DIAGNOSTICS_DIR + value: {{ .Values.cluster.fodc.agent.config.crashCollection.dir | quote }} + - name: BYDB_PANIC_DIAGNOSTICS_MAX_ARTIFACTS + value: {{ .Values.cluster.fodc.agent.config.crashCollection.maxArtifacts | quote }} + - name: BYDB_MAX_DIAGNOSIS_MEMORY_USAGE_PERCENTAGE + value: {{ .Values.cluster.fodc.agent.config.crashCollection.diagnosisMemoryPercent | quote }} + {{- end }} + {{- end }} args: - standalone {{- if .Values.auth.enabled }} @@ -200,7 +212,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 +246,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 +273,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 +307,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 +342,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..694fffc 100644 --- a/chart/values.yaml +++ b/chart/values.yaml @@ -1056,6 +1056,17 @@ 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 + ## @param cluster.fodc.agent.config.crashCollection.maxArtifacts Max crash artifact directories banyand retains (oldest removed first; 0 disables pruning) + maxArtifacts: 10 + ## @param cluster.fodc.agent.config.crashCollection.diagnosisMemoryPercent Set banyand GOMEMLIMIT to this percent of the cgroup memory limit, reserving headroom for post-panic diagnostics (0 disables) + diagnosisMemoryPercent: 50 ## Liveness probe for Agent livenessProbe: ## @param cluster.fodc.agent.livenessProbe.initialDelaySeconds Initial delay for Agent liveness probe
