-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
unified image loading: podman/docker/nerdctl/tarball #2038
Comments
and adding the methods to the provider interface? type Image interface {
Save(image, dest string) error
ImageID(image string) (string,error)
} |
No, because we shouldn't need a provider instance. Even if I use docker to build some image (maybe I'm using a project that uses buildkit / buildx) I should be able to load it into my podman cluster smoothly, and vice versa. Not to mention file based images that are not even remotely a node provider. |
That is great, and is easy to implement #2041 I like the piping approach and leverage other tools like https://github.com/containers/skopeo to deal with the whole image format thing |
Thinking about this some more, I think it would be reasonable to bump the current node provider to the 2nd preference (after checking for a file matching the argument) for each provider, just moving them and keeping the rest of the list in a fixed order. Then the results are predictable with future providers, but with each provider we know to have images, we can give preference for the matching image source. I feel like as a user I would expect podman to have priority when using podman, and docker when using docker. |
probably also consider OCI images from disk #2626 |
+1 on this |
`kind load docker-image` doesn't work for podman images yet: kubernetes-sigs/kind#2038
Note: It can work with (local) tarball files, docker/podman/nerdctl, defaulting to match the provider of the cluster being used, with some option to override the source detection. I don't think we should support remote tarballs, at least for now, it increases the surface area for little gain, if you're using the network to import an image you should just pull it. But supporting both tarballs and container images in one command that intelligently selects the source, with fallbacks (users can have multiple runtimes in use ...) and automatically matching the runtime being selected for the nodes makes sense. I don't think this is terribly complicated, but it needs a little bit of spelling out the design, then implementing. |
Also, the reason to sort this out up front is because we're going to run out of good names for these commands, and we get one shot at introducing a new CLI interface before we either burn that name or have to break users (and we strongly prefer to not break users) |
cc @aojea @stmcginnis this is a recurring pain point, thoughts? |
I really like the idea of having a single
+1! |
As discussed when podman has come up previously I don't think we should continue making unique image loading commands, instead we should:
kind load image
For checking docker vs podman, we can potentially enhance it to cache if docker or podman are even in PATH and skip the ones that aren't installed.
We could also perhaps match the node provider in preferring these, but a couple things to consider:
I think it may be worth sticking to the simplest: a fixed order of these, and ensuring this is fast.
If a script/user really want to load from a particular source, they can always do like
podman save hello-world:2 | kind load image -
EDIT: once we agree on the high level approach, I have a few more specific points to add about implementing this correctly.
cc @aojea @amwat @bostrt
The text was updated successfully, but these errors were encountered: