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

UI: Add progressbar when downloading kic base image #10887

Merged
merged 2 commits into from
Mar 21, 2021

Conversation

afbjorklund
Copy link
Collaborator

✨  Automatically selected the docker driver. Other choices: kvm2, podman, virtualbox, ssh
πŸ‘  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
    > gcr.io/k8s-minikube/kicbase...: 61.10 MiB / 353.96 MiB  17.26% 5.19 MiB p^C

Closes #7012

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 21, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 21, 2021
@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Mar 21, 2021

Support for tarball was added in google/go-containerregistry#675

For daemon submitted upstream as google/go-containerregistry#972

@afbjorklund
Copy link
Collaborator Author

Sadly this breaks the digest handling, so the image is downloaded over-and-over instead

/hold

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 21, 2021
@afbjorklund
Copy link
Collaborator Author

Apparently had an old image in the cache or something, because it worked now...

first start

Checking for gcr.io/k8s-minikube/kicbase:v0.0.18@sha256:ddd0c02d289e3a6fb4bba9a94435840666f4eb81484ff3e707b69c1c484aa45e in local docker daemon
🚜  Pulling base image ...
Writing image gcr.io/k8s-minikube/kicbase:v0.0.18@sha256:ddd0c02d289e3a6fb4bba9a94435840666f4eb81484ff3e707b69c1c484aa45e
    > gcr.io/k8s-minikube/kicbase...: 353.96 MiB / 353.96 MiB  100.00% 12.10 Mi
successfully downloaded gcr.io/k8s-minikube/kicbase:v0.0.18@sha256:ddd0c02d289e3a6fb4bba9a94435840666f4eb81484ff3e707b69c1c484aa45e
[
    {
        "Id": "sha256:a776c544501ab7f8d55c0f9d8df39bc284df5e744ef1ab4fa59bbd753c98d5f6",
        "RepoTags": [
            "gcr.io/k8s-minikube/kicbase:v0.0.18"
        ],
        "RepoDigests": [
            "gcr.io/k8s-minikube/kicbase@sha256:ddd0c02d289e3a6fb4bba9a94435840666f4eb81484ff3e707b69c1c484aa45e"
        ],

second start

I0321 15:52:29.765944 1843801 image.go:90] Checking for gcr.io/k8s-minikube/kicbase:v0.0.18@sha256:ddd0c02d289e3a6fb4bba9a94435840666f4eb81484ff3e707b69c1c484aa45e in local docker daemon
I0321 15:52:29.833259 1843801 image.go:94] Found gcr.io/k8s-minikube/kicbase:v0.0.18@sha256:ddd0c02d289e3a6fb4bba9a94435840666f4eb81484ff3e707b69c1c484aa45e in local docker daemon, skipping pull

/unhold

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 21, 2021
@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Mar 21, 2021

It seems like it is the "--download-only" that is broken, it doesn't update the digest.

Docker never does that when loading from a tarball, like go-containerregistry does.

When using the normal start, it will continue and let docker tag the image properly.

i.e. it will be without a digest initially, but the docker run will add it during start.

@afbjorklund
Copy link
Collaborator Author

afbjorklund commented Mar 21, 2021

Fixed the image digest, with the usual pull after load workaround

Now you can do --download-only multiple times without re-downloading.

$ ./out/minikube start --download-only
πŸ˜„  minikube v1.18.1 on Ubuntu 20.04
✨  Using the docker driver based on existing profile
πŸ‘  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
    > gcr.io/k8s-minikube/kicbase...: 353.96 MiB / 353.96 MiB  100.00% 9.39 MiB
βœ…  Download complete!
$ ./out/minikube start --download-only
πŸ˜„  minikube v1.18.1 on Ubuntu 20.04
✨  Using the docker driver based on existing profile
πŸ‘  Starting control plane node minikube in cluster minikube
βœ…  Download complete!

Before it would start over again, due to the missing digest after daemon.Write.

@medyagh medyagh changed the title Add progressbar when downloading kic base image UI: Add progressbar when downloading kic base image Mar 21, 2021
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afbjorklund, medyagh

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [afbjorklund,medyagh]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@medyagh medyagh merged commit 185b4a7 into kubernetes:master Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

show progress bar for downloading kic base image
3 participants