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 complete quick start guide.
- 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 # Default
auth:
username: sourcebot
database: sourcebot
existingSecret: sourcebot
secretKeys:
userPasswordKey: postgresql-password
adminPasswordKey: postgresql-password
primary:
persistence:
enabled: true
size: 8Gipostgresql:
deploy: false
host: your-postgres-host.example.com
port: 5432
auth:
username: sourcebot
database: sourcebot
existingSecret: sourcebot
secretKeys:
userPasswordKey: postgresql-passwordSimilar to PostgreSQL, Redis/Valkey can be deployed as a subchart or configured to use an external instance.
redis:
deploy: true # Default
auth:
username: default
existingSecret: sourcebot
existingSecretPasswordKey: redis-passwordredis:
deploy: false
host: your-redis-host.example.com
port: 6379
auth:
username: default
existingSecret: sourcebot
existingSecretPasswordKey: redis-passwordConfigure your code repositories and other settings:
sourcebot:
config:
$schema: https://raw.githubusercontent.com/sourcebot-dev/sourcebot/main/schemas/v3/index.json
connections:
github-repos:
type: github
token:
env: GITHUB_TOKEN
repos:
- owner/repo1
- owner/repo2
settings:
reindexIntervalMs: 86400000 # 24 hoursBy default, Sourcebot uses persistent storage to retain repository data and search indexes across pod restarts:
sourcebot:
persistence:
enabled: true # Default
size: 10Gi
storageClass: "" # Uses cluster default
accessModes:
- ReadWriteOnceTo use an existing PersistentVolumeClaim:
sourcebot:
persistence:
enabled: true
existingClaim: my-existing-pvcTo disable persistence (not recommended for production):
sourcebot:
persistence:
enabled: falseEnable ingress to expose Sourcebot:
sourcebot:
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: sourcebot.example.com
paths:
- path: /
pathType: Prefix
tls:
- hosts:
- sourcebot.example.com
secretName: sourcebot-tlsSet appropriate resource limits for production:
sourcebot:
resources:
requests:
cpu: 1000m
memory: 2Gi
limits:
cpu: 2000m
memory: 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.yamlAlways check the CHANGELOG for breaking changes before upgrading between major versions.
To 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