POC: Force writable image volumes using overlay filesystem#15
Draft
antoine-gaillard wants to merge 3 commits into
Draft
POC: Force writable image volumes using overlay filesystem#15antoine-gaillard wants to merge 3 commits into
antoine-gaillard wants to merge 3 commits into
Conversation
This is a proof-of-concept that makes all image volumes writable by: - Removing the readonly restriction check - Creating an overlay filesystem with: - Lower layer: Original read-only image content - Upper/Work layers: Writable directories for modifications - Setting the mount as non-readonly for containers The changes are isolated per container through separate upper/work directories. NOTE: This is a temporary POC implementation. Proper support requires: - Kubernetes API changes to support writable image volumes - Kubelet changes to pass the readonly flag correctly - Removal of the hardcoded forcing of writable mounts Changes made: - Skip readonly validation for image volumes - Create overlay filesystem for each image mount - Update cleanup logic to handle overlay directory structure - Force Readonly=false on mount spec for containers
- Fix snapshot key to use lowerDir consistently - Add tmpfs mounting for upper/work directories (4x image size, 256MB-32GB) - Create overlay subdirectories within tmpfs mounts - Add tmpfs cleanup in removal logic
Working writable image volumes with in-memory overlay. Add debug logging and fix snapshot preparation.
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.
This is a proof-of-concept that makes all image volumes writable by:
The changes are isolated per container through separate upper/work directories.
NOTE: This is a temporary POC implementation. Proper support requires:
Changes made: