Skip to content

Add sizeLimit support for readOnlyRootFilesystem `emptyDir volumes#9753

Open
manny-yes wants to merge 3 commits into
nginx:mainfrom
manny-yes:fix-7053
Open

Add sizeLimit support for readOnlyRootFilesystem `emptyDir volumes#9753
manny-yes wants to merge 3 commits into
nginx:mainfrom
manny-yes:fix-7053

Conversation

@manny-yes
Copy link
Copy Markdown

Proposed changes

Adds a new controller.readOnlyRootFilesystemVolumeSizes Helm value that lets users set a sizeLimit on each of the emptyDir volumes mounted when controller.readOnlyRootFilesystem (or controller.securityContext.readOnlyRootFilesystem) is enabled.

Keys are etc, cache, lib, log, state and map to the nginx-* volume names. Empty values preserve the previous output (emptyDir: {}), so the default behavior is unchanged.

Closes #7053.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that all unit tests pass after adding my changes
  • I have updated necessary documentation
  • I have rebased my branch onto main
  • I will ensure my PR is targeting the main branch and pulling from my branch from my own fork

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 30, 2026

✅ All required contributors have signed the F5 CLA for this PR. Thank you!
Posted by the CLA Assistant Lite bot.

@manny-yes
Copy link
Copy Markdown
Author

I have hereby read the F5 CLA and agree to its terms

When `controller.readOnlyRootFilesystem` (or the equivalent
`controller.securityContext.readOnlyRootFilesystem`) is enabled, the
chart provisions a set of `emptyDir` volumes for `/etc/nginx`,
`/var/cache/nginx`, `/var/lib/nginx`, `/var/lib/nginx/state` and
`/var/log/nginx`. These volumes have no `sizeLimit`, so they can grow
until they exhaust the node's ephemeral storage.

Introduce a new `controller.readOnlyRootFilesystemVolumeSizes` value
that lets users set a `sizeLimit` per volume (keys: `etc`, `cache`,
`lib`, `log`, `state`). Empty values preserve the previous output
(`emptyDir: {}`) so the default behavior is unchanged.

A new `nginx-ingress.emptyDir` helper renders the optional `sizeLimit`
and is reused for every affected volume. The `values.schema.json` is
updated so invalid types are rejected at install time.

Closes nginx#7053.
@manny-yes
Copy link
Copy Markdown
Author

@vepatel hi - could you please check if this is good?
Happy to adjust anything if needed. Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo ☑

Development

Successfully merging this pull request may close these issues.

Add sizeLimit to emptyDir configuration

1 participant