Add sizeLimit support for readOnlyRootFilesystem `emptyDir volumes#9753
Open
manny-yes wants to merge 3 commits into
Open
Add sizeLimit support for readOnlyRootFilesystem `emptyDir volumes#9753manny-yes wants to merge 3 commits into
sizeLimit support for readOnlyRootFilesystem `emptyDir volumes#9753manny-yes wants to merge 3 commits into
Conversation
Contributor
|
✅ All required contributors have signed the F5 CLA for this PR. Thank you! |
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.
Author
|
@vepatel hi - could you please check if this is good? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
Adds a new
controller.readOnlyRootFilesystemVolumeSizesHelm value that lets users set asizeLimiton each of theemptyDirvolumes mounted whencontroller.readOnlyRootFilesystem(orcontroller.securityContext.readOnlyRootFilesystem) is enabled.Keys are
etc,cache,lib,log,stateand map to thenginx-*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.