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

Add docker.io/library to image short names #16214

Merged
merged 2 commits into from
Mar 11, 2024

Conversation

afbjorklund
Copy link
Collaborator

@afbjorklund afbjorklund commented Apr 2, 2023

Kubernetes automatically looks for "docker.io/library/*", so we need to add these to the images for it to find them.

It is still possible to use qualified image names with a custom registry, and not rely on the legacy defaults.

Closes #16036


minikube --alsologtostderr image build -t myimage myimage

BEFORE

I0402 21:50:35.557033  104890 docker.go:329] Building image: /var/lib/minikube/build/build.1807215478
I0402 21:50:35.557089  104890 ssh_runner.go:195] Run: docker build -t myimage /var/lib/minikube/build/build.1807215478
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM busybox
 ---> 7cfbbec8963d
Step 2/2 : RUN true
 ---> Using cache
 ---> fb21a5ceaab3
Successfully built fb21a5ceaab3
Successfully tagged myimage:latest

AFTER

I0402 21:50:56.736097  105202 docker.go:336] Building image: /var/lib/minikube/build/build.2187847824
I0402 21:50:56.736148  105202 ssh_runner.go:195] Run: docker build -t docker.io/library/myimage /var/lib/minikube/build/build.2187847824
Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM busybox
 ---> 7cfbbec8963d
Step 2/2 : RUN true
 ---> Using cache
 ---> fb21a5ceaab3
Successfully built fb21a5ceaab3
Successfully tagged myimage:latest

Note that Docker automatically hides the real name in the output, whereas containerd/buildkitd does not.

In the future, Kubernetes might allow to use a different default registry - but right now it is hard-coded...

Kubernetes automatically looks for "docker.io/library/*",
so we need to add these to the images for it to find them.

It is still possible to use qualified image names with a
custom registry, and not rely on the legacy defaults.
@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 2, 2023
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 2, 2023
@medyagh
Copy link
Member

medyagh commented Apr 3, 2023

/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 Apr 3, 2023
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@medyagh
Copy link
Member

medyagh commented Jun 7, 2023

/retest-this-please

@medyagh
Copy link
Member

medyagh commented Jun 7, 2023

@afbjorklund all the "TestFunctional/parallel/ImageCommands/ImageBuild" tests are failing, maybe the test needs to be updated?

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

plz take a look at the TestFunctional/parallel/ImageCommands/ImageBuild test

@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 19, 2024
@medyagh
Copy link
Member

medyagh commented Feb 5, 2024

@afbjorklund do you still like to finish this PR ? there is a functional test error

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Mar 6, 2024
@medyagh
Copy link
Member

medyagh commented Mar 6, 2024

we need to bring this PR back to Life but the Test failure
https://storage.googleapis.com/minikube-builds/logs/16214/29604/Docker_Linux.html#fail_TestFunctional%2fparallel%2fImageCommands%2fImageBuild

need to be fixed, I think minikube image list command has a problem that Does NOT list the images that DOES exist

@ComradeProgrammer
Copy link
Member

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Mar 7, 2024
@medyagh
Copy link
Member

medyagh commented Mar 7, 2024

/ok-to-test

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16214) |
+----------------+----------+---------------------+
| minikube start | 51.9s    | 50.5s               |
| enable ingress | 23.8s    | 23.1s               |
+----------------+----------+---------------------+

Times for minikube ingress: 23.5s 26.1s 22.6s 23.6s 23.0s
Times for minikube (PR 16214) ingress: 23.2s 23.0s 23.1s 22.2s 24.0s

Times for minikube start: 53.6s 51.5s 51.8s 51.9s 50.5s
Times for minikube (PR 16214) start: 51.3s 50.6s 50.2s 48.7s 51.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16214) |
+----------------+----------+---------------------+
| minikube start | 22.4s    | 24.1s               |
| enable ingress | 20.1s    | 20.5s               |
+----------------+----------+---------------------+

Times for minikube start: 21.5s 22.7s 22.1s 21.4s 24.4s
Times for minikube (PR 16214) start: 24.8s 22.9s 25.2s 24.7s 23.1s

Times for minikube ingress: 20.3s 20.3s 19.3s 20.3s 20.3s
Times for minikube (PR 16214) ingress: 20.3s 20.3s 21.3s 20.3s 20.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16214) |
+----------------+----------+---------------------+
| minikube start | 22.5s    | 20.9s               |
| enable ingress | 30.2s    | 34.4s               |
+----------------+----------+---------------------+

Times for minikube start: 23.9s 20.7s 24.0s 20.4s 23.8s
Times for minikube (PR 16214) start: 21.5s 20.3s 20.4s 21.5s 20.7s

Times for minikube ingress: 30.8s 30.8s 29.8s 29.8s 29.8s
Times for minikube (PR 16214) ingress: 30.3s 31.3s 30.8s 32.3s 47.3s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Windows TestFunctional/parallel/ServiceCmdConnect (gopogh) n/a
Docker_Windows TestMultiNode (gopogh) n/a
Docker_Windows TestMutliControlPlane (gopogh) n/a
Hyper-V_Windows TestMutliControlPlane/serial/PingHostFromPods (gopogh) n/a
Hyper-V_Windows TestMutliControlPlane/serial/RestartSecondaryNode (gopogh) n/a
Docker_Windows TestAddons/Setup (gopogh) 0.00 (chart)
Docker_Windows TestBinaryMirror (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnlyKic (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.20.0/json-events (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.20.0/kubectl (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.20.0/preload-exists (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.28.4/json-events (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.28.4/kubectl (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.28.4/preload-exists (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.29.0-rc.2/json-events (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.29.0-rc.2/kubectl (gopogh) 0.00 (chart)
Docker_Windows TestDownloadOnly/v1.29.0-rc.2/preload-exists (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/CertSync (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/CpCmd (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/DockerEnv/powershell (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/DryRun (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/FileSync (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageBuild (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageListJson (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageListShort (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageListTable (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageListYaml (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageLoadDaemon (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageLoadFromFile (gopogh) 0.00 (chart)
Docker_Windows TestFunctional/parallel/ImageCommands/ImageReloadDaemon (gopogh) 0.00 (chart)
More tests... Continued...

Too many tests failed - See test logs for more details.

To see the flake rates of all tests by environment, click here.

@afbjorklund
Copy link
Collaborator Author

As mentioned the fix was needed for containerd (buildkit)

Since cri-o has some other workaround by adding "localhost"

Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you both @afbjorklund and @ComradeProgrammer for this fix

@medyagh medyagh merged commit 375d9c6 into kubernetes:master Mar 11, 2024
24 of 38 checks passed
@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

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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to pull image that is pushed with minikube image build
6 participants