Skip to content

Commit 166c764

Browse files
committed
busbar 0.1.1 — fixes found by live-cluster testing
Deployed the chart to a kind cluster (default + governance); three real bugs surfaced that lint/template could not catch: - subPath-mount config.yaml/providers.yaml instead of the whole /etc/busbar dir, which was shadowing the image's built-in provider catalog (crash loop). - Wire governance.admin_token from governance.adminTokenEnv (default BUSBAR_ADMIN_TOKEN); busbar refuses to boot with governance on and no token. Add a render-time guard that fails helm install fast when it's missing. - Give the governance StatefulSet its own headless Service; keep busbar-data a normal cluster-VIP Service (fixes clusterIP-immutability on mode switch and preserves the traffic-plane VIP). Verified on kind: default Deployment READY + helm test pass; governance StatefulSet READY, PVC bound, data Service VIP + headless Service present.
1 parent dbc2640 commit 166c764

11 files changed

Lines changed: 85 additions & 9 deletions

File tree

charts/busbar/CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Changelog
22

3+
## 0.1.1
4+
5+
Fixes found by deploying the chart to a live (kind) cluster — none were catchable by
6+
`helm lint`/`helm template`:
7+
8+
- **Config mount no longer shadows the image's provider catalog.** The ConfigMap was
9+
mounted over the whole `/etc/busbar` directory, hiding the built-in
10+
`/etc/busbar/providers.yaml` and crash-looping the pod. Now `config.yaml` (and
11+
`providers.yaml` only when `providersCatalog` is set) mount as individual files via
12+
`subPath`.
13+
- **Governance now wires an admin token.** busbar refuses to boot with governance
14+
enabled but no `admin_token`. The chart renders `governance.admin_token: ${<env>}`
15+
from the new `governance.adminTokenEnv` (default `BUSBAR_ADMIN_TOKEN`), and a
16+
render-time guard fails `helm install` fast if the token isn't provided.
17+
- **Governance keeps a normal data Service.** The data (traffic) Service is no longer
18+
made headless for the StatefulSet — a separate headless Service provides stable pod
19+
identity. This keeps the traffic-plane cluster VIP and lets a release switch
20+
governance on/off without hitting Service `clusterIP` immutability.
21+
322
## 0.1.0
423

524
Initial release of the busbar Helm chart.

charts/busbar/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: busbar
33
description: A production-grade Helm chart for busbar, a Rust LLM gateway with a data plane and a separate, loopback-by-default, mTLS-gated admin plane.
44
type: application
5-
version: 0.1.0
5+
version: 0.1.1
66
appVersion: "1.4.0"
77
kubeVersion: ">=1.24.0-0"
88
home: https://getbusbar.com

charts/busbar/README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,10 @@ config:
7979
8080
### With governance
8181
82+
Governance requires an admin token — put it in `secrets.data` under the key named by
83+
`governance.adminTokenEnv` (default `BUSBAR_ADMIN_TOKEN`); the chart wires
84+
`governance.admin_token` for you. (`helm install` fails fast if it is missing.)
85+
8286
```yaml
8387
governance:
8488
enabled: true
@@ -89,9 +93,6 @@ governance:
8993
secrets:
9094
data:
9195
BUSBAR_ADMIN_TOKEN: super-secret-admin-token
92-
config:
93-
governance:
94-
admin_token: ${BUSBAR_ADMIN_TOKEN}
9596
```
9697

9798
### With ingress (data plane)

charts/busbar/templates/_helpers.tpl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,20 @@ clear message so the user never ships an un-bootable deployment.
9292
{{- end -}}
9393
{{- end -}}
9494
{{- end }}
95+
96+
{{/*
97+
Governance boot-guard: busbar refuses to boot with governance enabled but no
98+
admin_token. The chart renders `admin_token: ${<adminTokenEnv>}`, so that env
99+
var must be supplied. When the chart renders the Secret (secrets.create) we can
100+
check it here and fail fast; with an existingSecret we can't introspect, so we
101+
trust the operator.
102+
*/}}
103+
{{- define "busbar.validateGovernance" -}}
104+
{{- if .Values.governance.enabled -}}
105+
{{- if not .Values.secrets.existingSecret -}}
106+
{{- if not (hasKey (default dict .Values.secrets.data) .Values.governance.adminTokenEnv) -}}
107+
{{ fail (printf "\n\ngovernance.enabled=true requires an admin token, but secrets.data has no %q key — busbar refuses to boot without governance.admin_token.\n\nFix: add the token to the Secret, e.g.\n --set secrets.data.%s=<a-long-random-token>\nor set governance.adminTokenEnv to a key you already provide (or use an existingSecret that contains it).\n" .Values.governance.adminTokenEnv .Values.governance.adminTokenEnv) }}
108+
{{- end -}}
109+
{{- end -}}
110+
{{- end -}}
111+
{{- end }}

charts/busbar/templates/_pod.tpl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,19 @@ spec:
8080
resources:
8181
{{- toYaml .Values.resources | nindent 8 }}
8282
volumeMounts:
83+
# Mount config.yaml (and providers.yaml only when overridden) as individual
84+
# files via subPath, NOT the whole /etc/busbar dir — a directory mount would
85+
# shadow the provider catalog baked into the image at /etc/busbar/providers.yaml.
8386
- name: config
84-
mountPath: /etc/busbar
87+
mountPath: /etc/busbar/config.yaml
88+
subPath: config.yaml
8589
readOnly: true
90+
{{- if .Values.providersCatalog }}
91+
- name: config
92+
mountPath: /etc/busbar/providers.yaml
93+
subPath: providers.yaml
94+
readOnly: true
95+
{{- end }}
8696
- name: tmp
8797
mountPath: /tmp
8898
{{- if .Values.adminTLS.enabled }}

charts/busbar/templates/configmap.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{{- include "busbar.validateAdmin" . -}}
2+
{{- include "busbar.validateGovernance" . -}}
23
{{- if not .Values.existingConfigMap -}}
34
apiVersion: v1
45
kind: ConfigMap
@@ -31,6 +32,7 @@ data:
3132
governance:
3233
enabled: true
3334
db_path: {{ .Values.governance.dbPath | quote }}
35+
admin_token: ${{ printf "{%s}" .Values.governance.adminTokenEnv }}
3436
{{- end }}
3537
{{- with .Values.config }}
3638
{{- toYaml . | nindent 4 }}

charts/busbar/templates/service-data.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ metadata:
1010
{{- end }}
1111
spec:
1212
type: {{ .Values.service.data.type }}
13-
{{- if .Values.governance.enabled }}
14-
clusterIP: None
15-
{{- end }}
1613
selector:
1714
{{- include "busbar.selectorLabels" . | nindent 4 }}
1815
ports:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{{- if .Values.governance.enabled }}
2+
{{- /*
3+
A headless Service that gives the governance StatefulSet stable per-pod network
4+
identity (its `serviceName`). The public data Service stays a normal Service with
5+
a cluster VIP for LLM traffic — the two are kept separate so switching governance
6+
on/off never mutates the (immutable) clusterIP of the traffic Service.
7+
*/}}
8+
apiVersion: v1
9+
kind: Service
10+
metadata:
11+
name: {{ include "busbar.fullname" . }}-headless
12+
labels:
13+
{{- include "busbar.labels" . | nindent 4 }}
14+
spec:
15+
clusterIP: None
16+
publishNotReadyAddresses: true
17+
selector:
18+
{{- include "busbar.selectorLabels" . | nindent 4 }}
19+
ports:
20+
- name: data
21+
port: {{ .Values.service.data.port }}
22+
targetPort: data
23+
protocol: TCP
24+
{{- end }}

charts/busbar/templates/statefulset.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ spec:
99
# Governance owns a single-writer SQLite DB per replica; horizontal scale of a
1010
# shared store is unsupported. replicas is pinned to 1.
1111
replicas: 1
12-
serviceName: {{ include "busbar.fullname" . }}-data
12+
serviceName: {{ include "busbar.fullname" . }}-headless
1313
selector:
1414
matchLabels:
1515
{{- include "busbar.selectorLabels" . | nindent 6 }}

charts/busbar/values.schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@
5454
"additionalProperties": false,
5555
"properties": {
5656
"enabled": { "type": "boolean" },
57+
"adminTokenEnv": { "type": "string", "minLength": 1 },
5758
"dbPath": { "type": "string", "minLength": 1 },
5859
"persistence": {
5960
"type": "object",

0 commit comments

Comments
 (0)