Skip to content

Commit b00c454

Browse files
committed
update with alternatives
Signed-off-by: sallyom <[email protected]>
1 parent 0ea6a01 commit b00c454

File tree

1 file changed

+60
-21
lines changed
  • keps/sig-node/4639-oci-volume-source

1 file changed

+60
-21
lines changed

keps/sig-node/4639-oci-volume-source/README.md

+60-21
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,10 @@ tags, and then generate with `hack/update-toc.sh`.
108108
- [Implementation History](#implementation-history)
109109
- [Drawbacks](#drawbacks)
110110
- [Alternatives](#alternatives)
111-
- [Infrastructure Needed (Optional)](#infrastructure-needed-optional)
111+
- [<a href="https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1495-volume-populators">KEP 1495: Volume Populators</a>](#kep-1495-volume-populators)
112+
- [Custom CSI Plugin](#custom-csi-plugin)
113+
- [Advantages of In-Tree OCI VolumeSource](#advantages-of-in-tree-oci-volumesource)
114+
- [Conclusion](#conclusion)
112115
<!-- /toc -->
113116

114117
## Release Signoff Checklist
@@ -160,9 +163,9 @@ and share them among containers in a pod without including a shell in the image,
160163

161164
## Motivation
162165

163-
Currently, packaging files within images often requires the inclusion of a shell, even when the sole purpose of the image is to share files among containers in a pod.
164-
This not only increases the image size unnecessarily but also introduces potential security vulnerabilities. By supporting OCI images and artifacts
165-
directly as a `VolumeSource`, we can streamline the process and enhance security.
166+
Currently, mounting files from OCI images requires the inclusion of a shell, even when the sole purpose of the image is to deliver files
167+
to be shared among containers in a pod. This not only increases the image size unnecessarily but also introduces potential security vulnerabilities.
168+
By supporting OCI images and artifacts directly as a `VolumeSource`, we can streamline the process and enhance security.
166169

167170
### Goals
168171

@@ -174,12 +177,12 @@ directly as a `VolumeSource`, we can streamline the process and enhance security
174177
### Non-Goals
175178

176179
- This proposal does not aim to replace existing `VolumeSource` types.
177-
- This proposal does not address other use cases for OCI images beyond file sharing among containers in a pod.
180+
- This proposal does not address other use cases for OCI objects beyond file sharing among containers in a pod.
178181

179182
## Proposal
180183

181-
We propose to add a new `VolumeSource` that supports OCI images and/or artifacts. This `VolumeSource` will allow users to mount an OCI image or artifact directly into a pod,
182-
making the files within the image accessible to the containers without the need for a shell or additional image manipulation.
184+
We propose to add a new `VolumeSource` that supports OCI images and/or artifacts. This `VolumeSource` will allow users to mount an OCI object
185+
directly into a pod, making the files within the image accessible to the containers without the need for a shell or additional image manipulation.
183186

184187
### User Stories (Optional)
185188

@@ -196,7 +199,8 @@ so that I can streamline my CI/CD pipeline. I want to package this file in an OC
196199
#### Story 3
197200

198201
As a data scientist, MLOps engineer, or AI developer, I want to mount large language models or machine learning models in a pod alongside a model-server, so that I can efficiently serve the models
199-
without including them in the container image. I want to package these models in an OCI object to take advantage of OCI distribution and ensure efficient model deployment.
202+
without including them in the container image. I want to package these models in an OCI object to take advantage of OCI distribution and ensure
203+
efficient model deployment.
200204

201205
### Notes/Constraints/Caveats (Optional)
202206

@@ -206,9 +210,11 @@ without including them in the container image. I want to package these models in
206210

207211
### Risks and Mitigations
208212

209-
- **Security Risks:** Allowing direct mounting of OCI images introduces potential attack vectors. Mitigation includes thorough security reviews and limiting access to trusted registries.
213+
- **Security Risks:** Allowing direct mounting of OCI images introduces potential attack vectors. Mitigation includes thorough security reviews and
214+
limiting access to trusted registries.
210215
- **Compatibility Risks:** Ensure compatibility with existing features.
211-
- **Performance Risks:** Large images or artifacts could impact performance. Mitigation includes optimizations in the implementation and providing guidance on best practices for users.
216+
- **Performance Risks:** Large images or artifacts could impact performance. Mitigation includes optimizations in the implementation and providing
217+
guidance on best practices for users.
212218

213219
## Design Details
214220

@@ -781,16 +787,49 @@ Why should this KEP _not_ be implemented?
781787

782788
## Alternatives
783789

784-
<!--
785-
What other approaches did you consider, and why did you rule them out? These do
786-
not need to be as detailed as the proposal, but should include enough
787-
information to express the idea and why it was not acceptable.
788-
-->
790+
### [KEP 1495: Volume Populators](https://github.com/kubernetes/enhancements/tree/master/keps/sig-storage/1495-volume-populators)
789791

790-
## Infrastructure Needed (Optional)
792+
The volume-populators API extension allows you to populate a volume with data from an external data source when the volume is created.
793+
This is a good solution for restoring a volume from a snapshot or initializing a volume with data from a database backup. However, it does not
794+
address the desire to use OCI distribution, versioning, and signing for mounted data.
791795

792-
<!--
793-
Use this section if you need things from the project/SIG. Examples include a
794-
new subproject, repos requested, or GitHub details. Listing these here allows a
795-
SIG to get the process for these resources started right away.
796-
-->
796+
The proposed in-tree OCI VolumeSource provides a direct and integrated approach to mount OCI artifacts, leveraging the existing OCI
797+
infrastructure for packaging, distribution, and security.
798+
799+
### Custom CSI Plugin
800+
801+
See [https://github.com/warm-metal/container-image-csi-driver](https://github.com/warm-metal/container-image-csi-driver)
802+
803+
An out-of-tree CSI plugin can provide flexibility and modularity, but there are trade-offs to consider:
804+
805+
- Complexity of managing an external CSI plugin. This includes handling the installation, configuration, and updates of the CSI driver, which adds
806+
an additional operational burden. For a generic, vendor-agnostic, and widely-adopted solution this would not make sense.
807+
- External CSI plugins implement their own lifecycle management and garbage collection mechanisms,
808+
yet these already exist in-tree for OCI images.
809+
- Performance: There is additional overhead with an out-of-tree CSI plugin, especially in scenarios requiring frequent image pulls
810+
or large volumes of data.
811+
812+
### Advantages of In-Tree OCI VolumeSource
813+
814+
1. **Leverage Existing Mechanisms:**
815+
- **No New Data Types or Objects:** The OCI VolumeSource leverages OCI objects, which are already a core part of the Kubernetes ecosystem.
816+
This ensures consistency and reduces complexity, as no new data types or objects are introduced.
817+
- **Existing Lifecycle Management and Garbage Collection:** Kubernetes has efficient lifecycle management and garbage collection mechanisms for
818+
volumes and container images. The in-tree OCI VolumeSource will utilizes these existing mechanisms, ensuring robust and reliable management
819+
without re-implementing these features.
820+
821+
2. **Integration with Kubernetes:**
822+
- **Optimal Performance:** Deep integration with Kubernetes components, such as the scheduler and kubelet, ensures optimal performance and
823+
resource management. This integration allows the OCI VolumeSource to benefit from all existing optimizations and features of Kubernetes.
824+
- **Unified Interface:** Users interact with a consistent and unified interface for managing volumes, reducing the learning curve and
825+
potential for configuration errors.
826+
827+
3. **Simplified Maintenance and Updates:**
828+
- **Core Project Maintenance:** In-tree features are maintained and updated as part of the core Kubernetes project. It makes sense
829+
for widely-used and vendor agnostic features to utilize the core testing infrastructure, release cycles, and security updates.
830+
831+
### Conclusion
832+
833+
The in-tree implementation of an OCI VolumeSource offers significant advantages by leveraging existing Kubernetes mechanisms,
834+
ensuring deep integration, and simplifying management. This approach avoids the complexity, duplication, and other potential inefficiencies
835+
of out-of-tree CSI plugins, providing a more reliable solution for mounting OCI images and artifacts.

0 commit comments

Comments
 (0)