Skip to content

fix(certimate): provide writable temporary storage - #973

Merged
mberlofa merged 3 commits into
mainfrom
fix/certimate-writable-tmp
Aug 12, 2026
Merged

fix(certimate): provide writable temporary storage#973
mberlofa merged 3 commits into
mainfrom
fix/certimate-writable-tmp

Conversation

@mberlofa

@mberlofa mberlofa commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • mount an ephemeral writable emptyDir at /tmp for Certimate certificate workflows
  • keep the container root filesystem read-only
  • cover the storage and security contract in unit tests and chart documentation

Validation

  • make validate-chart CHART=certimate — PASS, 17 layers including all 8 k3d scenarios
  • make standards-check CHART=certimate — PASS
  • make preflight — PASS

Site PR: helmforgedev/site#502

Resolves #970

Summary by CodeRabbit

  • New Features

    • Added writable temporary storage at /tmp for certificate workflows.
    • Preserved read-only container root filesystems for improved runtime security.
  • Documentation

    • Documented the temporary storage configuration and production defaults.
  • Tests

    • Added coverage verifying read-only root filesystems and writable /tmp storage.

@mberlofa mberlofa added the bug Something isn't working label Aug 11, 2026
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@mberlofa, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 55 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b72a00b-86ba-4b52-b710-05cd78567447

📥 Commits

Reviewing files that changed from the base of the PR and between b53a639 and 6ed004f.

📒 Files selected for processing (6)
  • charts/certimate/DESIGN.md
  • charts/certimate/README.md
  • charts/certimate/templates/deployment.yaml
  • charts/certimate/tests/templates_test.yaml
  • charts/certimate/values.schema.json
  • charts/certimate/values.yaml
📝 Walkthrough

Walkthrough

The Certimate Helm chart now provides writable ephemeral /tmp storage through an emptyDir volume while keeping the container root filesystem read-only. Deployment tests and chart documentation cover this configuration.

Changes

Certimate temporary storage

Layer / File(s) Summary
Add and validate the /tmp mount
charts/certimate/templates/deployment.yaml, charts/certimate/tests/templates_test.yaml, charts/certimate/DESIGN.md, charts/certimate/README.md
The Deployment mounts an emptyDir volume at /tmp. The test verifies the mount and readOnlyRootFilesystem: true. Documentation describes the configuration.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change: providing writable temporary storage for Certimate.
Linked Issues check ✅ Passed The PR mounts writable ephemeral storage at /tmp while preserving the read-only root filesystem requirement from issue #970.
Out of Scope Changes check ✅ Passed The deployment, tests, and documentation changes directly support the linked issue and stated PR objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/certimate-writable-tmp

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.

@github-actions

Copy link
Copy Markdown
Contributor

Standards Check (GR-079) — PASS

Every changed chart fully passes standards-check.

@github-actions

Copy link
Copy Markdown
Contributor

🟢 Security Scan: certimate

Framework Score
MITRE + NSA + SOC2 93.93939%

✅ Security posture acceptable.

@mberlofa

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
charts/certimate/templates/deployment.yaml (1)

131-132: 🩺 Stability & Availability | 🔵 Trivial

Bound /tmp ephemeral storage when workflows can create large temporary files.

emptyDir: {} has no sizeLimit. If the pod has no ephemeral-storage limit, temporary files can consume node-local storage and trigger disk pressure or eviction. Consider an optional sizeLimit value and matching ephemeral-storage requests and limits.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@charts/certimate/templates/deployment.yaml` around lines 131 - 132, Add an
optional sizeLimit to the deployment's tmp emptyDir volume, and configure
matching ephemeral-storage requests and limits for the container so workflow
temporary-file usage is bounded without imposing defaults when the option is
unset.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@charts/certimate/templates/deployment.yaml`:
- Around line 115-119: Update the Deployment volume-mount handling around the
built-in tmp mount and Values.extraVolumeMounts so an extra mount cannot
duplicate mountPath /tmp. Either reject extraVolumeMounts entries targeting /tmp
during template rendering or make the built-in tmp mount configurable, while
preserving the existing mount behavior for other paths.

In `@charts/certimate/tests/templates_test.yaml`:
- Around line 99-115: Update the test case “provides writable temporary storage
with a read-only root filesystem” to assert that the /tmp volumeMount has
readOnly set to false. Render the writable setting explicitly in
templates/deployment.yaml if needed, then add a matching volumeMounts assertion
while preserving the existing root filesystem, path, volume, and emptyDir
checks.

---

Nitpick comments:
In `@charts/certimate/templates/deployment.yaml`:
- Around line 131-132: Add an optional sizeLimit to the deployment's tmp
emptyDir volume, and configure matching ephemeral-storage requests and limits
for the container so workflow temporary-file usage is bounded without imposing
defaults when the option is unset.
🪄 Autofix

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: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0edb4576-614a-4270-947f-85326da7ad3a

📥 Commits

Reviewing files that changed from the base of the PR and between 5c54d58 and b53a639.

📒 Files selected for processing (4)
  • charts/certimate/DESIGN.md
  • charts/certimate/README.md
  • charts/certimate/templates/deployment.yaml
  • charts/certimate/tests/templates_test.yaml

Comment thread charts/certimate/templates/deployment.yaml
Comment thread charts/certimate/tests/templates_test.yaml
@mberlofa

Copy link
Copy Markdown
Contributor Author

Addressed the remaining review nitpick in 6ed004f8:

  • added optional tmpStorage.sizeLimit;
  • applies the configured value to the /tmp emptyDir and to the container's ephemeral-storage request and limit;
  • added schema, documentation, site playground, and render-test coverage;
  • preserved the unbounded default when the option is empty.

The chart preflight, strict lint, and all 38 unit tests pass. Local k3d execution remains unavailable because Docker Desktop is not responding; remote CI is running against the pushed commit.

@mberlofa
mberlofa merged commit bd17108 into main Aug 12, 2026
16 checks passed
@mberlofa
mberlofa deleted the fix/certimate-writable-tmp branch August 12, 2026 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Certimate requires the /tmp directory to be writable

1 participant