Skip to content

OCPNODE-2929: proposal of OCI image volume #1792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bitoku
Copy link

@bitoku bitoku commented May 7, 2025

/assign haircommander
/assign saschagrunert

This is a proposal for how to integrate OCI image volume into OpenShift.

@bitoku
Copy link
Author

bitoku commented May 7, 2025

/cc mrunalp

@openshift-ci openshift-ci bot requested a review from mrunalp May 7, 2025 18:56
@bitoku bitoku force-pushed the oci-image-volume branch from 346b211 to ec6b9a3 Compare May 8, 2025 10:52
Copy link
Member

@saschagrunert saschagrunert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 8, 2025
Copy link
Contributor

openshift-ci bot commented May 8, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: saschagrunert
Once this PR has been reviewed and has the lgtm label, please assign deads2k for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@bitoku
Copy link
Author

bitoku commented May 12, 2025

@mrunalp @haircommander PTAL for approval.

@bitoku bitoku changed the title Add initial proposal of OCI image volume OCPNODE-2929: proposal of OCI image volume May 13, 2025
@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label May 13, 2025
@openshift-ci-robot
Copy link

openshift-ci-robot commented May 13, 2025

@bitoku: This pull request references OCPNODE-2929 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the epic to target the "4.20.0" version, but no target version was set.

In response to this:

/assign haircommander
/assign saschagrunert

This is a proposal for how to integrate OCI image volume into OpenShift.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@haircommander
Copy link
Member

/lgtm


### Implementation Details/Notes/Constraints

To separate graduation of OCI image and OCI artifact, we are going to add a new option to disable OCI artifact in CRI-O and disable OCI artifact mount by default via MCO.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this not be done via an API change?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why expose an API we don't expect a user to toggle? Either we're comfortable users using it OOTB or it's off IMO

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So all the APIs to enable/disable for MCO/Feature gates are present?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The feature gate will be enabled by default for OCP.
But because we disable OCI artifacts in MCO cri-o config, the OCP users can't use OCI artifacts, and we're not going to give the users a way to toggle OCI artifact. The only way to enable it is to change cri-o config directly until it's available.
When we think we're ready for GA (or TP?), we're gonna enable it by changing the crio config template.

@bitoku bitoku force-pushed the oci-image-volume branch from ec6b9a3 to 6430707 Compare May 19, 2025 15:23
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label May 19, 2025
@bitoku
Copy link
Author

bitoku commented May 19, 2025

@kannon92 @haircommander I updated the doc. PTAL


- This proposal does not aim to replace existing VolumeSource types.
- This proposal does not address other use cases for OCI objects beyond directory sharing among containers in a pod.
- Mounting thousands of images in a single pod.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kinda find it odd this is here tbh.are hundreds supported? seems odd to set such an arbitrarily high limit with no testing of those limits

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have copied from the original KEP. https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/4639-oci-volume-source#non-goals
Do we want to just delete this item or completely replace this section to the link to the upstream KEP?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted the line.

2. Separate Graduation Approach between OCI Images and OCI Artifacts.

- **OCI Image Mount**: Promote to GA
- **OCI Artifact Mount**: Begin as DevPreview

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a confusing to me..

Are we including the DevPreview of OCI Artifact Mount in this KEP?

Or are we aiming for this enhancement to me ImageVolume"

Copy link
Author

@bitoku bitoku May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it's including OCI artifacts. The name of this enhancement is the same as the original KEP, which also includes OCI images and OCI artifacts.
There's not many differences feature-wise, I'd like to include OCI artfiacts rather than creating a new one for them, but it's true it's a bit confusing.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m not sure if this is a big deal but I see that this KEP will have two different feature gates that will progress differently.

ImageVolume will be used to toggle the upstream feature gate so we can GA earlier. I think this gate could be dropped once ImageVolume is turned on by default.

For OCI artifacts we are starting with dev preview with no feature gates but eventually we would have a separate feature gate. I don’t know when we can promote this to GA?

writing this out here because I think we need to cover this in this KEP if you want to combine these two features but graduate at different times.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there aren't gates that are being introduced here. there's one upstream featuregate enabling oci volume source, and then there's a cri-o toggle that says whether we'll allow artifacts or not. "dev preview" for artifacts is a support stance and talks about enablement. We on the node team rarely codify a dev preview with an API field, and we don't plan on doing so here

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The graduation process is going to be what @haircommander described.
But thank you for pointing it out @kannon92. That point should be explained in this section. I'll add the explanation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some explanations

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bitoku thank you for your updates. This is much clearer.

"dev preview" for artifacts is a support stance and talks about enablement. We on the node team rarely codify a dev preview with an API field, and we don't plan on doing so here

My main point is do we want to call out graduation criteria for OCI artifacts in this KEP? Or are we going to draft a new KEP or update this one once we eventually want to take OCI artifacts out of dev preview?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

artifacts are out of scope for KEPs, do you mean openshift enhancement? I think we can append this one with graduation criteria when it's more clear, we're still defining what artifact support looks generally

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea this OEP.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we could update the criteria if needed after this PR's merged, and if we think we should open a new draft when we graduate it to TP or GA, we can think about it at that time.


#### OCI Image

Since OCI image mount will be GA in 4.20. No feature gate configuration is needed by users. Creating a pod with volumes.image will pull the image and mount in the container.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that this is a pod API and both windows / linux users could use this API. We should comment on windows containers here and what kind of UX we would have for this feature for windows.

I think it is okay if windows does not support this if containerd does not but we should still call it out.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apparently windows machines use containerd. OCI image mount might be supported, but I'll make it clear it's out-of-scope.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added it in non-goals

@bitoku bitoku force-pushed the oci-image-volume branch from 6430707 to 89b662a Compare May 22, 2025 16:58
@bitoku bitoku force-pushed the oci-image-volume branch 2 times, most recently from 1a7f82b to 5d245a4 Compare May 22, 2025 17:04

#### OCI Artifact

While OCI artifact is in dev preview, it fails to mount if a user specifies OCI artifact in reference. To enable the mount, users need to add this drop-in CRI-O configuration.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think noting both this is done via MachineConfig and that it makes their cluster unsupported would be good things to mention

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added in the next line

The mitigation is:

- CRI API is easier to change if needed since it's internal to the implementation
- [The Kubernetes API for this feature](https://github.com/kubernetes/enhancements/tree/master/keps/sig-node/4639-oci-volume-source#kubernetes-api) is stable and unlikely to change as it's already in beta
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: as it's already in beta and is built on a very stable volume API?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@bitoku bitoku force-pushed the oci-image-volume branch from 5d245a4 to 62511be Compare May 27, 2025 15:10
Signed-off-by: Ayato Tokubi <atokubi@redhat.com>
@bitoku bitoku force-pushed the oci-image-volume branch from 62511be to 65ceeb5 Compare May 27, 2025 15:15
Copy link
Contributor

openshift-ci bot commented May 27, 2025

@bitoku: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@bitoku
Copy link
Author

bitoku commented May 27, 2025

@haircommander PTAL

@haircommander
Copy link
Member

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label May 27, 2025

#### OCI Artifact

While OCI artifact is in dev preview, it fails to mount if a user specifies OCI artifact in reference.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we describe how OCI Artifact support will work? I am looking for details around how they are mounted, if they will be GC'ed by kubelet, and whether we set names from annotations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants