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

Persist custom addon image/registry settings. #11432

Merged
merged 7 commits into from
May 20, 2021

Conversation

andriyDev
Copy link
Contributor

fixes #10877.

Before:

$ minikube start -p addon
πŸ˜„  [addon] minikube v1.20.0 on Debian rodete
✨  Automatically selected the docker driver. Other choices: kvm2, ssh
πŸ‘  Starting control plane node addon in cluster addon
🚜  Pulling base image ...
πŸ”₯  Creating docker container (CPUs=2, Memory=3900MB) ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
    β–ͺ Generating certificates and keys ...
    β–ͺ Booting up control plane ...
    β–ͺ Configuring RBAC rules ...
πŸ”Ž  Verifying Kubernetes components...
    β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
πŸ„  Done! kubectl is now configured to use "addon" cluster and "default" namespace by default
$ minikube -p addon addons enable dashboard --images="Dashboard=k8s.gcr.io/echoserver:1.4"
    β–ͺ Using image k8s.gcr.io/echoserver:1.4
    β–ͺ Using image kubernetesui/metrics-scraper:v1.0.4
πŸ’‘  Some dashboard features require the metrics-server addon. To enable all features please run:

	minikube -p addon addons enable metrics-server	


🌟  The 'dashboard' addon is enabled
$ minikube stop -p addon
βœ‹  Stopping node "addon"  ...
πŸ›‘  Powering off "addon" via SSH ...
πŸ›‘  1 nodes stopped.
$ minikube start -p addon
πŸ˜„  [addon] minikube v1.20.0 on Debian rodete
✨  Using the docker driver based on existing profile
πŸ‘  Starting control plane node addon in cluster addon
🚜  Pulling base image ...
πŸ”„  Restarting existing docker container for "addon" ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
πŸ”Ž  Verifying Kubernetes components...
    β–ͺ Using image kubernetesui/dashboard:v2.1.0
    β–ͺ Using image kubernetesui/metrics-scraper:v1.0.4
    β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass, dashboard
πŸ„  Done! kubectl is now configured to use "addon" cluster and "default" namespace by default

After:

$ minikube start -p addon
πŸ˜„  [addon] minikube v1.20.0 on Debian rodete
✨  Automatically selected the docker driver. Other choices: kvm2, ssh
πŸ‘  Starting control plane node addon in cluster addon
🚜  Pulling base image ...
πŸ”₯  Creating docker container (CPUs=2, Memory=3900MB) ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
    β–ͺ Generating certificates and keys ...
    β–ͺ Booting up control plane ...
    β–ͺ Configuring RBAC rules ...
πŸ”Ž  Verifying Kubernetes components...
    β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass
πŸ„  Done! kubectl is now configured to use "addon" cluster and "default" namespace by default
$ minikube -p addon addons enable dashboard --images="Dashboard=k8s.gcr.io/echoserver:1.4"
    β–ͺ Using image k8s.gcr.io/echoserver:1.4
    β–ͺ Using image kubernetesui/metrics-scraper:v1.0.4
πŸ’‘  Some dashboard features require the metrics-server addon. To enable all features please run:

	minikube -p addon addons enable metrics-server	


🌟  The 'dashboard' addon is enabled
$ minikube stop -p addon
βœ‹  Stopping node "addon"  ...
πŸ›‘  Powering off "addon" via SSH ...
πŸ›‘  1 nodes stopped.
$ minikube start -p addon
πŸ˜„  [addon] minikube v1.20.0 on Debian rodete
✨  Using the docker driver based on existing profile
πŸ‘  Starting control plane node addon in cluster addon
🚜  Pulling base image ...
πŸ”„  Restarting existing docker container for "addon" ...
🐳  Preparing Kubernetes v1.20.2 on Docker 20.10.6 ...
πŸ”Ž  Verifying Kubernetes components...
    β–ͺ Using image k8s.gcr.io/echoserver:1.4
    β–ͺ Using image kubernetesui/metrics-scraper:v1.0.4
    β–ͺ Using image gcr.io/k8s-minikube/storage-provisioner:v5
🌟  Enabled addons: storage-provisioner, default-storageclass, dashboard
πŸ„  Done! kubectl is now configured to use "addon" cluster and "default" namespace by default

Note: Difference occurs under "Verifying Kubernetes components" on the second start. This PR also handles the case of enabling the addon with custom images prior to starting.

@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 May 17, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @andriyDev. 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
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: andriyDev
To complete the pull request process, please assign tstromberg after the PR has been reviewed.
You can assign the PR to them by writing /assign @tstromberg in a comment when ready.

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

@andriyDev andriyDev changed the title Persist custom addon image settings. Persist custom addon image/registry settings. May 17, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 17, 2021
@andriyDev
Copy link
Contributor Author

Forgot to rebase onto master first!

@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

test/integration/addons_test.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 18, 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 May 18, 2021
@andriyDev andriyDev requested a review from medyagh May 19, 2021 16:43
@andriyDev andriyDev requested a review from medyagh May 19, 2021 22:27
@medyagh
Copy link
Member

medyagh commented May 19, 2021

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

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11432) |
+----------------+----------+---------------------+
| minikube start | 47.6s    | 48.1s               |
| enable ingress | 36.0s    | 37.9s               |
+----------------+----------+---------------------+

Times for minikube start: 50.2s 46.9s 47.7s 46.0s 46.9s
Times for minikube (PR 11432) start: 46.8s 49.1s 47.4s 46.7s 50.7s

Times for minikube ingress: 35.3s 34.2s 34.8s 42.2s 33.7s
Times for minikube (PR 11432) ingress: 36.3s 34.7s 41.8s 34.8s 41.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11432) |
+----------------+----------+---------------------+
| minikube start | 21.8s    | 21.8s               |
| enable ingress | 36.4s    | 33.9s               |
+----------------+----------+---------------------+

Times for minikube start: 22.9s 21.6s 21.7s 21.4s 21.3s
Times for minikube (PR 11432) start: 21.9s 21.8s 22.0s 22.0s 21.3s

Times for minikube ingress: 34.5s 35.0s 38.5s 35.0s 39.0s
Times for minikube (PR 11432) ingress: 35.0s 34.5s 34.0s 33.0s 33.0s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11432) |
+----------------+----------+---------------------+
| minikube start | 43.2s    | 46.2s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 30.3s 47.1s 43.4s 47.8s 47.4s
Times for minikube (PR 11432) start: 47.8s 43.6s 47.1s 43.5s 48.9s

@medyagh medyagh merged commit 316f5ea into kubernetes:master May 20, 2021
@andriyDev andriyDev deleted the CustomAddonImages branch May 24, 2021 16:58
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. 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.

custom addon images get ignored on minikube restart
5 participants