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

image load: add warning when loading image with wrong arch #19229

Merged
merged 5 commits into from
Jul 11, 2024

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Jul 10, 2024

Per conversation in https://kubernetes.slack.com/archives/C1F5CT6Q1/p1720561197944349
This PR does following:

  • Warning user if they load an image that has different arch than container runtime example
  • dont spam verbose logs when length of failure or success are empty list
  • fix integration test to use a multi arch image (gcr.io/google-containers/addon-resizer:1.8.8 is only x86 )

Before this PR

$ minikube image load gcr.io/google-containers/addon-resizer:1.8.8 alpine:131313 alpine:latest gcr.io/k8s-minikube/kicbase-builds/echo-server:1.0
❗  The image 'alpine:131313' was not found; unable to add it to cache.

After this PR

$ mk image load gcr.io/google-containers/addon-resizer:1.8.8 alpine:131313 alpine:latest gcr.io/k8s-minikube/kicbase-builds/echo-server:1.0
❗  The image 'alpine:131313' was not found; unable to add it to cache.
❗  The image 'gcr.io/google-containers/addon-resizer:1.8.8' does not match arch of the container runtime, use a multi-arch image instead

@k8s-ci-robot k8s-ci-robot requested review from prezha and spowelljr July 10, 2024 21:01
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. 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 Jul 10, 2024
@medyagh medyagh changed the title add warning when loading image with wrong arch image load: add warning when loading image with wrong arch Jul 10, 2024
@medyagh
Copy link
Member Author

medyagh commented Jul 10, 2024

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Jul 10, 2024
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19229) |
+----------------+----------+---------------------+
| minikube start | 48.8s    | 48.5s               |
| enable ingress | 24.7s    | 24.5s               |
+----------------+----------+---------------------+

Times for minikube start: 47.6s 53.9s 49.2s 46.7s 46.6s
Times for minikube (PR 19229) start: 49.3s 46.6s 50.1s 49.3s 47.3s

Times for minikube ingress: 23.5s 24.0s 28.0s 23.9s 23.9s
Times for minikube (PR 19229) ingress: 24.9s 24.4s 24.0s 23.9s 25.0s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19229) |
+----------------+----------+---------------------+
| minikube start | 22.6s    | 21.3s               |
| enable ingress | 21.3s    | 21.9s               |
+----------------+----------+---------------------+

Times for minikube start: 21.7s 23.7s 20.6s 22.5s 24.6s
Times for minikube (PR 19229) start: 21.2s 21.3s 21.2s 21.3s 21.5s

Times for minikube ingress: 20.8s 21.3s 21.8s 21.2s 21.3s
Times for minikube (PR 19229) ingress: 21.8s 21.7s 21.8s 21.8s 22.2s

docker driver with containerd runtime

+-------------------+----------+---------------------+
|      COMMAND      | MINIKUBE | MINIKUBE (PR 19229) |
+-------------------+----------+---------------------+
| minikube start    | 22.0s    | 21.4s               |
| ⚠️  enable ingress | 29.1s    | 35.1s ⚠️             |
+-------------------+----------+---------------------+

Times for minikube start: 22.2s 19.6s 22.4s 22.7s 23.0s
Times for minikube (PR 19229) start: 20.2s 20.2s 20.3s 23.4s 22.8s

Times for minikube ingress: 33.3s 30.7s 30.7s 30.8s 19.8s
Times for minikube (PR 19229) ingress: 32.2s 32.3s 32.3s 46.8s 31.7s

@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@medyagh medyagh merged commit 02a76e0 into kubernetes:master Jul 11, 2024
25 of 38 checks passed
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. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. 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.

4 participants