Skip to content

Commit d3a6089

Browse files
committed
update to include diffs from images & artifacts
Signed-off-by: sallyom <[email protected]>
1 parent e19f0a2 commit d3a6089

File tree

1 file changed

+57
-8
lines changed
  • keps/sig-node/4639-oci-volume-source

1 file changed

+57
-8
lines changed

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

+57-8
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ tags, and then generate with `hack/update-toc.sh`.
8888
- [Story 2](#story-2)
8989
- [Story 3](#story-3)
9090
- [Notes/Constraints/Caveats (Optional)](#notesconstraintscaveats-optional)
91+
- [Vocabulary: OCI Images, Artifacts, and Objects](#vocabulary-oci-images-artifacts-and-objects)
9192
- [Risks and Mitigations](#risks-and-mitigations)
9293
- [Design Details](#design-details)
94+
- [Kubelet and CRI support for OCI artifacts](#kubelet-and-cri-support-for-oci-artifacts)
9395
- [Test Plan](#test-plan)
9496
- [Prerequisite testing updates](#prerequisite-testing-updates)
9597
- [Unit tests](#unit-tests)
@@ -158,8 +160,13 @@ Items marked with (R) are required *prior to targeting to a milestone / release*
158160

159161
## Summary
160162

161-
The proposed enhancement adds a new `VolumeSource` to Kubernetes that supports OCI images and/or OCI artifacts. This allows users to package files
162-
and share them among containers in a pod without including a shell in the image, thereby reducing vulnerabilities and simplifying image creation.
163+
The proposed enhancement adds a new `VolumeSource` to Kubernetes that supports OCI images and/or OCI artifacts.
164+
This allows users to package files and share them among containers in a pod without including a shell in the image,
165+
thereby reducing vulnerabilities and simplifying image creation.
166+
167+
While OCI images are well-supported by Kubernetes and CRI,
168+
extending support to OCI artifacts involves recognizing additional media types, implementing custom lifecycle management,
169+
and ensuring appropriate validation and security measures.
163170

164171
## Motivation
165172

@@ -208,17 +215,37 @@ efficient model deployment.
208215
- The implementation must handle image pull secrets and other registry authentication mechanisms.
209216
- Performance considerations must be taken into account, especially for large images or artifacts.
210217

218+
### Vocabulary: OCI Images, Artifacts, and Objects
219+
220+
**1. OCI Image:**
221+
- A container image that conforms to the Open Container Initiative (OCI) Image Specification.
222+
It includes a filesystem bundle and metadata required to run a container.
223+
- Consists of multiple layers (each layer being a tarball), a manifest (which lists the layers), and a config file
224+
(which provides configuration data such as environment variables, entry points, etc.).
225+
- **Use Case:** Used primarily for packaging and distributing containerized applications.
226+
227+
**2. OCI Artifact:**
228+
- An artifact describes any content that is stored and distributed using the OCI image format.
229+
It includes not just container images but also other types of content like Helm charts, WASM modules, machine learning models, etc.
230+
- Artifacts use the same image manifest and layer structure but may contain different types of data
231+
within those layers. The artifact manifest can have media types that differ from those in standard container images.
232+
- **Use Case:** Allows the distribution of non-container content using the same infrastructure and tools developed for OCI images.
233+
234+
**3. OCI Object:**
235+
- Umbrella term encompassing both OCI images and OCI artifacts. It represents any object that conforms to the OCI specifications for storage and distribution.
236+
211237
### Risks and Mitigations
212238

213239
- **Security Risks:** Allowing direct mounting of OCI images introduces potential attack vectors. Mitigation includes thorough security reviews and
214-
limiting access to trusted registries.
240+
limiting access to trusted registries. Limiting to OCI artifacts (non-runnable content) or read-only mode may lessen the security risk.
215241
- **Compatibility Risks:** Ensure compatibility with existing features.
216242
- **Performance Risks:** Large images or artifacts could impact performance. Mitigation includes optimizations in the implementation and providing
217243
guidance on best practices for users.
218244

219245
## Design Details
220246

221-
The new `VolumeSource` will be defined in the Kubernetes API, and the implementation will involve updating the Kubernetes control plane components to support this source type. Key design aspects include:
247+
The new `VolumeSource` will be defined in the Kubernetes API, and the implementation will involve updating components (CRI, Kubelet, Scheduler)
248+
to support this source type. Key design aspects include:
222249

223250
- API changes to introduce the new `VolumeSource` type.
224251
- Modifications to the Kubelet to handle mounting OCI images and artifacts.
@@ -249,6 +276,29 @@ spec:
249276
name: oci-volume
250277
```
251278
279+
### Kubelet and CRI support for OCI artifacts
280+
281+
Kubelet and the Container Runtime Interface (CRI) currently handle OCI images. To support OCI artifacts,
282+
potential enhancements may be required:
283+
284+
**1. Extended Media Type Handling:**
285+
- Update Kubelet and CRI to recognize and handle new media types associated with OCI artifacts.
286+
- Ensure that pulling and storing these artifacts is as efficient and secure as with OCI images.
287+
288+
**2. Lifecycling and garbage collection:**
289+
- Implement custom logic for managing the lifecycle of various OCI artifacts (e.g., loading a model into memory,
290+
preparing a Helm chart for deployment).
291+
292+
**3. Artifact-Specific Configuration:**
293+
- Introduce new configuration options or CRD to handle the unique requirements of different types of OCI artifacts.
294+
295+
**4. Validation:**
296+
- Extend validation and security checks to cover new artifact types.
297+
298+
**5. Storage Optimization:**
299+
- Develop optimized storage solutions tailored for different artifact types,
300+
potentially integrating with existing storage solutions or introducing new mechanisms.
301+
252302
### Test Plan
253303
254304
<!--
@@ -812,11 +862,10 @@ An out-of-tree CSI plugin can provide flexibility and modularity, but there are
812862
### Advantages of In-Tree OCI VolumeSource
813863

814864
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.
865+
- **No New Data Types or Objects:** OCI images are already a core part of the Kubernetes ecosystem. Extending support for OCI artifacts, many of
866+
the same mechanisms will be reused. This ensures consistency and reduces complexity, as both adhere to the same OCI image format.
817867
- **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.
868+
volumes and container images. The in-tree OCI VolumeSource will utilize these existing mechanisms.
820869

821870
2. **Integration with Kubernetes:**
822871
- **Optimal Performance:** Deep integration with the scheduler and kubelet ensures optimal performance and

0 commit comments

Comments
 (0)