Repository navigation
feat: default Sourcebot data volume to 100Gi for new installs - #154
Open
brendan-kellam wants to merge 3 commits into
Open
brendan-kellam wants to merge 3 commits into
brendan-kellam wants to merge 3 commits into
Conversation
The 10Gi default is below the sizing guide's smallest tier (50 GB for up to 100 repos). The typical k8s install indexes about 400 repos, and several deployments on the default have filled their volume. `sourcebot.persistence.size` now defaults to unset: - an explicit size always wins (unchanged behaviour) - when unset, an existing PVC keeps its current size, so the upgrade never tries to resize a live volume. Resizing fails on storage classes without allowVolumeExpansion. - when unset on a new install, the PVC gets 100Gi Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
brendan-kellam
force-pushed
the
brendan/bump-default-persistence-size
branch
from
November 3, 2026 21:28
b12fe7b to
2842ec4
Compare
Contributor
Copying an explicit size into an upgrade would resize an existing volume, which fails on storage classes without allowVolumeExpansion. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New installs now get a 100Gi Sourcebot data volume instead of 10Gi. Existing volumes keep their current size on upgrade.
Why
The 10Gi default is below the sizing guide's smallest tier, which is 50 GB for up to 100 repos.
Service ping data from k8s deployments in the last 7 days:
100Gi matches the sizing guide's tier for 100–500 repos. It costs about $8–10 a month on gp3 or pd-balanced.
How it works
sourcebot.persistence.sizenow defaults to"".templates/pvc.yamlresolves the size this way:size100GiWhy not just change the default to
100Gi?allowVolumeExpansion, that upgrade fails. The test run below shows this.Why not look up the StorageClass instead?
lookuperrors onForbidden, not only onNotFound.Caveat: Argo CD
Argo CD renders the chart without cluster access, so
lookupreturns nothing. Argo CD users on the old default will see a PVC change from 10Gi to 100Gi. If you use Argo CD:sourcebot.persistence.size: 10Gi.This caveat is in the CHANGELOG.
Testing
Unit tests
tests/pvc_test.yamlsuite. It fakes the existing-PVC lookup withkubernetesProvider. It covers:volumeNamehelm unittest: 25/25 pass.helm lintpasses. helm-docs is up to date.Real cluster
I ran real
helm installandhelm upgradecommands on minikube. ItsstandardStorageClass has noallowVolumeExpansion.main(10Gi default)mainwithsize=100Gi(what a plain default bump would do)UPGRADE FAILED: … storageclass that provisions the pvc must support resizesizeunsetsize=20Gimain. This is unchanged: an explicit size is passed through as before.🤖 Generated with Claude Code
Note
Medium Risk
Changes persistent volume sizing behavior on upgrade and GitOps renders; Argo CD users on the old implicit default may get an unintended 100Gi PVC spec unless they set size explicitly.
Overview
New installs now provision a 100Gi Sourcebot data volume instead of 10Gi. The chart value
sourcebot.persistence.sizedefaults to"", andpvc.yamlresolves storage at render time: an explicitsizestill wins; when unset, an existing PVC keeps its current request (via Helmlookup), otherwise 100Gi is used.This avoids upgrade failures on storage classes that cannot resize volumes, which a straight default bump would trigger. Argo CD users who render without cluster access may still see a manifest jump to 100Gi unless they pin
sourcebot.persistence.size: 10Gi(documented in CHANGELOG/README).Adds a helm unittest suite for PVC sizing and updates chart/docs copy to point at the sizing guide.
Reviewed by Cursor Bugbot for commit 8ae7e89. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit