bytebase

by Bytebase

Helm chartv1.1.8

Safe database schema change and version control for DevOps teams.

About this chart

Helm Chart for Bytebase

Bytebase is a Database CI/CD tool for DevOps teams, built for Developers and DBAs.

TL;DR

$ helm repo add bytebase-repo https://bytebase.github.io/bytebase
$ helm repo update
$ helm -n <YOUR_NAMESPACE> \
--set "bytebase.option.port"={PORT} \
--set "bytebase.option.externalPg.url"={PGDSN} \
--set "bytebase.version"={VERSION} \
install <RELEASE_NAME> bytebase-repo/bytebase

Prerequisites

  • Kubernetes 1.24+
  • Helm 3.9.0+

Pinning container images by digest

Set bytebase.version to a combined tag@digest reference. Kubernetes pulls by digest and treats the tag as documentation.

helm -n <YOUR_NAMESPACE> \
--set-string "bytebase.version"="{VERSION}@sha256:{DIGEST}" \
install <RELEASE_NAME> bytebase-repo/bytebase

The BusyBox init container used when bytebase.option.externalPg.escapePassword is enabled defaults to a fixed tag via bytebase.busyboxVersion, which also accepts a combined tag@digest reference. Azure Marketplace deployments can use the same combined reference in global.azure.images.bytebase.tag.

When upgrading from chart 1.1.4, move any digest configured through bytebase.digest, bytebase.busyboxDigest, or global.azure.images.bytebase.digest into the corresponding version or tag value. The chart rejects these removed settings to prevent an upgrade from silently losing digest pinning.

High availability note

The 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. 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
  • Upgrade guidance

Installing the Chart

$ helm -n <YOUR_NAMESPACE> \
--set "bytebase.option.port"={PORT} \
--set "bytebase.option.externalPg.url"={PGDSN} \
--set "bytebase.version"={VERSION} \
--set "bytebase.option.external-url"={EXTERNAL_URL} \
--set "bytebase.persistence.enabled"={TRUE/FALSE} \
--set "bytebase.persistence.storage"={STORAGE_SIZE} \
--set "bytebase.persistence.storageClass"={STORAGE_CLASS} \
install <RELEASE_NAME> bytebase-repo/bytebase

For example:

$ helm -n bytebase \
--set "bytebase.option.port"=443 \
--set "bytebase.option.externalPg.url"="postgresql://bytebase:[email protected]/bytebase" \
--set "bytebase.option.external-url"="https://bytebase.ngrok-free.app" \
--set "bytebase.version"=3.20.1 \
--set "bytebase.persistence.enabled"="true" \
--set "bytebase.persistence.storage"="10Gi" \
--set "bytebase.persistence.storageClass"="csi-disk" \
install bytebase-release bytebase-repo/bytebase

Uninstalling the Chart

helm delete --namespace <YOUR_NAMESPACE> <RELEASE_NAME>

Upgrade Bytebase Version/Configuration

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 (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
  • Upgrade guidance
helm -n <YOUR_NAMESPACE> \
--set "bytebase.option.port"={NEW_PORT} \
--set "bytebase.option.externalPg.url"={NEW_PGDSN} \
--set "bytebase.version"={NEW_VERSION} \
--set "bytebase.option.external-url"={EXTERNAL_URL} \
--set "bytebase.persistence.enabled"={TRUE/FALSE} \
--set "bytebase.persistence.storage"={STORAGE_SIZE} \
--set "bytebase.persistence.storageClass"={STORAGE_CLASS} \
upgrade bytebase-release bytebase-repo/bytebase

Bytebase 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:

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:

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

ParameterDescriptionDefault Value
bytebase.versionThe version of Bytebase to be installed. May embed a digest as a combined reference, for example 3.21.0@sha256:abc123."latest"
bytebase.registryMirrorHostThe host for the Docker registry mirror. Leave empty for default registry usage.""
bytebase.busyboxVersionTag of the BusyBox init container used when PostgreSQL password escaping is enabled. May embed a digest, for example 1.37.0@sha256:abc123."1.37.0"
bytebase.option.portPort where Bytebase server runs.8080
bytebase.option.dataData directory of Bytebase data stored./var/opt/bytebase
bytebase.option.external-urlThe address for users to visit Bytebase, visit our docs to get more details."https://docs.bytebase.com/get-started/self-host/external-url"
bytebase.option.enable-json-loggingOutput Bytebase logs in JSON format, for log aggregators such as Splunk, ELK, Datadog, and Loki.false
bytebase.option.haStart 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-accessAllow non-loopback clients to scrape /metrics, which answers loopback only by default. See Scraping /metrics.false
bytebase.option.externalPg.urlThe PostgreSQL url(DSN) for Bytebase to store the metadata.""
bytebase.option.externalPg.existingPgURLSecretThe name of Secret stores the PostgreSQL url(DSN) for Bytebase to store the metadata.""
bytebase.option.externalPg.existingPgURLSecretKeyThe key of Secret stores the PostgreSQL url(DSN) for Bytebase to store the metadata. Should be used with bytebase.option.externalPg.existingPgURLSecret together.""
bytebase.option.externalPg.pgHostThe PostgreSQL host for Bytebase metadata storage."host"
bytebase.option.externalPg.pgPortThe PostgreSQL port for Bytebase metadata storage."port"
bytebase.option.externalPg.pgUsernameThe PostgreSQL username for Bytebase metadata storage."username"
bytebase.option.externalPg.pgPasswordThe PostgreSQL password for Bytebase metadata storage."password"
bytebase.option.externalPg.pgDatabaseThe name of the PostgreSQL database for Bytebase."database"
bytebase.option.externalPg.existingPgPasswordSecretThe name of Secret that stores the existing PostgreSQL password for Bytebase metadata storage.""
bytebase.option.externalPg.existingPgPasswordSecretKeyThe key of Secret storing the existing PostgreSQL password. Should be used with bytebase.option.externalPg.existingPgPasswordSecret.""
bytebase.option.externalPg.escapePasswordControls whether to escape the password in the connection string. bytebase.option.externalPg.existingPgPasswordSecret or bytebase.option.externalPg.pgPassword should be specified with this value together. Experimental feature.false
bytebase.option.externalPg.awsRdsIam.enabledEnables AWS RDS IAM authentication for the Bytebase metadata PostgreSQL database when the chart constr

Deploy bytebase with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has bytebase on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartbytebase is pinned at v1.1.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply