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

load add image-load, support podman load #3109

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

helen-frank
Copy link

/kind feature

Kind load add command image-load, extension supports podman load

@k8s-ci-robot k8s-ci-robot added kind/feature Categorizes issue or PR as related to a new feature. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Feb 23, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @helen-frank!

It looks like this is your first PR to kubernetes-sigs/kind 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/kind has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 23, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @helen-frank. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 23, 2023
Signed-off-by: helen <haitao.zhang@daocloud.io>
@aojea
Copy link
Contributor

aojea commented Feb 23, 2023

how is this different than current one that is not working in podman because of podman limitations to load images?

#3105

@helen-frank
Copy link
Author

how is this different than current one that is not working in podman because of podman limitations to load images?

#3105

My current implementation is feasible, I have tested it, and this problem is also found by wanting to use kwok on the kind-podman

podman pull docker.io/kindest/node:v1.25.0                                                                                                                                                                     ─╯
Trying to pull docker.io/kindest/node:v1.25.0...
Getting image source signatures
Copying blob 9602ae1e967a done
Copying blob 405bac4f49ab done
Copying config d3da246e12 done
Writing manifest to image destination
Storing signatures
d3da246e125a0644c137ffd5ecaea7658d4875581a82891b955b319aa6341d11
╭─   ~                                                                                                                                                            took  40s with root@10-29-16-89 at  10:32:24 ─╮
╰─❯ podman version                                                                                                                                                                                                 ─╯
Version:      3.4.4
API Version:  3.4.4
Go Version:   go1.17.3
Built:        Thu Jan  1 00:00:00 1970
OS/Arch:      linux/amd64
╭─   ~                                                                                                                                                                       with root@10-29-16-89 at  10:32:29 ─╮
╰─❯ podman ps                                                                                                                                                                                                      ─╯
CONTAINER ID  IMAGE                                                                                           COMMAND     CREATED         STATUS             PORTS                        NAMES
508321ce6a0f  docker.io/kindest/node@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1              7 days ago      Up 2 days ago                                   multi-node-worker2
49270a353240  docker.io/kindest/node@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1              7 days ago      Up 2 days ago                                   multi-node-worker
c9f635cd7edd  docker.io/kindest/node@sha256:f52781bc0d7a19fb6c405c2af83abfeb311f130707a0e219175677e366cc45d1              7 days ago      Up 2 days ago      10.29.16.89:41201->6443/tcp  multi-node-control-plane
a67d9f6f893b  docker.io/kindest/node:v1.26.0                                                                              11 minutes ago  Up 11 minutes ago  0.0.0.0:39493->6443/tcp      kwok-m1-control-plane
╭─   ~                                                                                                                                                                       with root@10-29-16-89 at  10:32:41 ─╮
╰─❯ kind load image-load --name kwok-m1 docker.io/kindest/node:v1.25.0                                                                                                                                             ─╯
enabling experimental podman provider
Image: "docker.io/kindest/node:v1.25.0" with ID "d3da246e125a0644c137ffd5ecaea7658d4875581a82891b955b319aa6341d11" not yet present on node "kwok-m1-control-plane", loading...
╭─   ~                                                                                                                                                            took  50s with root@10-29-16-89 at  10:33:57 ─╮
╰─❯ podman exec a67d9f6f893b crictl images ls | grep "docker.io/kindest/node"                                                                                                                                      ─╯
docker.io/kindest/node                     v1.25.0              d3da246e125a0       875MB

@aojea
Copy link
Contributor

aojea commented Feb 23, 2023

yeah, I was curious what is the difference with current docker-image command that makes this works and the other not 😄

@helen-frank
Copy link
Author

helen-frank commented Feb 23, 2023

yeah, I was curious what is the difference with current docker-image command that makes this works and the other not 😄

In fact, the difference between image-load and docker-image is whether the runtime is variable or not

The naming of docker-image prevents me from writing this logic to the boot

It's hard to predict how much of an impact image-load would have if it replaced docker-image

So I chose to create a new command, preferably using image-load and removing docker-image if I could.

@aojea
Copy link
Contributor

aojea commented Feb 23, 2023

In fact, the difference between image-load and docker-image is whether the runtime is variable or not

do you mean that podman has changed something and now the docker-imagecommand works with podman too?

if you do kind load docker-image --name kwok-m1 docker.io/kindest/node:v1.25.0 does it work too?
we have a bug open for a long time because it didn't worked with podman

Comment on lines +299 to +302
if _, err := osexec.LookPath("podman"); err != nil {
return "", err
}
return "podman", nil
Copy link
Contributor

Choose a reason for hiding this comment

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

is this the difference?

Copy link
Contributor

Choose a reason for hiding this comment

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

because this was not working before #2760

Copy link
Author

Choose a reason for hiding this comment

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

I tried to use docker-image in the form of soft links, and I succeeded.

❯ ln -s /usr/bin/podman /usr/bin/docker
❯ kind load docker-image --name kwok-m1 docker.io/kindest/node:v1.24.0
enabling experimental podman provider
Image: "docker.io/kindest/node:v1.24.0" with ID "a7d31d743aca47d4cdb00d6f61ba58b2423a1ead57dffa234f8d4f402f0a049d" not yet present on node "kwok-m1-control-plane", loading...
❯ podman exec a67d9f6f893b crictl images ls | grep "docker.io/kindest/node"
docker.io/kindest/node                     v1.24.0              a7d31d743aca4       915MB
docker.io/kindest/node                     v1.25.0              d3da246e125a0       875MB

Copy link
Author

Choose a reason for hiding this comment

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

❯ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.2 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.2 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

Copy link
Author

Choose a reason for hiding this comment

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

is this the difference?

Yeah, simple and effective, I didn't find podman has the problem of preventing ctr from writing.

Copy link
Contributor

Choose a reason for hiding this comment

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

something seems to have changed in podman or my memory is confused 😄

@BenTheElder it seems we can have the common load-image with no effort

@BenTheElder BenTheElder added this to the v0.19.0 milestone Mar 2, 2023
@helen-frank
Copy link
Author

helen-frank commented Mar 4, 2023

@aojea Can you give me an ok-to-test label?
Or can we continue to push.

@aojea
Copy link
Contributor

aojea commented Mar 4, 2023

@aojea Can you give me an ok-to-test label?

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 4, 2023
@helen-frank
Copy link
Author

/retest

@helen-frank
Copy link
Author

Can we continue?😀 @aojea @danderson @BenTheElder
First of all, it can be confirmed that image-load is already available on my podman environment.
What needs to be pushed forward in the future is which plan to adopt.

  1. use image-load
  2. use image-load and delete docker-image
  3. Code ability to be combined into docker-image (not recommended, will lead to misunderstanding)

@BenTheElder
Copy link
Member

BenTheElder commented Mar 6, 2023

erm, Please see: #2038, we should be discussing approaches to new features in the feature issues, per our contributing docs. https://kind.sigs.k8s.io/docs/contributing/getting-started/#4-reaching-out

I'm sorry, but all hands on deck with Keeping the Kubernetes project funded right now (See SIG K8s Infra).
I will not be spending much time reviewing kind features until we have a plan to sustain the Kubernetes organization.

The next thing up for the kind project is a release with all the existing bug fixes, when @aojea gets time.

We need to get the API right before introducing a new command, people will begin depending on it immediately.

If podman is actually working drop-in compatible here and we don't want to do all of #2038, we can design a third command (see the existing proposal) and give it a better name. kind load image-load is a confusing name.

@k8s-ci-robot
Copy link
Contributor

@mimani68: changing LGTM is restricted to collaborators

In response to this:

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.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: helen-frank, mimani68
Once this PR has been reviewed and has the lgtm label, please assign aojea for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@BenTheElder BenTheElder removed this from the v0.19.0 milestone May 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants