Skip to content
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

Use the Image Digest to save it in a Registry #251

Closed

Conversation

jjbustamante
Copy link
Member

@jjbustamante jjbustamante commented Mar 1, 2024

This change was done to replace the image name with the digest when saving it in a registry, the idea is to use it when we are creating multi-arch images and we need to save each intermediate image before creating the Image Index.

The work is based on Husni's PR, because I need his logic to create the Image Index but my change is actually only in this commit

This is a DRAFT! I am not sure if this is the best way to do it, I just needed a way to solve my problem and develop the PoC

The OCI spec defines an Image Index concept to handle
multiple manifests in an OCI image. This adds the interface
for Image Index.

Signed-off-by: Husni Faiz <[email protected]>
remote.Image uses descriptor to get the image. Getting the descriptor
first and deriving the image from the descriptor is efficient instead
of getting the descriptor twice.

Signed-off-by: Husni Faiz <[email protected]>
AppendManifest and AnnotateManifest functions are now refactored
to be ImageIndex functions.

Signed-off-by: Husni Faiz <[email protected]>
husni-faiz and others added 16 commits November 25, 2023 13:14
When creating a new local index, if the the referenced images are
not in the same registry as the registry we intend to push the index
we copy the images to the same registry as the index.

NOTE: In future we plan to store the image reference names locally
and only copy the images when push the index to registry.

Signed-off-by: Husni Faiz <[email protected]>
This fixes the following errors,
- use strings.ReplaceAll method instead of strings.Replace
- `infromation` is a misspelling of `information`
- var-naming: don't use underscores in Go names
- unnecessary conversion (unconvert)
- ineffectual assignment to err
- unnecessary trailing newline
- unnecessary leading newline

Signed-off-by: Husni Faiz <[email protected]>
…ith the implementation of the multi-arch RFC when we want to create an Image Index in the registry

Signed-off-by: Juan Bustamante <[email protected]>
Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 21.83623% with 315 lines in your changes are missing coverage. Please review.

Project coverage is 55.75%. Comparing base (7ebe5c6) to head (64e6aff).
Report is 22 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
- Coverage   58.29%   55.75%   -2.53%     
==========================================
  Files          32       38       +6     
  Lines        3694     3778      +84     
==========================================
- Hits         2153     2106      -47     
- Misses       1184     1349     +165     
+ Partials      357      323      -34     

@jjbustamante
Copy link
Member Author

We don't need this change anymore, I updated our pack manifest commands PR to use the latest version of the imgutil code (after we merged the image index logic) and we don't need this hack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants