Skip to content

Helm Deployment

Chart: deploy/helm/dbward/

  • Helm 3
  • Kubernetes cluster with kubectl access
  • A PostgreSQL or MySQL database accessible from the cluster

The agent needs a token generated by the server on first startup. Deploy in two phases:

Terminal window
helm install dbward deploy/helm/dbward/ \
--set agent.enabled=false \
--set secrets.databaseUrl="postgres://user:pass@db-host:5432/app"

Wait for the server to become ready:

Terminal window
kubectl rollout status deploy/dbward-server
Terminal window
# Get the agent token
kubectl exec deploy/dbward-server -- cat /data/agent-token
Terminal window
helm upgrade dbward deploy/helm/dbward/ \
--set agent.enabled=true \
--set secrets.agentToken="dbw_..." \
--set secrets.databaseUrl="postgres://user:pass@db-host:5432/app"

The chart creates a ClusterIP Service. To access it:

Terminal window
kubectl port-forward svc/dbward-server 3000:3000

For production, add an Ingress resource or change the Service type in a values override.

Key settings:

server:
image:
repository: ghcr.io/dbward-dev/dbward-server
tag: "" # defaults to Chart.appVersion
port: 3000
persistence:
enabled: true
size: 1Gi
config: |
state_dir = "/data"
[auth]
mode = "token"
[[databases]]
name = "app"
environments = ["production"]
agent:
enabled: true
image:
repository: ghcr.io/dbward-dev/dbward-agent
tag: ""
replicas: 1
config: |
agent_id = "prod-agent"
poll_interval_ms = 1000
[server]
url = "http://dbward-server:3000"
agent_token = "${DBWARD_AGENT_TOKEN}"
[databases.app.production]
url = "${DATABASE_URL}"
secrets:
create: true
agentToken: ""
databaseUrl: ""
networkPolicy:
enabled: true

For full configuration details, see server.md (server.toml options) and agent.md (agent.toml options).

Why HTTP? The agent URL http://dbward-server:3000 uses a bare hostname (no dots), which is recognized as cluster-internal communication. HTTPS is not required. If you use an external FQDN, configure HTTPS or set allow_insecure = true.

The chart models a single agent configuration. For multiple databases or environments with different capabilities:

  • Deploy a second release: helm install dbward-staging deploy/helm/dbward/ --set ...
  • Or extend values.yaml with custom templates
Terminal window
helm upgrade dbward deploy/helm/dbward/ \
--set server.image.tag=v0.1.3 \
--set agent.image.tag=v0.1.3

The server applies SQLite migrations automatically on startup.

Terminal window
helm uninstall dbward

Note: The PVC (dbward-server-data) is not deleted by helm uninstall. Delete it manually if you want to remove all state.

The chart includes a NetworkPolicy when networkPolicy.enabled=true. For details on what traffic is allowed, see Kubernetes deployment — Network Policy.