Skip to content

Add writable emptyDir volume for /tmp#9

Merged
StephanMeijer merged 1 commit into
mainfrom
feat/api-tmp-dir
Apr 28, 2026
Merged

Add writable emptyDir volume for /tmp#9
StephanMeijer merged 1 commit into
mainfrom
feat/api-tmp-dir

Conversation

@StephanMeijer
Copy link
Copy Markdown
Contributor

@StephanMeijer StephanMeijer commented Apr 28, 2026

Summary

  • Adds a built-in tmp emptyDir volume mounted at /tmp to the API deployment, required because readOnlyRootFilesystem: true prevents writes to /tmp
  • The volumes and volumeMounts sections are now always rendered (previously conditional on extraVolumes/extraVolumeMounts), with the extra values still appended when set

Summary by CodeRabbit

  • Chores
    • Updated deployment configuration to ensure /tmp directory support is always available in containers, with improved handling of additional custom volumes when specified.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

📝 Walkthrough

Walkthrough

The Deployment template in the Helm chart now unconditionally includes a tmp emptyDir volume mounted at /tmp within the API container, with conditional support for additional extra volumes and mounts appended afterward.

Changes

Cohort / File(s) Summary
Helm Deployment Template
charts/api/templates/deployment.yaml
Modified volume configuration to always define a tmp emptyDir volume and mount it at /tmp, with extra volumes and mounts conditionally appended after the default volume.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

A temporary home in the clouds so high, 🐰
Where files rest beneath the sky,
/tmp now always finds its place,
In every container, keeping pace,
Extra volumes follow with grace!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a writable emptyDir volume for the /tmp directory in the Kubernetes deployment template.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/api-tmp-dir

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@charts/api/templates/deployment.yaml`:
- Around line 39-44: The new reserved volume name "tmp" and mount path "/tmp"
can conflict with user-supplied .Values.extraVolumes and
.Values.extraVolumeMounts; update the Helm template around the tmp volume and
related mount blocks to detect conflicts and fail fast. Specifically, before
rendering {{- toYaml .Values.extraVolumes }} and {{- toYaml
.Values.extraVolumeMounts }}, iterate over .Values.extraVolumes and
.Values.extraVolumeMounts and if any item has name == "tmp" or mountPath ==
"/tmp" (or name == "tmp" for mounts) call the Helm fail function with a clear
message; alternatively deduplicate by skipping user items that match name "tmp"
or path "/tmp" so the reserved tmp entry is always preserved. Ensure checks
reference the volume name "tmp", mount path "/tmp", and the values symbols
extraVolumes and extraVolumeMounts so reviewers can find the change.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 530399e3-6174-4c57-9240-dc77d20d0b9b

📥 Commits

Reviewing files that changed from the base of the PR and between 08f8d96 and 4bb5807.

📒 Files selected for processing (1)
  • charts/api/templates/deployment.yaml

Comment thread charts/api/templates/deployment.yaml
Signed-off-by: Stephan Meijer <me@stephanmeijer.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a writable /tmp to the API Deployment by introducing a built-in emptyDir volume and ensuring volumes/volumeMounts are always rendered, supporting readOnlyRootFilesystem: true.

Changes:

  • Add a tmp emptyDir volume to the Pod spec.
  • Mount the tmp volume at /tmp in the API container.
  • Always render volumes and volumeMounts, appending extraVolumes / extraVolumeMounts when provided.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread charts/api/templates/deployment.yaml
Comment thread charts/api/templates/deployment.yaml
@StephanMeijer StephanMeijer changed the title feat(api): add writable emptyDir volume for /tmp Add writable emptyDir volume for /tmp Apr 28, 2026
@StephanMeijer StephanMeijer merged commit 9c7bd65 into main Apr 28, 2026
5 checks passed
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