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

New flag "--binary-mirror" to override mirror URL downloading (kubectl, kubelet, & kubeadm) #12804

Merged
merged 3 commits into from
Jan 12, 2022

Conversation

presztak
Copy link
Member

@presztak presztak commented Oct 27, 2021

This PR adds flag kube-binaries-mirror to minikube start command.

Usage:
minikube start --kube-binaries-mirror http://localhost:8000 --download-only

Output:

😄  minikube v1.24.0 on Ubuntu 20.04 (vbox/amd64)
🆕  Kubernetes 1.22.4 is now available. If you would like to upgrade, specify: --kubernetes-version=v1.22.4
✨  Using the docker driver based on existing profile
👍  Starting control plane node minikube in cluster minikube
🚜  Pulling base image ...
    > kubectl.sha256: 65 B / 65 B [--------------------------] 100.00% ? p/s 0s
    > kubectl: 44.73 MiB / 44.73 MiB [--------------------] 100.00% ? p/s 100ms
✅  Download complete!

Fixes #11935

@k8s-ci-robot k8s-ci-robot added 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. labels Oct 27, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @presztak. 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/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 27, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@medyagh
Copy link
Member

medyagh commented Nov 22, 2021

@presztak would you plz add in PR description the example using it with output ?

@@ -163,6 +163,10 @@ var settings = []Setting{
name: "native-ssh",
set: SetBool,
},
{
name: "kube-binaries-mirror",
Copy link
Member

Choose a reason for hiding this comment

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

I suggest putting this in cluster config struct instead of global config
So we can have multiple clusters with different mirrors and we could test in integration tests

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@presztak
Copy link
Member Author

@medyagh description was changed.

@@ -124,6 +124,7 @@ const (
listenAddress = "listen-address"
extraDisks = "extra-disks"
certExpiration = "cert-expiration"
kubeBinariesMirror = "kube-binaries-mirror"
Copy link
Member

Choose a reason for hiding this comment

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

I think this would be easier for users to find and use if it is called "binary-mirror"

what do u think ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds good, shorter name will be better

@presztak presztak force-pushed the kube_binaries_mirror branch 2 times, most recently from 86607ff to cc9abb2 Compare November 24, 2021 21:58
@sharifelgamal
Copy link
Collaborator

/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 Dec 7, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12804) |
+----------------+----------+---------------------+
| minikube start | 47.9s    | 48.1s               |
| enable ingress | 31.8s    | 32.2s               |
+----------------+----------+---------------------+

Times for minikube ingress: 31.8s 31.4s 32.3s 31.3s 32.3s
Times for minikube (PR 12804) ingress: 31.9s 32.4s 33.3s 31.9s 31.3s

Times for minikube start: 49.4s 47.8s 46.4s 47.6s 48.5s
Times for minikube (PR 12804) start: 47.6s 47.1s 48.5s 48.9s 48.3s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12804) |
+----------------+----------+---------------------+
| minikube start | 23.0s    | 23.6s               |
| enable ingress | 30.4s    | 29.8s               |
+----------------+----------+---------------------+

Times for minikube (PR 12804) start: 23.2s 24.3s 24.2s 23.6s 22.8s
Times for minikube start: 23.0s 23.4s 22.2s 23.5s 22.9s

Times for minikube ingress: 34.9s 27.5s 27.5s 27.0s 35.0s
Times for minikube (PR 12804) ingress: 35.5s 27.9s 31.0s 27.5s 27.0s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12804) |
+----------------+----------+---------------------+
| minikube start | 43.5s    | 42.6s               |
| enable ingress | 20.6s    | 32.2s               |
+----------------+----------+---------------------+

Times for minikube start: 47.3s 43.1s 42.3s 42.8s 41.9s
Times for minikube (PR 12804) start: 42.6s 42.7s 42.3s 43.1s 42.6s

Times for minikube ingress: 29.9s 19.0s 18.0s 18.0s 18.0s
Times for minikube (PR 12804) ingress: 28.5s 33.0s 33.0s 33.5s 33.0s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
KVM_Linux TestPause/serial/SecondStartNoReconfiguration (gopogh) 0.00 (chart)
KVM_Linux TestPause/serial/Start (gopogh) 0.00 (chart)
Docker_Linux TestStartStop/group/default-k8s-different-port/serial/AddonExistsAfterStop (gopogh) 0.65 (chart)
Docker_Linux TestStartStop/group/default-k8s-different-port/serial/SecondStart (gopogh) 0.65 (chart)
Docker_Linux TestStartStop/group/default-k8s-different-port/serial/UserAppExistsAfterStop (gopogh) 0.65 (chart)
Docker_Linux TestStartStop/group/default-k8s-different-port/serial/VerifyKubernetesImages (gopogh) 0.65 (chart)
Hyper-V_Windows TestStartStop/group/default-k8s-different-port/serial/Pause (gopogh) 0.79 (chart)
Hyper-V_Windows TestStartStop/group/no-preload/serial/Pause (gopogh) 1.59 (chart)
KVM_Linux TestNetworkPlugins/group/bridge/Start (gopogh) 1.67 (chart)
Docker_Linux TestStartStop/group/default-k8s-different-port/serial/Pause (gopogh) 2.60 (chart)
Docker_Windows TestNoKubernetes/serial/Start (gopogh) 4.26 (chart)
KVM_Linux_containerd TestPause/serial/SecondStartNoReconfiguration (gopogh) 4.35 (chart)
Hyper-V_Windows TestNetworkPlugins/group/cilium/Start (gopogh) 6.35 (chart)
Docker_Linux TestPause/serial/Pause (gopogh) 7.14 (chart)
Docker_Linux TestPause/serial/VerifyStatus (gopogh) 7.14 (chart)
KVM_Linux TestNoKubernetes/serial/StartWithStopK8s (gopogh) 11.11 (chart)
Docker_Windows TestNetworkPlugins/group/auto/DNS (gopogh) 11.22 (chart)
Hyper-V_Windows TestNetworkPlugins/group/enable-default-cni/Start (gopogh) 20.63 (chart)
Hyper-V_Windows TestNetworkPlugins/group/flannel/Start (gopogh) 27.78 (chart)
Hyper-V_Windows TestNetworkPlugins/group/bridge/Start (gopogh) 30.95 (chart)
Hyperkit_macOS TestFunctional/serial/ComponentHealth (gopogh) 31.62 (chart)
Docker_Windows TestNetworkPlugins/group/bridge/Start (gopogh) 32.00 (chart)
Docker_macOS TestStartStop/group/newest-cni/serial/SecondStart (gopogh) 35.06 (chart)
Docker_macOS TestFunctional/serial/ComponentHealth (gopogh) 37.96 (chart)
Docker_macOS TestFunctional/serial/ExtraConfig (gopogh) 37.96 (chart)
Hyper-V_Windows TestNetworkPlugins/group/kubenet/Start (gopogh) 41.27 (chart)
Docker_Windows TestNetworkPlugins/group/kubenet/DNS (gopogh) 42.11 (chart)
Docker_Windows TestNetworkPlugins/group/custom-weave/Start (gopogh) 66.00 (chart)
Docker_Windows TestNetworkPlugins/group/calico/Start (gopogh) 75.00 (chart)
Docker_Windows TestNoKubernetes/serial/StartWithStopK8s (gopogh) 87.50 (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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 11, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Dec 11, 2021
@k8s-ci-robot k8s-ci-robot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jan 12, 2022
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jan 12, 2022
@presztak
Copy link
Member Author

@medyagh I added integration test as you requested on slack. I tested this only on amd64 architecture.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12804) |
+----------------+----------+---------------------+
| minikube start | 44.9s    | 43.7s               |
| enable ingress | 28.1s    | 29.5s               |
+----------------+----------+---------------------+

Times for minikube start: 46.4s 45.5s 44.5s 44.2s 43.7s
Times for minikube (PR 12804) start: 44.1s 43.6s 43.7s 44.0s 43.1s

Times for minikube ingress: 26.6s 28.6s 26.6s 29.6s 29.1s
Times for minikube (PR 12804) ingress: 29.0s 29.0s 29.6s 30.6s 29.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12804) |
+----------------+----------+---------------------+
| minikube start | 26.5s    | 26.5s               |
| enable ingress | 22.5s    | 22.4s               |
+----------------+----------+---------------------+

Times for minikube start: 26.8s 27.0s 26.6s 26.6s 25.5s
Times for minikube (PR 12804) start: 26.2s 27.0s 26.5s 27.1s 25.8s

Times for minikube ingress: 21.9s 23.9s 21.9s 22.9s 21.9s
Times for minikube (PR 12804) ingress: 22.9s 21.9s 21.9s 23.4s 21.9s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 12804) |
+----------------+----------+---------------------+
| minikube start | 40.6s    | 42.0s               |
| enable ingress | 25.5s    | 22.6s               |
+----------------+----------+---------------------+

Times for minikube start: 34.5s 44.8s 41.6s 41.2s 40.6s
Times for minikube (PR 12804) start: 45.0s 41.7s 41.1s 41.1s 41.3s

Times for minikube ingress: 18.9s 28.9s 33.5s 22.9s 23.4s
Times for minikube (PR 12804) ingress: 19.9s 22.9s 23.4s 23.4s 23.4s

@medyagh medyagh changed the title Ability to set a mirror for downloading kubectl, kubelet, & kubeadm New flag "--binary-mirror" to override mirror URL downloading (kubectl, kubelet, & kubeadm) Jan 12, 2022
@medyagh medyagh merged commit 8162162 into kubernetes:master Jan 12, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, presztak

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2022
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/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.

Ability to set a mirror for downloading kubectl, kubelet, & kubeadm
6 participants