✨ Add support for OCI image volumes instead of init containers (KEP-4639)#375
Open
andersonshatch wants to merge 12 commits intomasterfrom
Open
✨ Add support for OCI image volumes instead of init containers (KEP-4639)#375andersonshatch wants to merge 12 commits intomasterfrom
andersonshatch wants to merge 12 commits intomasterfrom
Conversation
Contributor
Author
|
Added some Claude/Copilot written tests, new territory for me. Not sure if these are any good. |
3e32254 to
3a4cdfa
Compare
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.
KEP-4639 introduced OCI image volume support, allowing you to mount a container as a volume.
This is essentially what the operator does, but the init container first has to copy its contents to a volume mounted on to the application container.
With Kubernetes 1.35, this feature got GA'd, and adding this support means we no longer need to have an init container.
This helps for the larger images we mount, as the copy is no longer necessary.
(Unscientific) Testing locally, this cuts out the following time where the init container runs to copy
It's opt-in since we must maintain backwards compatibility.
In testing, it seems no k8s runtime version currently supports the sub path option, so we have to mount the full image as a volume, rather than just the
/contrastdirectory.We may want to mark this as experimental, as it's new, and maybe we find out we want to maintain init containers for some other reason down the line?
Maybe we also want to collect telemetry?