+
Skip to content

Add image volume subpath support #9050

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

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

saschagrunert
Copy link
Member

@saschagrunert saschagrunert commented Mar 10, 2025

What type of PR is this?

/kind feature

What this PR does / why we need it:

Add sub path support to image volumes and extend integration tests for that scenario.

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

Refers to kubernetes/kubernetes#130135
Needs kubernetes-sigs/cri-tools#1793

Does this PR introduce a user-facing change?

Added image volume subpath support for Kubernetes v1.33 (https://github.com/kubernetes/enhancements/issues/4639).

@saschagrunert saschagrunert requested a review from mrunalp as a code owner March 10, 2025 08:59
@openshift-ci openshift-ci bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. release-note Denotes a PR that will be considered when it comes time to generate release notes. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. labels Mar 10, 2025
@openshift-ci openshift-ci bot requested review from hasan4791 and QiWang19 March 10, 2025 09:00
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 10, 2025
@saschagrunert saschagrunert force-pushed the image-volume-subpath branch 2 times, most recently from 2598159 to 8a25cbe Compare March 10, 2025 09:23
Copy link

codecov bot commented Mar 10, 2025

Codecov Report

Attention: Patch coverage is 15.84158% with 85 lines in your changes missing coverage. Please review.

Project coverage is 47.26%. Comparing base (8514685) to head (fca4ea6).
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #9050      +/-   ##
==========================================
- Coverage   47.37%   47.26%   -0.12%     
==========================================
  Files         158      159       +1     
  Lines       23334    23407      +73     
==========================================
+ Hits        11055    11063       +8     
- Misses      11190    11253      +63     
- Partials     1089     1091       +2     
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@saschagrunert saschagrunert force-pushed the image-volume-subpath branch 2 times, most recently from 61ca9b4 to 1db6562 Compare March 11, 2025 12:29
@saschagrunert saschagrunert force-pushed the image-volume-subpath branch 3 times, most recently from f83c27e to 7b2fd10 Compare March 13, 2025 08:12
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 13, 2025
@saschagrunert saschagrunert force-pushed the image-volume-subpath branch 2 times, most recently from 4a8d78d to 00c207e Compare March 13, 2025 08:14
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 13, 2025
@saschagrunert
Copy link
Member Author

/retest

@saschagrunert saschagrunert changed the title WIP: Add image volume subpath support Add image volume subpath support Mar 17, 2025
@openshift-ci openshift-ci bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 17, 2025
@saschagrunert
Copy link
Member Author

/retest

@saschagrunert
Copy link
Member Author

/retest

@cri-o/cri-o-maintainers PTAL

@saschagrunert
Copy link
Member Author

/retest

@saschagrunert
Copy link
Member Author

@cri-o/cri-o-maintainers PTAL

@giuseppe
Copy link
Member

@saschagrunert I've simplified the version in Podman to use OpenInRoot: containers/podman#25617

@saschagrunert
Copy link
Member Author

@saschagrunert I've simplified the version in Podman to use OpenInRoot: containers/podman#25617

Do we want to make this a helper in c/common or do you prefer having a split-up implementation?

Comment on lines +822 to +838
var cleanupSafeMounts []*safeMountInfo

runtime.LockOSThread()

cleanupFunc := func() {
runtime.UnlockOSThread()

for _, s := range cleanupSafeMounts {
s.Close()
}
}

defer func() {
if err != nil {
cleanupFunc()
}
}()
Copy link
Member Author

Choose a reason for hiding this comment

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

Hm, we may have to do this in scope of CreateContainer() and not createSandboxContainer(). 🤔

Add sub path support to image volumes and extend integration tests for
that scenario.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
@saschagrunert
Copy link
Member Author

@giuseppe PTAL again.

Copy link
Member

@giuseppe giuseppe 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 Mar 19, 2025
Copy link
Contributor

openshift-ci bot commented Mar 19, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: giuseppe, saschagrunert

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

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [giuseppe,saschagrunert]

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

@openshift-merge-bot openshift-merge-bot bot merged commit bdcf72f into cri-o:main Mar 19, 2025
74 of 78 checks passed
@saschagrunert saschagrunert deleted the image-volume-subpath branch March 19, 2025 11:42
saschagrunert added a commit to saschagrunert/cri-o that referenced this pull request Mar 19, 2025
Small follow-up on cri-o#9050

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载