bytebase
by Bytebase
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
| Parameter | Description | Default Value |
|---|---|---|
bytebase.version | The version of Bytebase to be installed. May embed a digest as a combined reference, for example 3.21.0@sha256:abc123. | "latest" |
bytebase.registryMirrorHost | The host for the Docker registry mirror. Leave empty for default registry usage. | "" |
bytebase.busyboxVersion | Tag 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.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 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. | 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. | "" |
bytebase.option.externalPg.pgHost | The PostgreSQL host for Bytebase metadata storage. | "host" |
bytebase.option.externalPg.pgPort | The PostgreSQL port for Bytebase metadata storage. | "port" |
bytebase.option.externalPg.pgUsername | The PostgreSQL username for Bytebase metadata storage. | "username" |
bytebase.option.externalPg.pgPassword | The PostgreSQL password for Bytebase metadata storage. | "password" |
bytebase.option.externalPg.pgDatabase | The name of the PostgreSQL database for Bytebase. | "database" |
bytebase.option.externalPg.existingPgPasswordSecret | The name of Secret that stores the existing PostgreSQL password for Bytebase metadata storage. | "" |
bytebase.option.externalPg.existingPgPasswordSecretKey | The key of Secret storing the existing PostgreSQL password. Should be used with bytebase.option.externalPg.existingPgPasswordSecret. | "" |
bytebase.option.externalPg.escapePassword | Controls 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.enabled | Enables 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.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartbytebase is pinned at v1.1.8 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- 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