Skip to content

Conversation

divysinghvi
Copy link
Contributor

This PR improves the Binary function in binary.go to better handle Kubernetes binary downloads. It adds logic to skip downloads when the --no-kubernetes flag is set, ensures not downloading unnecessary downloads with version v0.0.0
Before
Screenshot 2025-07-25 at 1 05 43 PM
After
Screenshot 2025-07-25 at 1 08 30 PM
This pr Fixes the issue #21107

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: divysinghvi
Once this PR has been reviewed and has the lgtm label, please assign prezha for approval. For more information see the 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

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 25, 2025
@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 Jul 25, 2025
@k8s-ci-robot
Copy link
Contributor

Hi @divysinghvi. Thanks for your PR.

I'm waiting for a kubernetes 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-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jul 25, 2025
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

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 @divysinghvi please consider adding an integraiton test sub-test to

https://vscode.dev/github/kubernetes/minikube/blob/separate-hack/test/integration/no_kubernetes_test.go#L32

before {"StartNoK8sWithVersion", validateStartNoK8sWithVersion}, you can do --download-only and check using -minikube ssh -- ls path/to/binary/- that the file doesnt exist

@divysinghvi
Copy link
Contributor Author

@medyagh Thanks for the suggestion! Just to clarify, for the integration test you mentioned, which exact Kubernetes binary path should I check for in the VM after running minikube with --no-kubernetes --download-only?
but i am confused what exact binary path should i check for

@medyagh
Copy link
Member

medyagh commented Jul 28, 2025

Lets also try not setting k8s version to 0.0.0 and see what breaks and why did we have to that

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.

lets add a sub test that that checks this folder should not exist
~/.minikube/cache/linux/amd64/v0.0.0/

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Aug 10, 2025
@medyagh
Copy link
Member

medyagh commented Aug 10, 2025

ok-to-test

defer PostMortemLogs(t, profile)

// Start minikube with --no-kubernetes flag
args := append([]string{"start", "-p", profile, "--no-kubernetes", "--memory=2048"}, StartArgs()...)
Copy link
Member

Choose a reason for hiding this comment

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

no need to start another minikube, use the Existing started minikube and simply add a sub test
like this
{"StartNoK8sWithVersion", validateStartNoK8sWithVersion},
---> {"VerifyNok8sNoK8sDownloads", },

		{"StartWithK8s", validateStartWithK8S},
		{"StartWithStopK8s", validateStartWithStopK8s},

Copy link
Contributor Author

Choose a reason for hiding this comment

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

since in StartNoK8sWithVersion we pass a Kubernetes version with --no-kubernetes isn't that suppose to exits with an error and that won't leave a running cluster to reuse i guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

maybe we are reuse this instance {"Start", validateStartNoK8S}, since it will be fresh working instance

@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Aug 11, 2025
@divysinghvi divysinghvi requested a review from medyagh August 12, 2025 06:32
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. needs-ok-to-test Indicates a PR that requires an org member to verify it 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.

4 participants