From 61e1a916c1df4ab27c5581f439bec1772db5886c Mon Sep 17 00:00:00 2001 From: Erin McNulty Date: Fri, 30 Oct 2026 12:09:01 -0400 Subject: [PATCH] Default to two dedicated automation writer replicas --- braintrust/ci/values-aws.yaml | 2 ++ braintrust/ci/values-azure.yaml | 1 + braintrust/ci/values-google.yaml | 2 ++ braintrust/ci/values-minimal.yaml | 2 ++ .../examples/google-autopilot-cel/values.yaml | 4 +-- .../examples/google-autopilot/values.yaml | 4 +-- ...nstore-automationwriter-defaults_test.yaml | 33 +++++++++++++++++++ ...instore-automationwriter-routing_test.yaml | 2 ++ ...instore-automationwriter-service_test.yaml | 2 ++ .../tests/brainstore-startup-gate_test.yaml | 3 ++ braintrust/values.yaml | 6 ++-- 11 files changed, 53 insertions(+), 8 deletions(-) create mode 100644 braintrust/tests/brainstore-automationwriter-defaults_test.yaml diff --git a/braintrust/ci/values-aws.yaml b/braintrust/ci/values-aws.yaml index b61b644..e81422b 100644 --- a/braintrust/ci/values-aws.yaml +++ b/braintrust/ci/values-aws.yaml @@ -46,6 +46,8 @@ api: affinity: {} brainstore: + automationwriter: + replicas: 0 serviceAccount: name: "brainstore" awsRoleArn: "arn:aws:iam::123456789012:role/test-role" diff --git a/braintrust/ci/values-azure.yaml b/braintrust/ci/values-azure.yaml index 10461f2..50d8944 100644 --- a/braintrust/ci/values-azure.yaml +++ b/braintrust/ci/values-azure.yaml @@ -88,6 +88,7 @@ brainstore: volume: size: "100Gi" automationwriter: + replicas: 0 volume: size: "200Gi" writer: diff --git a/braintrust/ci/values-google.yaml b/braintrust/ci/values-google.yaml index 22c2127..869d7a3 100644 --- a/braintrust/ci/values-google.yaml +++ b/braintrust/ci/values-google.yaml @@ -48,6 +48,8 @@ api: affinity: {} brainstore: + automationwriter: + replicas: 0 serviceAccount: name: "brainstore" googleServiceAccount: "test@project.iam.gserviceaccount.com" diff --git a/braintrust/ci/values-minimal.yaml b/braintrust/ci/values-minimal.yaml index cac2cdf..71afc62 100644 --- a/braintrust/ci/values-minimal.yaml +++ b/braintrust/ci/values-minimal.yaml @@ -39,6 +39,8 @@ api: affinity: {} brainstore: + automationwriter: + replicas: 0 serviceAccount: name: "brainstore" annotations: {} diff --git a/braintrust/examples/google-autopilot-cel/values.yaml b/braintrust/examples/google-autopilot-cel/values.yaml index c9b8725..9ea801a 100644 --- a/braintrust/examples/google-autopilot-cel/values.yaml +++ b/braintrust/examples/google-autopilot-cel/values.yaml @@ -172,10 +172,10 @@ brainstore: # Brainstore Automation Writer configuration # Optional, dedicated automations writer pool with an internal Service when enabled. - # Disabled by default (replicas: 0); scale up to opt in. + # Defaults to two replicas; set replicas: 0 to use regular writers. automationwriter: name: "brainstore-automationwriter" - replicas: 0 + replicas: 2 service: name: "" type: ClusterIP diff --git a/braintrust/examples/google-autopilot/values.yaml b/braintrust/examples/google-autopilot/values.yaml index 9abcc26..ebc0a41 100644 --- a/braintrust/examples/google-autopilot/values.yaml +++ b/braintrust/examples/google-autopilot/values.yaml @@ -152,10 +152,10 @@ brainstore: # Brainstore Automation Writer configuration # Optional, dedicated automations writer pool with an internal Service when enabled. - # Disabled by default (replicas: 0); scale up to opt in. + # Defaults to two replicas; set replicas: 0 to use regular writers. automationwriter: name: "brainstore-automationwriter" - replicas: 0 + replicas: 2 service: name: "" type: ClusterIP diff --git a/braintrust/tests/brainstore-automationwriter-defaults_test.yaml b/braintrust/tests/brainstore-automationwriter-defaults_test.yaml new file mode 100644 index 0000000..e126aef --- /dev/null +++ b/braintrust/tests/brainstore-automationwriter-defaults_test.yaml @@ -0,0 +1,33 @@ +suite: test default automation writer isolation +templates: + - brainstore-automationwriter-deployment.yaml + - brainstore-automationwriter-configmap.yaml + - brainstore-writer-configmap.yaml + - api-configmap.yaml +tests: + - it: should run two dedicated automation writers by default + template: brainstore-automationwriter-deployment.yaml + asserts: + - equal: + path: spec.replicas + value: 2 + - it: should run only automations on the dedicated pool by default + template: brainstore-automationwriter-configmap.yaml + asserts: + - equal: + path: data.BRAINSTORE_WRITER_LOOP_CONFIG + value: include:automations + - it: should exclude automations from regular writers by default + template: brainstore-writer-configmap.yaml + asserts: + - equal: + path: data.BRAINSTORE_WRITER_LOOP_CONFIG + value: exclude:automations + - it: should route automation queries to the dedicated pool by default + template: api-configmap.yaml + release: + namespace: braintrust + asserts: + - equal: + path: data.BRAINSTORE_AUTOMATION_WRITER_URL + value: http://brainstore-automationwriter.braintrust:4000 diff --git a/braintrust/tests/brainstore-automationwriter-routing_test.yaml b/braintrust/tests/brainstore-automationwriter-routing_test.yaml index 44b3d5d..67193c9 100644 --- a/braintrust/tests/brainstore-automationwriter-routing_test.yaml +++ b/braintrust/tests/brainstore-automationwriter-routing_test.yaml @@ -5,6 +5,8 @@ templates: - brainstore-startup-gate-rbac.yaml tests: - it: should preserve writer fallback when the pool is disabled + set: + brainstore.automationwriter.replicas: 0 template: api-configmap.yaml asserts: &fallback - isNull: diff --git a/braintrust/tests/brainstore-automationwriter-service_test.yaml b/braintrust/tests/brainstore-automationwriter-service_test.yaml index 0eb2a2c..2e70e24 100644 --- a/braintrust/tests/brainstore-automationwriter-service_test.yaml +++ b/braintrust/tests/brainstore-automationwriter-service_test.yaml @@ -3,6 +3,8 @@ templates: - brainstore-automationwriter-service.yaml tests: - it: should omit the service when the pool is disabled + set: + brainstore.automationwriter.replicas: 0 asserts: &absent - hasDocuments: count: 0 diff --git a/braintrust/tests/brainstore-startup-gate_test.yaml b/braintrust/tests/brainstore-startup-gate_test.yaml index 758da25..48e8cf9 100644 --- a/braintrust/tests/brainstore-startup-gate_test.yaml +++ b/braintrust/tests/brainstore-startup-gate_test.yaml @@ -62,6 +62,7 @@ tests: set: api.brainstoreStartupGate.enabled: true api.image.tag: v2.15.0 + brainstore.automationwriter.replicas: 0 brainstore.image.tag: v2.15.0 asserts: - equal: @@ -113,6 +114,7 @@ tests: api.brainstoreStartupGate.enabled: true api.brainstoreStartupGate.minimumVersion: v2.15.0 api.brainstoreStartupGate.image: registry.example/python:3.13 + brainstore.automationwriter.replicas: 0 brainstore.image.tag: v2.15.1 asserts: - equal: @@ -265,6 +267,7 @@ tests: set: api.brainstoreStartupGate.enabled: true api.image.tag: v2.15.0 + brainstore.automationwriter.replicas: 0 brainstore.image.tag: v2.14.0 asserts: - contains: diff --git a/braintrust/values.yaml b/braintrust/values.yaml index 7f19f44..7656a60 100644 --- a/braintrust/values.yaml +++ b/braintrust/values.yaml @@ -606,9 +606,7 @@ brainstore: # When enabled (replicas > 0), the regular writer pool is automatically # configured to exclude automations, and the API receives this pool's query # endpoint. A compatible API release decides which queries use the endpoint. - # Disabled by default (replicas: 0), preserving existing deployments. - # This option is not recommended for most - # deployments; enable it only with guidance from Braintrust support. + # Defaults to two replicas. Set replicas: 0 to run automations on regular writers. automationwriter: name: "brainstore-automationwriter" labels: {} @@ -618,7 +616,7 @@ brainstore: deployment: {} service: {} pod: {} - replicas: 0 + replicas: 2 minReadySeconds: 0 progressDeadlineSeconds: 600 strategy: