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

enable docker load for hauler tarballs #320

Merged
merged 2 commits into from
Sep 20, 2024

Conversation

dweomer
Copy link
Contributor

@dweomer dweomer commented Sep 13, 2024

@zackbradys zackbradys added enhancement New feature or request size/M Denotes an issue/PR requiring a relatively moderate amount of work labels Sep 13, 2024
@zackbradys zackbradys added this to the Hauler v1.1.0 milestone Sep 13, 2024
@atoy3731
Copy link
Contributor

atoy3731 commented Sep 13, 2024

Seeing one issue with docker save vs hauler store save with hauler bundles.

When RKE2/K3s loads the images, the repo metadata is lost. Using crictl images:
docker save:

harbor.atoy.dev/public/dnsutils                                      1.0                                        2b62dfbe8a9a9       76.4MB

hauler store save:

docker.io/public/dnsutils                                            1.0                                        2b62dfbe8a9a9       76.4MB

That probably means hauler store add image needs some (potentially option?) to maintain the repo.

@zackbradys
Copy link
Member

Right now that is the functionality of hauler. When you hauler store add, it removes the registry from the image reference and when you hauler store copy, it adds the specified registry to the image reference.

We probably need to have a conversation about how we want to do this in the future and would require a larger lift. There are a few open and related tickets to this too. @atoy3731 @dweomer

@dweomer
Copy link
Contributor Author

dweomer commented Sep 13, 2024

Right now that is the functionality of hauler. When you hauler store add, it removes the registry from the image reference and when you hauler store copy, it adds the specified registry to the image reference.

We probably need to have a conversation about how we want to do this in the future and would require a larger lift. There are a few open and related tickets to this too. @atoy3731 @dweomer

can we get a bug report on this behavior?

@amartin120
Copy link
Contributor

amartin120 commented Sep 13, 2024

It's intended, albeit an outdated idea. When Hauler pulls in an image into its store, it tosses out the registry from the image ref on purpose. Mostly because of an idea that Haulers goal was to snag and relocate images to another registry and therefore the origin registry wasn't really needed.

Now that Hauler does more than move images from registry to registry, we should have a conversation about changing this. It's handled in the cosign fork and not Hauler itself. (plus it's part of the upstream cosign PR)

If you inspect the index.json in the oci layout. You'll see in the annotations that all of the image refs are just stripped of the registry. So now that we're using docker load, I guess it's adding the default of docker.io.

@zackbradys
Copy link
Member

zackbradys commented Sep 13, 2024

Thanks for the deeper dive on it @amartin120. Agreed that we need to chat on it. Hauler meeting next week?

@dweomer there are two or three discussions and open RFEs on it.

I wouldn't classify it as a bug since it is how hauler is intended to function as now.

- fixes hauler-dev#276

Signed-off-by: Jacob Blain Christen <jacob.blain.christen@ranchergovernment.com>
@zackbradys
Copy link
Member

@dweomer are you expecting any more updates to this PR or is it ready to be reviewed/tested/merged?

@amartin120 amartin120 marked this pull request as ready for review September 20, 2024 17:27
Copy link
Contributor

@amartin120 amartin120 left a comment

Choose a reason for hiding this comment

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

LGTM. There will be a follow-up PR for adjusting the imageRef to use a new annotation described here... #322

@amartin120 amartin120 merged commit 6510947 into hauler-dev:main Sep 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/M Denotes an issue/PR requiring a relatively moderate amount of work
Projects
Status: Resolved
Development

Successfully merging this pull request may close these issues.

[feature] support docker load semantics for hauler bundles
4 participants