Skip to content
Cawdit

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:

kubectl create secret generic cawdit \
  --from-literal=DATABASE_URL='postgres://cawdit:password@postgres:5432/cawdit' \
  --from-literal=FORGE_TOKEN='...' \
  --from-literal=WEBHOOK_SECRET='...' \
  --from-literal=ANTHROPIC_API_KEY='...'

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:

existingSecret: cawdit
config:
  public_url: https://cawdit.example.com
  database:
    url: env:DATABASE_URL
  forges:
    codefloe:
      url: https://codefloe.com
      token: env:FORGE_TOKEN
      webhook_secret: env:WEBHOOK_SECRET
      allowed_owners: [my-org]
  providers:
    anthropic:
      kind: anthropic
      api_key: env:ANTHROPIC_API_KEY
      models:
        review: claude-opus-5-5
        verify: claude-sonnet-5-5
ingress:
  enabled: true
  className: nginx
  hosts:
    - host: cawdit.example.com
      paths:
        - path: /
          pathType: Prefix

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:

helm install cawdit oci://codefloe.com/cawdit/charts/cawdit --version 0.1.0 -f values.yaml

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.