Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

feat(helm): expose --enable-json-logging flag in Helm chart (#19706)

Vincent Huang4abb85a1115f
diff --git a/helm-charts/bytebase/templates/statefulset.yaml b/helm-charts/bytebase/templates/statefulset.yaml
index ef8fba33a5..2e4c62e51f 100644
--- a/helm-charts/bytebase/templates/statefulset.yaml
+++ b/helm-charts/bytebase/templates/statefulset.yaml
@@ -7,6 +7,7 @@
{{- $port := .Values.bytebase.option.port -}}
{{- $data := .Values.bytebase.option.data -}}
{{- $external_url := index .Values.bytebase.option "external-url" -}}
+{{- $enableJSONLogging := index .Values.bytebase.option "enable-json-logging" -}}
# bytebase.option.externalPg
{{- $externalPgURL := .Values.bytebase.option.externalPg.url -}}
{{- $externalPgExistingPgURLSecret := .Values.bytebase.option.externalPg.existingPgURLSecret -}}
@@ -187,6 +188,9 @@ spec:
{{ $port | quote }} \
--external-url \
{{ $external_url | quote }} \
+ {{- if $enableJSONLogging }}
+ --enable-json-logging \
+ {{- end }}
ports:
- containerPort: {{ $port }}
name: web
diff --git a/helm-charts/bytebase/values.yaml b/helm-charts/bytebase/values.yaml
index 05ce45bdec..343f8f9218 100644
--- a/helm-charts/bytebase/values.yaml
+++ b/helm-charts/bytebase/values.yaml
@@ -20,6 +20,8 @@ bytebase:
port: 8080
data: "/var/opt/bytebase"
external-url: "https://docs.bytebase.com/get-started/self-host/external-url"
+ # Enable JSON formatted logging output for integration with log aggregators (Splunk, ELK, Datadog, Loki).
+ enable-json-logging: false
externalPg:
url: ""
# If users need to read the pgURL from a secret, they can specify the secret name and key here.