Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
feat(helm-charts): pass --metrics-remote-access and --ha (#21723)
Danny Xu93c360145601
diff --git a/docs/bytebase-1.1.8.tgz b/docs/bytebase-1.1.8.tgznew file mode 100644index 0000000000..a32dd2d2a8Binary files /dev/null and b/docs/bytebase-1.1.8.tgz differdiff --git a/docs/index.yaml b/docs/index.yamlindex 7531f4b80d..33798ede6b 100644--- a/docs/index.yaml+++ b/docs/index.yaml@@ -1,6 +1,22 @@apiVersion: v1entries:bytebase:+ - apiVersion: v2+ created: "2026-10-30T17:50:01.835169955Z"+ description: Safe database schema change and version control for DevOps teams.+ digest: 84510b80e5128622af69033eab5454cf226c984202d6d867a8bb6a2b41fee66c+ home: https://www.bytebase.com/+ icon: https://raw.githubusercontent.com/bytebase/bytebase.com/main/public/images/logo.svg+ maintainers:+ - email: [email protected]+ name: Bytebase+ name: bytebase+ sources:+ - https://github.com/bytebase/bytebase+ type: application+ urls:+ - bytebase-1.1.8.tgz+ version: 1.1.8- apiVersion: v2created: "2026-10-23T17:39:38.748262+08:00"description: Safe database schema change and version control for DevOps teams.@@ -97,4 +113,4 @@ entries:urls:- bytebase-1.1.1.tgzversion: 1.1.1-generated: "2026-10-23T17:39:38.747818+08:00"+generated: "2026-10-30T17:50:01.834226406Z"diff --git a/docs/operations/high-availability.md b/docs/operations/high-availability.mdindex 9665c9d13a..ce2a9a6db1 100644--- a/docs/operations/high-availability.md+++ b/docs/operations/high-availability.md@@ -6,7 +6,7 @@ This runbook describes the current operator-facing behavior for running Bytebase- Bytebase can detect and operate with multiple active replicas that share the same metadata database.- HA is license-gated. The subscription API exposes this as the `ha` field on `Subscription`.-- The bundled Helm chart in `helm-charts/bytebase` currently renders a single-replica StatefulSet (`replicas: 1`). It does not provide a multi-replica deployment switch.+- The bundled Helm chart in `helm-charts/bytebase` currently renders a single-replica StatefulSet (`replicas: 1`). It does not provide a multi-replica deployment switch, though `bytebase.option.ha` starts the replica it manages with `--ha`.In other words: the runtime has HA awareness, but operators must still supply the multi-replica deployment mechanics outside the current Helm chart.@@ -19,6 +19,7 @@ Before you keep more than one Bytebase server active at the same time, make sure2. **Every HA replica starts with `--ha` and the same shared metadata database.**- Active replicas are counted as Bytebase servers sharing the same database.- HA mode requires external PostgreSQL, so each replica must use the same `PG_URL` value instead of the embedded database.+ - Under the bundled Helm chart, set `bytebase.option.ha=true` to pass the flag to the replica it manages.3. **All replicas use the same external URL.**- Start replicas with the same `--external-url` value so Bytebase reports one `externalUrl` for user access and callbacks.4. **Your platform provides traffic management and rollout control.**diff --git a/helm-charts/bytebase/Chart.yaml b/helm-charts/bytebase/Chart.yamlindex 83bcc40a8f..a3b4995dd1 100644--- a/helm-charts/bytebase/Chart.yaml+++ b/helm-charts/bytebase/Chart.yaml@@ -1,6 +1,6 @@apiVersion: v2name: bytebase-version: 1.1.7+version: 1.1.8description: Safe database schema change and version control for DevOps teams.type: applicationhome: https://www.bytebase.com/diff --git a/helm-charts/bytebase/README.md b/helm-charts/bytebase/README.mdindex 7583742d08..19c7ec3158 100644--- a/helm-charts/bytebase/README.md+++ b/helm-charts/bytebase/README.md@@ -37,7 +37,7 @@ When upgrading from chart 1.1.4, move any digest configured through `bytebase.diThe bundled Helm chart currently deploys Bytebase as a single-replica StatefulSet. It does not expose a Helm value for running multiple Bytebase application replicas.-If you are preparing an HA deployment, treat the multi-replica topology as operator-managed outside this chart. Each HA replica must still start with `--ha` and the same shared external PostgreSQL `PG_URL`; review the operator runbook before proceeding:+If you are preparing an HA deployment, treat the multi-replica topology as operator-managed outside this chart. Each HA replica must still start with `--ha` and the same shared external PostgreSQL `PG_URL`. Set `bytebase.option.ha=true` so the replica this chart manages starts with the flag too; review the operator runbook before proceeding:- [High availability runbook](../../docs/operations/high-availability.md)- [Upgrade guidance](../../docs/operations/upgrade.md)@@ -80,7 +80,7 @@ helm delete --namespace <YOUR_NAMESPACE> <RELEASE_NAME>Use `helm upgrade` command to upgrade the bytebase version or configuration.-For HA-aware operations, note that this chart still renders `replicas: 1`. A `helm upgrade` does not enable a multi-replica topology by itself. If you operate multiple Bytebase servers outside this chart, keep `--ha` and the shared external PostgreSQL `PG_URL` consistent on every replica and follow the operator runbook and upgrade guidance here:+For HA-aware operations, note that this chart still renders `replicas: 1`. A `helm upgrade` does not enable a multi-replica topology by itself. If you operate multiple Bytebase servers outside this chart, keep `--ha` (`bytebase.option.ha` for the replica this chart manages) and the shared external PostgreSQL `PG_URL` consistent on every replica and follow the operator runbook and upgrade guidance here:- [High availability runbook](../../docs/operations/high-availability.md)- [Upgrade guidance](../../docs/operations/upgrade.md)@@ -99,6 +99,29 @@ upgrade bytebase-release bytebase-repo/bytebaseBytebase migrates its metadata database at startup and opens its port only after the migration finishes, which can take a long time on a large metadata database. The chart sets only a readiness probe on `/healthz`, so the pod stays unready during the migration instead of being restarted. If you pass `--wait` or `--atomic` to `helm upgrade`, set `--timeout` above the expected migration time. Helm's default is `5m`, and `--atomic` rolls the release back to the previous Bytebase version when it expires, which does not support the migrated metadata database.+## Scraping /metrics++Since Bytebase 3.22.0, the Prometheus endpoint at `/metrics` answers loopback clients only. An in-cluster scraper gets a 404 until the server starts with `--metrics-remote-access`:++```bash+helm -n <YOUR_NAMESPACE> \+--set "bytebase.option.metrics-remote-access"=true \+upgrade <RELEASE_NAME> bytebase-repo/bytebase+```++`bytebase.podAnnotations` makes the pod discoverable, and needs this value set as well. Keep `prometheus.io/port` equal to `bytebase.option.port`:++```yaml+bytebase:+ option:+ metrics-remote-access: true+ podAnnotations:+ prometheus.io/scrape: "true"+ prometheus.io/port: "8080"+```++`/metrics` carries no authentication of its own. Enable it only where the port is reachable from the scraper alone, through a gateway path allowlist, a firewall, or a NetworkPolicy. An Ingress or HTTPRoute that matches `/` publishes `/metrics` to everything that reaches the route, along with the rest of the app.+## Parameters| Parameter | Description | Default Value |@@ -109,6 +132,9 @@ Bytebase migrates its metadata database at startup and opens its port only after| `bytebase.option.port` | Port where Bytebase server runs. | 8080 || `bytebase.option.data` | Data directory of Bytebase data stored. | /var/opt/bytebase || `bytebase.option.external-url` | The address for users to visit Bytebase, visit [our docs](https://docs.bytebase.com/get-started/self-host/external-url/) to get more details. | "<https://docs.bytebase.com/get-started/self-host/external-url>" |+| `bytebase.option.enable-json-logging` | Output Bytebase logs in JSON format, for log aggregators such as Splunk, ELK, Datadog, and Loki. | false |+| `bytebase.option.ha` | Start the Bytebase server with `--ha`. Required on every replica once more than one server shares an external PostgreSQL; this chart still renders `replicas: 1`. | false |+| `bytebase.option.metrics-remote-access` | Allow non-loopback clients to scrape `/metrics`, which answers loopback only by default. See [Scraping /metrics](#scraping-metrics). | false || `bytebase.option.externalPg.url` | The PostgreSQL url(DSN) for Bytebase to store the metadata. | "" || `bytebase.option.externalPg.existingPgURLSecret` | The name of Secret stores the PostgreSQL url(DSN) for Bytebase to store the metadata. | "" || `bytebase.option.externalPg.existingPgURLSecretKey` | The key of Secret stores the PostgreSQL url(DSN) for Bytebase to store the metadata. Should be used with `bytebase.option.externalPg.existingPgURLSecret` together. | "" |diff --git a/helm-charts/bytebase/templates/statefulset.yaml b/helm-charts/bytebase/templates/statefulset.yamlindex 372a5f70cf..478697fdae 100644--- a/helm-charts/bytebase/templates/statefulset.yaml+++ b/helm-charts/bytebase/templates/statefulset.yaml@@ -6,6 +6,8 @@{{- $data := .Values.bytebase.option.data -}}{{- $external_url := index .Values.bytebase.option "external-url" -}}{{- $enableJSONLogging := index .Values.bytebase.option "enable-json-logging" -}}+{{- $ha := .Values.bytebase.option.ha -}}+{{- $metricsRemoteAccess := index .Values.bytebase.option "metrics-remote-access" -}}# bytebase.option.externalPg{{- $externalPgURL := .Values.bytebase.option.externalPg.url -}}{{- $externalPgExistingPgURLSecret := .Values.bytebase.option.externalPg.existingPgURLSecret -}}@@ -173,6 +175,12 @@ spec:{{- if $enableJSONLogging }}--enable-json-logging \{{- end }}+ {{- if $ha }}+ --ha \+ {{- end }}+ {{- if $metricsRemoteAccess }}+ --metrics-remote-access \+ {{- end }}ports:- containerPort: {{ $port }}name: webdiff --git a/helm-charts/bytebase/values.yaml b/helm-charts/bytebase/values.yamlindex 04a2ad49e2..4f902770c7 100644--- a/helm-charts/bytebase/values.yaml+++ b/helm-charts/bytebase/values.yaml@@ -28,6 +28,16 @@ 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+ # Run in HA mode. Required on every replica once more than one Bytebase server+ # shares an external PostgreSQL: it turns off the in-process metadata cache, so a+ # replica never serves another replica's stale writes. This chart renders+ # replicas: 1, so set it only when further replicas run outside the chart.+ ha: false+ # Let non-loopback clients scrape /metrics, which answers loopback only by+ # default. The endpoint is unauthenticated, so enable it only where the port is+ # protected by a gateway, firewall, or NetworkPolicy; an Ingress or HTTPRoute+ # matching / publishes /metrics along with the rest of the app.+ metrics-remote-access: falseexternalPg:url: ""# If users need to read the pgURL from a secret, they can specify the secret name and key here.@@ -73,7 +83,9 @@ bytebase:failureThreshold: 3# -- Annotations added to the Bytebase pod. Useful for metrics scrapers and- # other tooling that discovers pods by annotation.+ # other tooling that discovers pods by annotation. Annotations alone do not open+ # /metrics: a scraper also needs bytebase.option.metrics-remote-access, and+ # prometheus.io/port must match bytebase.option.port.podAnnotations: {}# prometheus.io/scrape: "true"# prometheus.io/port: "8080"