You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[Advantages of In-Tree OCI VolumeSource](#advantages-of-in-tree-oci-volumesource)
114
+
-[Conclusion](#conclusion)
112
115
<!-- /toc -->
113
116
114
117
## Release Signoff Checklist
@@ -160,9 +163,9 @@ and share them among containers in a pod without including a shell in the image,
160
163
161
164
## Motivation
162
165
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.
166
169
167
170
### Goals
168
171
@@ -174,12 +177,12 @@ directly as a `VolumeSource`, we can streamline the process and enhance security
174
177
### Non-Goals
175
178
176
179
- 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.
178
181
179
182
## Proposal
180
183
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.
183
186
184
187
### User Stories (Optional)
185
188
@@ -196,7 +199,8 @@ so that I can streamline my CI/CD pipeline. I want to package this file in an OC
196
199
#### Story 3
197
200
198
201
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.
200
204
201
205
### Notes/Constraints/Caveats (Optional)
202
206
@@ -206,9 +210,11 @@ without including them in the container image. I want to package these models in
206
210
207
211
### Risks and Mitigations
208
212
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.
210
215
-**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.
212
218
213
219
## Design Details
214
220
@@ -781,16 +787,49 @@ Why should this KEP _not_ be implemented?
781
787
782
788
## Alternatives
783
789
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.
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.
791
795
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