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

--download-only should store/load kicbase on local filesystem #10912

Closed
tstromberg opened this issue Mar 24, 2021 · 4 comments · Fixed by #10918
Closed

--download-only should store/load kicbase on local filesystem #10912

tstromberg opened this issue Mar 24, 2021 · 4 comments · Fixed by #10918
Assignees
Labels
co/docker-driver Issues related to kubernetes in container co/podman-driver podman driver issues kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Milestone

Comments

@tstromberg
Copy link
Contributor

To ensure minikube can startup in an air-gapped environment.

Related issue: #10149

@afbjorklund
Copy link
Collaborator

afbjorklund commented Mar 24, 2021

Currently it is only implemented for daemon, there is nothing in the cache - or for the other engines, such as podman

        if cc.Driver != "docker" {
                // TODO: driver == "podman"
                klog.Info("Driver isn't docker, skipping base image download")
                return
        }

The logic today is quite weird, if we fail saving the image to the daemon - then we try saving it to the cache ?!?

                        err := image.WriteImageToDaemon(img)
                        if err == nil {
                                klog.Infof("successfully downloaded %s", img)
                                finalImg = img
                                return nil
                        }
                        if downloadOnly {
                                if err := image.SaveToDir([]string{img}, constants.ImageCacheDir); err == nil {
                                        klog.Infof("successfully saved %s as a tarball", img)
                                        finalImg = img
                                        return nil
                                }
                        }

@afbjorklund afbjorklund added kind/feature Categorizes issue or PR as related to a new feature. co/docker-driver Issues related to kubernetes in container labels Mar 24, 2021
@afbjorklund
Copy link
Collaborator

afbjorklund commented Mar 24, 2021

Another ironic thing is that in order to save it to the docker daemon, go-registry first downloads a copy to a tempfile...

EDIT: Actually it was a pipe and not a tempfile, I remembered wrong. So it's like: crane pull | docker load

@afbjorklund
Copy link
Collaborator

I think we discussed this feature in issue #7766, but settled for the daemon-only (docker-only) solution.

I suppose that technically /var/lib/docker is a local filesystem ? But I assume this issue means cache.

@afbjorklund
Copy link
Collaborator

afbjorklund commented Mar 24, 2021

@tstromberg : should this be stored under "images", along with kubernetes and addons

or should it be stored in a top-level directory, similar to "iso" (maybe something like "kic")

@afbjorklund afbjorklund added triage/discuss Items for discussion co/podman-driver podman driver issues labels Mar 24, 2021
@sharifelgamal sharifelgamal added the priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. label Mar 30, 2021
@afbjorklund afbjorklund removed the triage/discuss Items for discussion label Apr 10, 2021
@afbjorklund afbjorklund added this to the v1.20.0-candidate milestone Apr 11, 2021
@sharifelgamal sharifelgamal added priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. and removed priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Apr 12, 2021
@afbjorklund afbjorklund self-assigned this Apr 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/docker-driver Issues related to kubernetes in container co/podman-driver podman driver issues kind/feature Categorizes issue or PR as related to a new feature. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants