buildbarn

by Hermetiq

Helm chartv1.0.2App 20261118T120531ZApache-2.0Verified publisher

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's values.yaml carries.
  • 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.1 also offers an optional blue-green storage procedure to stage replacement storage before switching clients.

What the chart installs

WorkloadKindRoleService ports
frontendDeployment, optional KEDA ScaledObjectEntry 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-04DeploymentQueues actions and assigns them to workers that match the requested platform properties.scheduler 8982 (clients), 8983 (workers), 8984 (BuildQueueState), 7982 (web UI)
storageStatefulSet, one Pod per shardThe CAS, Action Cache, ISCC, and FSAC stores.storage, headless: 8981 (gRPC)
browserDeploymentBuildbarn Browser UI, behind an optional oauth2-proxy sidecar.browser 80 with oauth2-proxy, 7984 without
remote-assetDeployment, when remoteAsset.enabledRemote Asset Fetch API. Stores fetched blobs in CAS.remote-asset and remote-asset-grpc on remoteAsset.port, 8985 by default (gRPC)
bb-portalDeployment, when portal.enabledbb-portal build-event dashboard and BES endpoint.bb-portal 8081 (HTTP), 8082 (BES gRPC)
JWKS syncCronJob and initial Job, when frontend.jwks.sync.enabledCopies 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-config ConfigMap for browser, frontend, scheduler, storage, and remote asset Jsonnet, and the buildbarn-worker-config ConfigMap with the shared common.libsonnet for operator-managed workers.
  • Routing resources for the provider you select: Contour HTTPProxy, Gateway API HTTPRoute/GRPCRoute, or nginx-style Ingress, with an optional cert-manager Certificate for 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 VMPodScrape and VMRule resources.
  • 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-grpc for Remote Execution, CAS, ByteStream, and Action Cache APIs.
  • frontend forwards execution requests to scheduler.
  • scheduler assigns queued operations to workers matching the requested platform properties.
  • worker containers fetch inputs from CAS, mount or materialize build inputs, call their local runner over a Unix socket, and upload outputs back to CAS.
  • storage shards hold CAS and Action Cache data on persistent disks.
  • browser provides the Buildbarn Browser UI. It reads CAS through the frontend on :8980 and 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 storage pods. The default storage.podAntiAffinity.enabled: true already requires one shard per node, so a 5–10 shard deployment needs at least that many eligible nodes.
    • Elastic Linux amd64 worker node pool(s) sized for your RbeWorker pods, with NVMe scratch disk if workers use local CAS caches.
  • [ ] 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). Use none to bring your own routing.
    • cert-manager (or pre-created TLS certificate Secrets) for terminating TLS on bb.<domainBase> and browser.<domainBase>, plus rbe-web.<domainBase> and asset.<domainBase> if you expose the scheduler web UI or the Remote Asset API.
    • KEDA 2.x if using RbeWorker autoscaling (including scale-from-zero) or keda.frontend autoscaling.
    • Metrics backend reachable at keda.prometheusServerAddress. The chart renders VMPodScrape and VMRule resources by default (vmPodScrapes.enabled, vmRules.enabled), so either install the VictoriaMetrics Operator CRDs or set both to false and scrape with your own Prometheus configuration. Add Kubernetes metrics-server if you enable frontend CPU/memory KEDA triggers.
    • bb-worker-operator and its RbeWorker CRD, installed in the release namespace (hermetiq in this guide) with the default rbac.mode=cluster or with rbac.mode=namespace (see its RBAC scope), so RbeWorker resources reconcile after the chart installs.
  • [ ] Target namespace and Pod Security Admission (PSA)
    • Create the target namespace (for example, hermetiq).
    • Label it pod-security.kubernetes.io/enforce=privileged if you will run FUSE-based RbeWorker pools (every starter worker in custom-values/rbeworkers/ uses a FUSE virtualBuildDirectory) or hostPath raw-block storage (mode: hostPath with backend: blockDevice). Raw-block PVCs with blockDevice.deviceAccess: chownInit need at least the baseline level.
      kubectl create namespace hermetiq --dry-run=client -o yaml | kubectl apply -f -
      kubectl label namespace hermetiq pod-security.kubernetes.io/enforce=privileged --overwrite
      
  • [ ] Storage provisioning and immutable PVC decisions (before first install)
    • PVC storage (mode: pvc): run kubectl get storageclass and pick a fast SSD StorageClass (for example premium-rwo or hyperdisk-balanced on GKE, gp3 on EKS). Set it for every store that gets a claim: CAS, AC, ISCC and FSAC each have their own storageClassName (see StorageClasses). Decide on storage.persistence.iscc.enabled and storage.persistence.fsac.enabled (both default to true) 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-block on GKE), deploy custom-values/partition-ephemeral-disks-daemonset.yaml, and verify nodes carry the readiness label hermetiq/ephemeral-lvm=ready before installing Buildbarn.
    • Key-location map (KLM) validation: set storage.keyLocationMapSizing.validate: true so Helm verifies at render time that every store's KLM can index at least 2x the objects its block capacity can hold.
  • [ ] DNS, TLS, OIDC, and registry Secrets
    • DNS records for bb.<domainBase> and browser.<domainBase> (plus rbe-web. and asset. if enabled) pointing at your Gateway or Ingress external IP.
    • An image pull Secret (imagePullSecrets or global.imagePullSecrets) only if you mirror the chart's images into a private registry. The default images, including the Hermetiq grpc-cache-proxy sidecar, are public.
    • The oauth2-proxy-client OIDC Secret (the same one the Hermetiq chart's prerequisites create) and your IdP's JWKS URL if enabling browser.oauth2Proxy and frontend.jwks.

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.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartbuildbarn is pinned at v1.0.2 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. 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