Skip to content

fix: add tmpVolume support to brainstore reader and writer#74

Open
wadhah mahrouk (wadhah101) wants to merge 1 commit intobraintrustdata:jeff/security-enhancementsfrom
wadhah101:jeff/brainstore-tmp-volume
Open

fix: add tmpVolume support to brainstore reader and writer#74
wadhah mahrouk (wadhah101) wants to merge 1 commit intobraintrustdata:jeff/security-enhancementsfrom
wadhah101:jeff/brainstore-tmp-volume

Conversation

@wadhah101
Copy link
Copy Markdown

@wadhah101 wadhah mahrouk (wadhah101) commented Mar 26, 2026

Summary

  • Add tmpVolume configuration to brainstore reader and writer deployments, matching the existing API tmpVolume pattern
  • When enabled, mounts a writable emptyDir at /tmp — required when readOnlyRootFilesystem is true for CEL policy compliance
  • Fix nil pointer error in tmpVolume defaults: changed all three tmpVolume configs (API, reader, writer) from fully commented-out to actual default values (enabled: false), preventing template rendering failures when tmpVolume is not explicitly set
  • Update the CEL example values to include tmpVolume for both brainstore reader and writer

The require-readonly-root-filesystem CEL policy requires all containers to use read-only root filesystems. When enabled, processes that write to /tmp fail unless a writable volume is mounted there. The API deployment already had this feature; this PR extends it to brainstore reader and writer.

Changes

  • braintrust/values.yaml — Added tmpVolume defaults (enabled: false) under api, brainstore.reader, and brainstore.writer (previously fully commented out, which caused nil pointer errors during helm template)
  • braintrust/templates/brainstore-reader-deployment.yaml — Added conditional tmp-volume volumeMount and volume
  • braintrust/templates/brainstore-writer-deployment.yaml — Added conditional tmp-volume volumeMount and volume
  • braintrust/examples/google-autopilot-cel/values.yaml — Enabled tmpVolume for both reader and writer in the CEL example

How to test

  • helm template with default values renders without errors and excludes tmp-volume
  • helm template --set brainstore.writer.tmpVolume.enabled=true --set brainstore.writer.tmpVolume.sizeLimit=1Gi includes the /tmp mount and emptyDir volume with sizeLimit
  • helm template -f examples/google-autopilot-cel/values.yaml renders both reader and writer with tmp-volume correctly

@wadhah101 wadhah mahrouk (wadhah101) changed the base branch from main to jeff/security-enhancements March 26, 2026 15:23
@wadhah101 wadhah mahrouk (wadhah101) changed the title feat(MLP-5609): add tmpVolume support to brainstore reader and writer feat(): add tmpVolume support to brainstore reader and writer Mar 26, 2026
@wadhah101 wadhah mahrouk (wadhah101) changed the title feat(): add tmpVolume support to brainstore reader and writer feat: add tmpVolume support to brainstore reader and writer Mar 26, 2026
Add tmpVolume configuration for brainstore reader and writer deployments,
matching the existing API tmpVolume pattern. This mounts a writable emptyDir
at /tmp, which is required when readOnlyRootFilesystem is enabled for CEL
policy compliance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@wadhah101 wadhah mahrouk (wadhah101) changed the title feat: add tmpVolume support to brainstore reader and writer fix: add tmpVolume support to brainstore reader and writer Mar 26, 2026
@wadhah101 wadhah mahrouk (wadhah101) marked this pull request as ready for review March 26, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants