Sourcebot is a self-hosted tool that helps you understand your codebase. This repository contains the official helm chart for deploying Sourcebot onto a Kubernetes cluster.
Homepage:https://sourcebot.dev/
This chart bootstraps a Sourcebot deployment on a Kubernetes cluster using the Helm package manager.
By default, this chart deploys:
- Sourcebot application
- PostgreSQL database (via Bitnami subchart)
- Redis/Valkey cache (via Bitnami subchart)
- Kubernetes 1.19+
- Helm 3.x
- PV provisioner support in the underlying infrastructure (for PostgreSQL and Sourcebot data persistence)
See the minimal installation example for a example deployment.
- Create a Secret with your database and Redis passwords:
kubectl create secret generic sourcebot \ --from-literal=postgresql-password=your-secure-password \ --from-literal=redis-password=your-secure-password- Add the Helm Repository:
helm repo add sourcebot https://sourcebot-dev.github.io/sourcebot-helm-chart helm repo update- Install the Chart:
helm install sourcebot sourcebot/sourcebot \ --set postgresql.auth.existingSecret=sourcebot \ --set redis.auth.existingSecret=sourcebotOr using a values file:
helm install sourcebot sourcebot/sourcebot -f values.yamlBy default, PostgreSQL is deployed as a subchart. The chart automatically configures the connection using component-based environment variables (DATABASE_HOST, DATABASE_USERNAME, DATABASE_PASSWORD, etc.), which are assembled into DATABASE_URL by the application's entrypoint script.
postgresql: deploy: true # Defaultauth: username: sourcebotdatabase: sourcebotexistingSecret: sourcebotsecretKeys: userPasswordKey: postgresql-passwordadminPasswordKey: postgresql-passwordprimary: persistence: enabled: truesize: 8Gipostgresql: deploy: falsehost: your-postgres-host.example.comport: 5432auth: username: sourcebotdatabase: sourcebotexistingSecret: sourcebotsecretKeys: userPasswordKey: postgresql-passwordSimilar to PostgreSQL, Redis/Valkey can be deployed as a subchart or configured to use an external instance.
redis: deploy: true # Defaultauth: username: defaultexistingSecret: sourcebotexistingSecretPasswordKey: redis-passwordredis: deploy: falsehost: your-redis-host.example.comport: 6379auth: username: defaultexistingSecret: sourcebotexistingSecretPasswordKey: redis-passwordConfigure your code repositories and other settings:
sourcebot: config: $schema: https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.jsonconnections: github-repos: type: githubtoken: env: GITHUB_TOKENrepos: - owner/repo1 - owner/repo2settings: reindexIntervalMs: 86400000# 24 hoursBy default, Sourcebot uses persistent storage to retain repository data and search indexes across pod restarts:
sourcebot: persistence: enabled: true # Defaultsize: 10GistorageClass: ""# Uses cluster defaultaccessModes: - ReadWriteOnceTo use an existing PersistentVolumeClaim:
sourcebot: persistence: enabled: trueexistingClaim: my-existing-pvcTo disable persistence (not recommended for production):
sourcebot: persistence: enabled: falseEnable ingress to expose Sourcebot:
sourcebot: ingress: enabled: trueclassName: nginxannotations: cert-manager.io/cluster-issuer: letsencrypt-prodhosts: - host: sourcebot.example.compaths: - path: /pathType: Prefixtls: - hosts: - sourcebot.example.comsecretName: sourcebot-tlsSet appropriate resource limits for production:
sourcebot: resources: requests: cpu: 1000mmemory: 2Gilimits: cpu: 2000mmemory: 4GiCheck out the examples directory for complete configuration examples:
- Minimal Installation - Basic setup with subcharts
- More examples coming soon
helm upgrade sourcebot sourcebot/sourcebot -f values.yamlTo uninstall/delete the sourcebot deployment:
helm uninstall sourcebotThis removes all Kubernetes components associated with the chart but preserves PersistentVolumeClaims (PVCs) by default. This includes:
sourcebot-data- Sourcebot repository data and search indexesdata-sourcebot-postgresql-0- PostgreSQL data (if deployed)valkey-data-sourcebot-redis-*- Redis data (if deployed)
To also remove all PVCs (
kubectl delete pvc -l app.kubernetes.io/instance=sourcebot