-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
image load
: overwrite same image unless --overwrite=false
#11366
Conversation
Can one of the admins verify this patch? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lets add an option for user to still skip overwrite if they want to (not the default behaviour)
it could be
--over-write=true
with a default value of false
/ok-to-test |
/retest-this-please |
@spowelljr: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
pkg/minikube/machine/cache_images.go
Outdated
@@ -269,8 +269,15 @@ func transferAndLoadImage(cr command.Runner, k8s config.KubernetesConfig, src st | |||
return errors.Wrap(err, "runtime") | |||
} | |||
|
|||
if err := r.RemoveImage(imgName); err != nil { | |||
klog.Warningf("remove image: %v", err) | |||
exists, err := imageExists(r, imgName) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I worry this add performance downside to it, how about instead of Image List, we do something cheaper ? try to remove it, and if the error message says it doesnt exist then only klog.Info if error message is not that klog.Warnning
or alternatively we could do
klog.Warniningf("failed to remove image (which might be okay if it doesn't exists")
kvm2 driver with docker runtime
Times for minikube (PR 11366) start: 48.4s 55.8s 52.3s 50.9s 49.9s Times for minikube ingress: 35.8s 34.8s 61.8s 44.2s 36.3s docker driver with docker runtime
Times for minikube start: 21.4s 22.5s 21.0s 21.4s 21.6s Times for minikube ingress: 33.0s 70.5s 30.0s 28.5s 36.5s docker driver with containerd runtime
Times for minikube start: 42.8s 47.3s 43.1s 47.1s 43.3s |
kvm2 driver with docker runtime
Times for minikube (PR 11366) start: 46.2s 46.2s 47.6s 46.0s 46.5s Times for minikube ingress: 36.3s 34.3s 34.7s 35.9s 34.2s docker driver with docker runtime
Times for minikube start: 21.6s 21.3s 20.8s 21.0s 22.4s Times for minikube (PR 11366) ingress: 37.0s 37.0s 34.5s 33.5s 32.5s docker driver with containerd runtime
Times for minikube start: 43.0s 43.7s 47.7s 46.8s 47.7s |
--overwrite=false
--overwrite=false
image load
: overwrite same image unless --overwrite=false
kvm2 driver with docker runtime
Times for minikube start: 47.0s 48.7s 49.2s 55.5s 46.3s Times for minikube ingress: 43.7s 42.2s 35.3s 34.8s 43.7s docker driver with docker runtime
Times for minikube (PR 11366) ingress: 37.0s 35.1s 38.5s 35.0s 34.5s Times for minikube start: 47.4s 22.0s 22.2s 21.9s 22.5s docker driver with containerd runtime
Times for minikube start: 44.2s 47.1s 43.5s 43.5s 47.0s |
kvm2 driver with docker runtime
Times for minikube start: 47.7s 46.3s 50.6s 48.5s 52.2s Times for minikube ingress: 42.2s 35.2s 38.2s 36.3s 35.7s docker driver with docker runtime
Times for minikube start: 23.7s 21.7s 21.9s 21.5s 22.6s Times for minikube ingress: 33.5s 38.0s 35.0s 35.0s 31.5s docker driver with containerd runtime
Times for minikube start: 31.0s 43.8s 46.9s 43.1s 45.9s |
@spowelljr: The following test failed, say
Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh, spowelljr 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:
Approvers can indicate their approval by writing |
kvm2 driver with docker runtime
Times for minikube start: 56.0s 52.9s 53.8s 55.1s 53.3s Times for minikube ingress: 46.4s 37.5s 43.9s 37.4s 34.3s docker driver with docker runtime
Times for minikube (PR 11366) start: 23.0s 23.3s 24.0s 23.7s 23.4s Times for minikube ingress: 27.5s 28.1s 27.0s 32.6s 30.1s docker driver with containerd runtime
Times for minikube start: 47.3s 49.5s 48.2s 43.7s 48.8s |
Closes #11276
Before:
If you had an image already loaded into minikube, and then created a new image with the same name:tag as one already loaded into minikube and ran
minikube image load
it would skip loading the image since it detected a matching name:tag, even though the image itself is different.After:
minikube image load
will load the image, even if an image with the existing name:tag is already loaded into minikube.