Skip to content

sourcebot-dev/sourcebot-helm-chart

Repository files navigation

Sourcebot Helm Chart

Artifact Hub

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/

Introduction

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)

Prerequisites

  • Kubernetes 1.19+
  • Helm 3.x
  • PV provisioner support in the underlying infrastructure (for PostgreSQL and Sourcebot data persistence)

Installing the Chart

Quick Start

See the minimal installation example for a example deployment.

Step-by-Step Installation

  1. 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
  1. Add the Helm Repository:
helm repo add sourcebot https://sourcebot-dev.github.io/sourcebot-helm-chart helm repo update
  1. Install the Chart:
helm install sourcebot sourcebot/sourcebot \ --set postgresql.auth.existingSecret=sourcebot \ --set redis.auth.existingSecret=sourcebot

Or using a values file:

helm install sourcebot sourcebot/sourcebot -f values.yaml

Configuration

Database Configuration

By 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.

Using the Deployed PostgreSQL Subchart

postgresql: deploy: true # Defaultauth: username: sourcebotdatabase: sourcebotexistingSecret: sourcebotsecretKeys: userPasswordKey: postgresql-passwordadminPasswordKey: postgresql-passwordprimary: persistence: enabled: truesize: 8Gi

Using an External PostgreSQL Instance

postgresql: deploy: falsehost: your-postgres-host.example.comport: 5432auth: username: sourcebotdatabase: sourcebotexistingSecret: sourcebotsecretKeys: userPasswordKey: postgresql-password

Redis Configuration

Similar to PostgreSQL, Redis/Valkey can be deployed as a subchart or configured to use an external instance.

Using the Deployed Redis Subchart

redis: deploy: true # Defaultauth: username: defaultexistingSecret: sourcebotexistingSecretPasswordKey: redis-password

Using an External Redis Instance

redis: deploy: falsehost: your-redis-host.example.comport: 6379auth: username: defaultexistingSecret: sourcebotexistingSecretPasswordKey: redis-password

Sourcebot Configuration

Configure 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 hours

Persistence Configuration

By default, Sourcebot uses persistent storage to retain repository data and search indexes across pod restarts:

sourcebot: persistence: enabled: true # Defaultsize: 10GistorageClass: ""# Uses cluster defaultaccessModes: - ReadWriteOnce

To use an existing PersistentVolumeClaim:

sourcebot: persistence: enabled: trueexistingClaim: my-existing-pvc

To disable persistence (not recommended for production):

sourcebot: persistence: enabled: false

Ingress Configuration

Enable 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-tls

Resource Limits

Set appropriate resource limits for production:

sourcebot: resources: requests: cpu: 1000mmemory: 2Gilimits: cpu: 2000mmemory: 4Gi

Examples

Check out the examples directory for complete configuration examples:

Upgrading

To a New Version

helm upgrade sourcebot sourcebot/sourcebot -f values.yaml

Uninstalling

To uninstall/delete the sourcebot deployment:

helm uninstall sourcebot

This removes all Kubernetes components associated with the chart but preserves PersistentVolumeClaims (PVCs) by default. This includes:

  • sourcebot-data - Sourcebot repository data and search indexes
  • data-sourcebot-postgresql-0 - PostgreSQL data (if deployed)
  • valkey-data-sourcebot-redis-* - Redis data (if deployed)

To also remove all PVCs (⚠️this will delete all your data):

kubectl delete pvc -l app.kubernetes.io/instance=sourcebot

About

Kubernetes config and Helm chart for Sourcebot

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages