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

feat: support for multiple images to kind load #1920

Conversation

yashvardhan-kukreja
Copy link
Contributor

@yashvardhan-kukreja yashvardhan-kukreja commented Nov 9, 2020

closes #1905

Usage:

Multiple image names provided (all images present locally):

./kind load docker-image nginx,busybox --name master    

Multiple image names provided (all images are not present locally):

./kind load docker-image nginx,busybox,python --name master
ERROR: image: "python" not present locally

One image name provided without commas (backwards compatibility):

./kind load docker-image nginx --name master               

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 9, 2020
@k8s-ci-robot
Copy link
Contributor

Welcome @yashvardhan-kukreja!

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
Copy link
Contributor

Hi @yashvardhan-kukreja. 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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Nov 9, 2020
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 9, 2020
go.sum Outdated Show resolved Hide resolved
fns = append(fns, func() error {
return loadImage(imageTarPath, selectedNode)
})
}
Copy link
Member

@neolit123 neolit123 Nov 9, 2020

Choose a reason for hiding this comment

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

potentially, this code (the saving / loading) can be made to run in parallel via UntilErrorConcurrent:

func UntilErrorConcurrent(funcs []func() error) error {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

alright. I made the changes and brought the code performing the "saving of image into tar" just along the code where loading of images is happening. (Just above return loadImage(imageTarPath, selectedNode))

Copy link
Member

Choose a reason for hiding this comment

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

saving + loading in the same fn "should" work as long as the docker engine is fine with that.

@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch 2 times, most recently from 8341407 to 9c99d06 Compare November 9, 2020 14:09
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 9, 2020
@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch from 9c99d06 to 04ccdff Compare November 9, 2020 14:17
@neolit123
Copy link
Member

please, keep the commits squashed to one.

/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 Nov 9, 2020
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

/lgtm
/assign @BenTheElder

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2020
@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch from b0ac137 to c7a00f8 Compare November 9, 2020 14:31
@k8s-ci-robot
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Nov 9, 2020
@yashvardhan-kukreja
Copy link
Contributor Author

please, keep the commits squashed to one.

/ok-to-test

squashed... the lgtm label got removed. Don't know if that's ok or not.

@neolit123
Copy link
Member

squashed... the lgtm label got removed. Don't know if that's ok or not.

it's fine. pending review from @BenTheElder

@yashvardhan-kukreja
Copy link
Contributor Author

kind load docker-image image1 image2

oh, if this is about separate arguments then spaces are the way to go.
if these are in a single flag then commas are preferred:

kind load docker-image --images="image1,image2"

yes. And in the above conversation and in the issue's description too, the former approach of separate args was suggested and asked for. :)

@yashvardhan-kukreja
Copy link
Contributor Author

kind load docker-image image1 image2

oh, if this is about separate arguments then spaces are the way to go.
if these are in a single flag then commas are preferred:

kind load docker-image --images="image1,image2"

yes. And in the above conversation and in the issue's description too, the former approach of separate args was suggested and asked for. :)

And that's the change I made in the latest commit. So, it's working as expected :)

@yashvardhan-kukreja
Copy link
Contributor Author

@neolit123 @aojea , sorry for pestering but can u please review this? 🙈

Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

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

LGTM

@k8s-ci-robot k8s-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 3, 2020
@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch from e55c625 to e85ba85 Compare December 3, 2020 19:28
@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch from e85ba85 to 392d828 Compare December 11, 2020 15:08
@yashvardhan-kukreja
Copy link
Contributor Author

/retest

@yashvardhan-kukreja
Copy link
Contributor Author

Please have a look at this PR @BenTheElder . It has already received one LGTM status.

@BenTheElder
Copy link
Member

#1926 (comment)

@yashvardhan-kukreja
Copy link
Contributor Author

yashvardhan-kukreja commented Dec 17, 2020

/joke

Please ignore this. I just came to know about this k8s-bot's command and wanted to try it. 🙈

@k8s-ci-robot
Copy link
Contributor

@yashvardhan-kukreja: Remember, the best angle to approach a problem from is the "try" angle.

In response to this:

/joke

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.

@jaredallard
Copy link

Also ignore this, if we're demoing prow features, this is always a must

/meow

@k8s-ci-robot
Copy link
Contributor

@jaredallard: cat image

In response to this:

Also ignore this, if we're demoing prow features, this is always a must

/meow

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.

Copy link
Member

@BenTheElder BenTheElder left a comment

Choose a reason for hiding this comment

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

(See comment on your other PR) And thank you!

two nits we can address in follow-up given this lengthy delay 😞

pkg/cmd/kind/load/docker-image/docker-image.go Outdated Show resolved Hide resolved
site/content/docs/user/quick-start.md Outdated Show resolved Hide resolved
@yashvardhan-kukreja
Copy link
Contributor Author

@BenTheElder I have the changes ready as per my above comments. If these sound good, let me know, I ll push them under this PR : )
Thanks!

@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch from 392d828 to 134778d Compare March 15, 2021 20:11
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: yashvardhan-kukreja
To complete the pull request process, please ask for approval from bentheelder after the PR has been reviewed.

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

@yashvardhan-kukreja
Copy link
Contributor Author

/retest

@BenTheElder
Copy link
Member

test flakes are known / unrelated, don't worry about that.

@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch from 134778d to ac85114 Compare March 16, 2021 05:12
@yashvardhan-kukreja yashvardhan-kukreja force-pushed the issue-1905/support-for-multiple-images-to-kind-load branch from ac85114 to d3327a3 Compare March 16, 2021 16:32
@k8s-ci-robot
Copy link
Contributor

@yashvardhan-kukreja: The following tests failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-kind-e2e-kubernetes d3327a3 link /test pull-kind-e2e-kubernetes
pull-kind-e2e-kubernetes-1-20 d3327a3 link /test pull-kind-e2e-kubernetes-1-20

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.

@BenTheElder BenTheElder merged commit 6bbfe2f into kubernetes-sigs:master Mar 16, 2021
@BenTheElder BenTheElder added approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Mar 16, 2021
@yashvardhan-kukreja yashvardhan-kukreja changed the title issue 1905/support for multiple images to kind load feat: support for multiple images to kind load Mar 16, 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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

"kind load docker-image" supports loading multiple images at once
6 participants