Skip to content

Add content policy to transfer image store - #11841

Closed
dmcgowan wants to merge 2 commits into
containerd:mainfrom
dmcgowan:content-policy
Closed

dmcgowan wants to merge 2 commits into
containerd:mainfrom
dmcgowan:content-policy

Conversation

@dmcgowan

@dmcgowan dmcgowan commented May 12, 2025 •

Copy link
Copy Markdown
Member

Allows clients to specify how content should be retained from a pull. This is need both to implement discard content policy as well as to download all content via the transfer service when an unpack configuration is provided.

Currently in the code which is optimized to unpack in parallel to fetching content, there is no way to force the download of content which is already unpacked without completely disabling unpack.

The retention levels that can be defined are:

  • None - The same as the discard content policy, this will not keep any tars around after pull
  • Cached - This is the current default, will retain the content that was fetched and cached locally to do the unpack
  • All - Equivalent to pull all platforms, this will allow fetching all content even when not unpacking all platforms. There is currently a gap in support that makes it impossible to push previously pulled multi-platform images without explicitly using a command like ctr content fetch --all-platforms.

@k8s-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

Comment thread api/types/transfer/imagestore.proto Resolved
Comment thread api/types/transfer/imagestore.proto Resolved
Comment thread api/types/transfer/imagestore.proto Resolved
Comment thread api/types/transfer/imagestore.proto Resolved
@dmcgowan
dmcgowan force-pushed the content-policy branch 6 times, most recently from 8fcaccb to 57aaf72 Compare May 14, 2025 17:24
@dmcgowan
dmcgowan force-pushed the content-policy branch 2 times, most recently from 335bc7b to b9c4567 Compare May 22, 2025 00:45
@dmcgowan

Copy link
Copy Markdown
Member Author

Updated the naming and this should be ready for review. Added more information in the description about the design.

@dmcgowan
dmcgowan marked this pull request as ready for review May 22, 2025 00:51
@dosubot dosubot Bot added the area/distribution Image Distribution label May 22, 2025
@azr

azr commented Jul 2, 2025

Copy link
Copy Markdown
Contributor

This is quite interesting ! It would be nice if I could give a limit with the cached option. Time bound or size bound. For example this would enable using solutions like Spegel, without the fear of completely filling the disks.

@phillebaba

Copy link
Copy Markdown
Contributor

@azr some of this would be dealt with by Kubernetes garbage collection. Depending on how much control you have of your kubelet you could set a disk pressure percentage for when garbage collection should kick in.

@azr

azr commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

Hey @phillebaba oh, thanks for the pointer, I need to read about that more carefully !

@azr azr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks pretty neat !

@AkihiroSuda

Copy link
Copy Markdown
Member

Needs rebase

@dmcgowan dmcgowan added this to the 2.2 milestone Oct 16, 2025
@dmcgowan dmcgowan moved this from Needs Triage to Needs Update in Pull Request Review Oct 16, 2025
@dmcgowan dmcgowan self-assigned this Oct 16, 2025
Content retention allows the client to indicate when transfering into the
image store what content they want retained. Client may have different
intentions for how the content may or may not be used after the image
transfer.

Signed-off-by: Derek McGowan <[email protected]>
@dmcgowan dmcgowan moved this from Needs Update to Needs Reviewers in Pull Request Review Oct 23, 2025
@dmcgowan dmcgowan modified the milestones: 2.2, 2.3 Oct 23, 2025
@k8s-ci-robot

Copy link
Copy Markdown

PR needs rebase.

Details

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.

@github-actions

Copy link
Copy Markdown

This PR is stale because it has been open 90 days with no activity. This PR will be closed in 7 days unless new comments are made or the stale label is removed.

@github-actions github-actions Bot added the Stale label Jan 24, 2026
@github-actions

Copy link
Copy Markdown

This PR was closed because it has been stalled for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants