Replies: 2 comments 5 replies
-
Thank you for proposing this! Some thoughts on the proposal: How does ICS get creds to access the registry? According to the discussion in goharbor/community#167 (comment), ICS should obtain creds on its own instead of getting them from harbor.
either way, I think we need ways to manage registry access permissions per user (but I'm not sure how we can achieve it as of now). According to the proposal, the registry client can know the association of the original image and the converted one only through Web Portal, right? WDYT about baking the association to the image index (discussed in goharbor/community#167) for supporting other registry clients? For avoiding the race condition mentioned in goharbor/community#167, I guess we need something like opencontainers/distribution-spec#251? |
Beta Was this translation helpful? Give feedback.
-
Hello, i was just getting into this, and the implementation (currently choosen) seems to be option 1. Are we still planing on opting to go for 2, in similar context with what happens with Trivy? Otherwise i could do some contribution to the helm chart... |
Beta Was this translation helpful? Give feedback.
-
Why we need accelerated image?
Pulling image is one of the time-consuming steps in the container lifecycle. Research shows that time to take for pull operation accounts for 76% of container startup time FAST '16. The P2P-based file distribution system can help reduce network latency when pulling images at runtime, saving network bandwidth and greatly reducing the impact of registry single point of failure, which is very important for large-scale container scaling scenarios.
This research FAST '16 also shows that only about 6.4% of the data is read at runtime, meaning that most of the data take up and wastes network bandwidth and container startup time when pulling images or doing advance preheat of images. Accelerated image formats like Nydus and eStargz aim to address this issue, and they do a lot of work on data de-duplication, end-to-end data integrity, and the compatibility for OCI artifacts spec and distribution spec.
It would be very useful if Harbor could provide accelerated image integration directly. Harbor combines the P2P system and accelerated image format to provide a large-scale efficient, secure joint image solution for the container ecosystem.
How to integrate accelerated image?
User can use the nydusify or ctr-remote tools to convert image to Nydus or eStargz image, respectively. But we can introduce a standalone image conversion service (ICS for short) designed to provide Harbor with the ability to automatically convert image to accelerated image.
When a user does something such as artifact push, Harbor will make a request to ICS to complete the corresponding image conversion through its integrated Nydus, eStargz, etc. drivers, see more detail in this proposal.
There are currently two ways considered to integrate ICS with Harbor, one more loosely and the other more deeply.
Option 1: Integrate ICS with webhook
Design
The design principle of this option is to decouple the ICS component from the harbor core as much as possible to keep it independent, with ICS acting as a webhook server and harbor using webhook request to notify the ICS service to trigger image conversion action. For example, an accelerated image conversion can be triggered when an artifact push event occurs, involving the following webhook configuration:
The following features are not yet supported in the current version of harbor and should be proposed and implemented:
Workflow
Questions
Option 2: Integrate ICS with job service
Design
The design will integrate ICS more deeply with Harbor for a better user experience. When the push image event occurs, harbor sends an image conversion job to the job service based on conversion configuration to schedule the ICS to complete image conversion.
Workflow
What do you think about image conversion integration?
Beta Was this translation helpful? Give feedback.
All reactions