buildbarn
by Hermetiq
Production-ready Buildbarn Helm chart for Kubernetes — remote cache (CAS/AC), remote build execution (RBE), and bb-browser/portal for Bazel and other REAPI clients. Maintained by Hermetiq.
About this chart
Hermetiq Buildbarn Helm Chart
Production-ready Buildbarn Helm chart for Kubernetes: remote cache (CAS/AC), remote build execution (RBE), Buildbarn Browser, and optionally the Remote Asset API. The chart is also listed on Artifact Hub.
This README is the operator reference packaged with the Buildbarn chart. It
covers what the chart depends on, its values, the installation, and day-2
operations. The repository's
installation guide
gives the full-stack order (routing, identity provider, metrics stack,
Hermetiq, worker operator) and sends you here for its "Install Buildbarn and
worker pools" step. Install the Hermetiq and
bb-worker-operator charts before this one:
the starter values point Buildbarn Browser at the oauth2-proxy-config-web-ui
ConfigMap and oauth2-proxy-client Secret that the Hermetiq install provides,
and RbeWorker pools need the operator's CRD.
How this README is organized:
- Install is a linear path. Read it top to bottom.
- Configure follows the blocks of the starter
buildbarn-values.yaml, in the same order as the file, followed by the blocks that only the chart'svalues.yamlcarries. - The remaining parts are reference for optional features, production hardening, and operations.
For Buildbarn upstream background, see https://github.com/buildbarn.
Contents
Install
- Migration guides
- What the chart installs: workloads, service topology
- Install prerequisites: checklist
- Configure your values file: what to set, block by block
- Install: pre-flight checks, the command, verification
Configure (same order as buildbarn-values.yaml)
- Hosts
- Jsonnet configuration: config model, per-file overrides
- Routing and TLS: providers, Envoy Gateway policies, certificates
- Storage: StorageClasses, persistent defaults, raw block devices, ISCC and FSAC
- Image and configuration checks
- Frontend authentication and writes: JWT validation, write authorizers, JWKS sync
- Browser SSO
- Scheduler: predeclared queues, configuration reload, handover
- Frontend autoscaling
- Frontend rollouts
- Worker and runner
- Worker autoscaling
- Tracing, metrics, and diagnostics
- Scheduling
Optional features
- Frontend read cache
- Remote Asset API
- bb-portal
- Hermetiq grpc-cache-proxy sidecar
- Testcontainers worker fleets
- Action routing and catch-all workers
Production readiness
- Large-scale deployments (10 TiB cache / 5–10 shards)
- DIY mirrored storage (advanced)
- In-cluster mutual TLS
- Security and availability hardening: pod security, disruption budgets, network policies
Operate
- Operations: workloads and logs, storage runbooks, sidecar image updates, upgrades
- Troubleshooting
Project
- Local chart development
- License
Migration guides
[!IMPORTANT] For upgrades from a chart version earlier than
1.0.0, follow the Buildbarn migration guide before upgrading. CDC requires fresh storage or an explicit cold-cache reset, coordinated with the worker and operator upgrade.Chart
1.0.1also offers an optional blue-green storage procedure to stage replacement storage before switching clients.
What the chart installs
| Workload | Kind | Role | Service ports |
|---|---|---|---|
frontend | Deployment, optional KEDA ScaledObject | Entry point for Bazel: Remote Execution, CAS, ByteStream, and Action Cache APIs. Forwards execution requests to the scheduler and cache traffic to the storage shards. Runs the optional grpc-cache-proxy sidecar. | frontend-grpc 8980 (gRPC); frontend-internal 8980 for in-cluster clients |
scheduler-ubuntu22-04 | Deployment | Queues actions and assigns them to workers that match the requested platform properties. | scheduler 8982 (clients), 8983 (workers), 8984 (BuildQueueState), 7982 (web UI) |
storage | StatefulSet, one Pod per shard | The CAS, Action Cache, ISCC, and FSAC stores. | storage, headless: 8981 (gRPC) |
browser | Deployment | Buildbarn Browser UI, behind an optional oauth2-proxy sidecar. | browser 80 with oauth2-proxy, 7984 without |
remote-asset | Deployment, when remoteAsset.enabled | Remote Asset Fetch API. Stores fetched blobs in CAS. | remote-asset and remote-asset-grpc on remoteAsset.port, 8985 by default (gRPC) |
bb-portal | Deployment, when portal.enabled | bb-portal build-event dashboard and BES endpoint. | bb-portal 8081 (HTTP), 8082 (BES gRPC) |
| JWKS sync | CronJob and initial Job, when frontend.jwks.sync.enabled | Copies the identity provider's signing keys into the JWKS ConfigMap. | none |
Each workload also serves diagnostics and Prometheus metrics on :9980. The
frontend-internal ClusterIP Service is rendered when
frontend.internalService.enabled=true (the default); bb-browser reads CAS
through it.
The chart also renders:
- The
buildbarn-configConfigMap for browser, frontend, scheduler, storage, and remote asset Jsonnet, and thebuildbarn-worker-configConfigMap with the sharedcommon.libsonnetfor operator-managed workers. - Routing resources for the provider you select: Contour
HTTPProxy, Gateway APIHTTPRoute/GRPCRoute, or nginx-styleIngress, with an optional cert-managerCertificatefor Contour or Ingress routing. - Optional PodDisruptionBudgets for storage, frontend, scheduler, Browser, and remote asset workloads.
- An optional NetworkPolicy that restricts the storage gRPC port to Buildbarn
components and named peers (
storage.networkPolicy.enabled), and one that restricts the scheduler's client, worker, and BuildQueueState ports to the frontend, workers, bb-portal, and named peers (scheduler.networkPolicy.enabled). - Optional VictoriaMetrics
VMPodScrapeandVMRuleresources. - The JWKS sync ServiceAccount and RBAC when the sync is enabled.
Worker pools are managed through RbeWorker resources reconciled by the
bb-worker-operator. This chart does not
render worker Deployments or worker KEDA ScaledObject resources.
The chart does not install a routing controller, cert-manager, KEDA, a metrics backend, the bb-worker-operator, or an identity provider. The prerequisites below and the repository guide cover them.
Service topology
The chart follows Buildbarn's standard split:
- Clients connect to
frontend-grpcfor Remote Execution, CAS, ByteStream, and Action Cache APIs. frontendforwards execution requests toscheduler.schedulerassigns queued operations to workers matching the requested platform properties.workercontainers fetch inputs from CAS, mount or materialize build inputs, call their localrunnerover a Unix socket, and upload outputs back to CAS.storageshards hold CAS and Action Cache data on persistent disks.browserprovides the Buildbarn Browser UI. It reads CAS through the frontend on:8980and the Action Cache from the storage shards.remote-asset, when enabled, serves the Bazel Remote Asset Fetch API and stores fetched blobs in CAS.bb-portal, when enabled, serves the bb-portal build-event dashboard and BES endpoint (see bb-portal).
Install prerequisites
Everything in this section must exist before helm runs. Commands in this
README use the hermetiq namespace; substitute your own if it differs. They
also assume your shell is in the copied values directory from the repository's
prepare custom values
step.
Namespaced resources render into the release namespace (--namespace):
namespaceOverride: ""
createNamespace: false
Set namespaceOverride to render into a different namespace, and
createNamespace: true if Helm should create it.
Checklist
- [ ] Kubernetes cluster and node pools
- Kubernetes
1.32+with enough CPU, memory, and disk quota in the target namespace. - Dedicated non-spot nodes for
storagepods. The defaultstorage.podAntiAffinity.enabled: truealready requires one shard per node, so a 5–10 shard deployment needs at least that many eligible nodes. - Elastic Linux
amd64worker node pool(s) sized for yourRbeWorkerpods, with NVMe scratch disk if workers use local CAS caches.
- Kubernetes
- [ ] Required cluster controllers and operators
- Routing controller matching
routing.provider: Envoy Gateway or another GRPCRoute-capable Gateway API controller (gateway), GKE Gateway (gateway-httproute-only), Contour (contour), or an Ingress controller (ingress). Usenoneto bring your own routing. - cert-manager (or pre-created TLS certificate Secrets) for terminating
TLS on
bb.<domainBase>andbrowser.<domainBase>, plusrbe-web.<domainBase>andasset.<domainBase>if you expose the scheduler web UI or the Remote Asset API. - KEDA 2.x if using
RbeWorkerautoscaling (including scale-from-zero) orkeda.frontendautoscaling. - Metrics backend reachable at
keda.prometheusServerAddress. The chart rendersVMPodScrapeandVMRuleresources by default (vmPodScrapes.enabled,vmRules.enabled), so either install the VictoriaMetrics Operator CRDs or set both tofalseand scrape with your own Prometheus configuration. Add Kubernetesmetrics-serverif you enable frontend CPU/memory KEDA triggers. bb-worker-operatorand itsRbeWorkerCRD, installed in the release namespace (hermetiqin this guide) with the defaultrbac.mode=clusteror withrbac.mode=namespace(see its RBAC scope), soRbeWorkerresources reconcile after the chart installs.
- Routing controller matching
- [ ] Target namespace and Pod Security Admission (PSA)
- Create the target namespace (for example,
hermetiq). - Label it
pod-security.kubernetes.io/enforce=privilegedif you will run FUSE-basedRbeWorkerpools (every starter worker incustom-values/rbeworkers/uses a FUSEvirtualBuildDirectory) orhostPathraw-block storage (mode: hostPathwithbackend: blockDevice). Raw-block PVCs withblockDevice.deviceAccess: chownInitneed at least thebaselinelevel.kubectl create namespace hermetiq --dry-run=client -o yaml | kubectl apply -f - kubectl label namespace hermetiq pod-security.kubernetes.io/enforce=privileged --overwrite
- Create the target namespace (for example,
- [ ] Storage provisioning and immutable PVC decisions (before first install)
- PVC storage (
mode: pvc): runkubectl get storageclassand pick a fast SSD StorageClass (for examplepremium-rwoorhyperdisk-balancedon GKE,gp3on EKS). Set it for every store that gets a claim: CAS, AC, ISCC and FSAC each have their ownstorageClassName(see StorageClasses). Decide onstorage.persistence.iscc.enabledandstorage.persistence.fsac.enabled(both default totrue) before the initial install (see Decide before the first install). - Local NVMe raw block storage (
mode: hostPath,backend: blockDevice): provision the node pool with raw unformatted NVMe SSDs (--local-nvme-ssd-blockon GKE), deploycustom-values/partition-ephemeral-disks-daemonset.yaml, and verify nodes carry the readiness labelhermetiq/ephemeral-lvm=readybefore installing Buildbarn. - Key-location map (KLM) validation: set
storage.keyLocationMapSizing.validate: trueso Helm verifies at render time that every store's KLM can index at least2xthe objects its block capacity can hold.
- PVC storage (
- [ ] DNS, TLS, OIDC, and registry Secrets
- DNS records for
bb.<domainBase>andbrowser.<domainBase>(plusrbe-web.andasset.if enabled) pointing at your Gateway or Ingress external IP. - An image pull Secret (
imagePullSecretsorglobal.imagePullSecrets) only if you mirror the chart's images into a private registry. The default images, including the Hermetiqgrpc-cache-proxysidecar, are public. - The
oauth2-proxy-clientOIDC Secret (the same one the Hermetiq chart's prerequisites create) and your IdP's JWKS URL if enablingbrowser.oauth2Proxyandfrontend.jwks.
- DNS records for
Configure your values file
Start from the [Buildbarn starter values](https://github.com/Hermetiq/hermetiq-k8s/blob/mai
Deploy buildbarn with OpenTenant
Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has buildbarn on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.
- Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
- Place the chartbuildbarn is pinned at v1.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
- ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below opentenant validate opentenant.yaml terraform init && terraform apply