Self-host with Helm
The Helm chart runs cawdit serve on Kubernetes against a Postgres database you provide.
It bundles no database.
The chart’s README lists every value, and values.yaml documents the defaults.
Before you start
- A Kubernetes cluster and Helm 3.
- A Postgres database and a user that owns it.
- A bot account and its token, from Set up the forge.
- A model provider and its key, from Configure a model provider.
- A public address for the Ingress, such as
cawdit.example.com.
Create the Secret
The chart never creates a Secret, so no secret ends up in the values or in the release history. Create it in the namespace of the release:
Every key of the Secret becomes an environment variable of the same name, which the configuration references with env:NAME.
Do not name a key like a CAWDIT_* variable, because such a variable overrides the configuration.
Write the values
config is the deployment configuration as YAML, and the chart renders it to TOML:
Leave listen out, because the chart sets the port.
Helm turns every number in the values into a float, which an integer setting rejects.
For such a setting, write the whole TOML file in rawConfig, which replaces config.
To read the secrets from files instead, set secretMountPath, and reference them as file:/run/secrets/cawdit/DATABASE_URL.
Install
Each release publishes the chart with the release’s version, and the chart deploys the image of that release:
By default a Job runs cawdit migrate before Helm installs or upgrades the release, and a failed migration fails the upgrade.
When your deployment tool skips Helm hooks, set migrations.mode to serve, which migrates at the start of every pod.
Then connect the organisations or repositories in the dashboard’s settings, and Cawdit adds its webhooks with the URL https://cawdit.example.com/webhooks/codefloe on its own, as Set up the forge describes.
Monitor it
By default the Deployment uses /healthz as its liveness probe and /readyz as its readiness probe.
Set metrics.serviceMonitor.enabled to scrape /metrics with the Prometheus Operator.
The HTTP server reference lists the metrics.
Upgrade
Change --version and run helm upgrade with the same values.
On SIGTERM the pod stops taking reviews and waits up to drainTimeout for the running ones.
Keep terminationGracePeriodSeconds above drainTimeout, or Kubernetes stops the pod before the reviews finish.