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: added configure option to registry-aliases addon #13912

Merged
merged 1 commit into from
May 16, 2022

Conversation

kadern0
Copy link
Contributor

@kadern0 kadern0 commented Apr 4, 2022

Fixes #12643

Demo:

$   ./out/minikube ssh -- cat /etc/hosts
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
192.168.49.2	minikube
192.168.49.1	host.minikube.internal
192.168.49.2	control-plane.minikube.internal

$ ./out/minikube addons enable registry
    ▪ Using image registry:2.7.1
    ▪ Using image gcr.io/google_containers/kube-registry-proxy:0.4
🔎  Verifying registry addon...
🌟  The 'registry' addon is enabled

$   ./out/minikube ssh -- cat /etc/hosts
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
192.168.49.2	minikube
192.168.49.1	host.minikube.internal
192.168.49.2	control-plane.minikube.internal

$ ./out/minikube addons configure registry-aliases
-- Enter registry aliases separated by space: github.com gitlab.com
    ▪ Using image quay.io/rhdevelopers/core-dns-patcher
    ▪ Using image alpine:3.11
    ▪ Using image gcr.io/google_containers/pause:3.1
✅  registry-aliases was successfully configured

$ kubectl -n kube-system get pods
NAME                                    READY   STATUS              RESTARTS       AGE
coredns-64897985d-vnwc6                 1/1     Running             0              4m11s
etcd-minikube                           1/1     Running             0              4m23s
kube-apiserver-minikube                 1/1     Running             0              4m23s
kube-controller-manager-minikube        1/1     Running             0              4m23s
kube-proxy-8knnv                        1/1     Running             0              4m11s
kube-scheduler-minikube                 1/1     Running             0              4m23s
registry-aliases-hosts-update-p9xd2     0/1     Init:0/1            0              7s
registry-aliases-patch-core-dns-f7qjp   0/1     ContainerCreating   0              7s
registry-g9v6x                          1/1     Running             0              3m43s
registry-proxy-tsmcr                    1/1     Running             0              3m43s
storage-provisioner                     1/1     Running             2 (4m8s ago)   4m21s

$   ./out/minikube ssh -- cat /etc/hosts
127.0.0.1	localhost
::1	localhost ip6-localhost ip6-loopback
fe00::0	ip6-localnet
ff00::0	ip6-mcastprefix
ff02::1	ip6-allnodes
ff02::2	ip6-allrouters
192.168.49.2	minikube
192.168.49.1	host.minikube.internal
192.168.49.2	control-plane.minikube.internal
10.106.31.109	github.com
10.106.31.109	gitlab.com
10.106.31.109	registry.minikube

Validation

$ ./out/minikube addons configure registry-aliases
-- Enter registry aliases separated by space: adsfasfasdfasdfasdfadsfsadf sadfasdfadsfasdfasdf
--Invalid input, please enter a value:-- Enter registry aliases separated by space: sdfasdfasdf asdfa sdfasd fasdfasdfasdf
--Invalid input, please enter a value:-- Enter registry aliases separated by space: ^C

Enhancements:

  • Documentation/User guides should be updated
  • The daemonset used to update the /etc/hosts file only performs the update once which doesn't seem ideal.
  • The validation regexp could be improved/simplified if desired.

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

Hi @kadern0. 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 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. labels Apr 4, 2022
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Signed-off-by: Pablo Caderno <kaderno@gmail.com>
@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 Apr 12, 2022
@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 Apr 13, 2022
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13912) |
+----------------+----------+---------------------+
| minikube start | 52.5s    | 51.4s               |
| enable ingress | 28.9s    | 29.0s               |
+----------------+----------+---------------------+

Times for minikube start: 53.4s 54.7s 51.9s 50.8s 51.5s
Times for minikube (PR 13912) start: 52.0s 50.8s 52.0s 51.0s 51.0s

Times for minikube ingress: 30.1s 29.1s 26.5s 28.5s 30.6s
Times for minikube (PR 13912) ingress: 29.6s 29.6s 29.1s 30.6s 26.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13912) |
+----------------+----------+---------------------+
| minikube start | 26.1s    | 24.8s               |
| enable ingress | 22.9s    | 22.8s               |
+----------------+----------+---------------------+

Times for minikube ingress: 22.4s 21.9s 24.4s 22.9s 23.0s
Times for minikube (PR 13912) ingress: 22.9s 22.4s 23.0s 22.9s 22.9s

Times for minikube (PR 13912) start: 24.9s 24.1s 24.1s 26.0s 24.9s
Times for minikube start: 29.6s 26.6s 25.4s 24.0s 25.1s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 13912) |
+----------------+----------+---------------------+
| minikube start | 38.2s    | 41.6s               |
| enable ingress | 25.4s    | 22.5s               |
+----------------+----------+---------------------+

Times for minikube start: 28.8s 39.9s 43.4s 39.5s 39.3s
Times for minikube (PR 13912) start: 44.2s 39.1s 40.0s 40.0s 44.4s

Times for minikube ingress: 32.4s 22.4s 18.4s 21.9s 32.0s
Times for minikube (PR 13912) ingress: 28.4s 21.9s 22.4s 21.9s 17.9s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Hyperkit_macOS TestStartStop/group/no-preload/serial/SecondStart (gopogh) 0.00 (chart)
KVM_Linux TestFunctional/parallel/MountCmd/specific-port (gopogh) 0.58 (chart)
Docker_Linux TestKubernetesUpgrade (gopogh) 6.45 (chart)
Docker_Windows TestKubernetesUpgrade (gopogh) 29.73 (chart)
Docker_macOS TestStartStop/group/newest-cni/serial/FirstStart (gopogh) 37.66 (chart)
Docker_Linux TestNetworkPlugins/group/false/DNS (gopogh) 52.26 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/kindnet/Start (gopogh) 54.76 (chart)
Hyper-V_Windows TestNoKubernetes/serial/StartWithK8s (gopogh) 56.16 (chart)
Docker_macOS TestNetworkPlugins/group/kindnet/Start (gopogh) 57.46 (chart)
Docker_macOS TestNetworkPlugins/group/kubenet/DNS (gopogh) 59.42 (chart)
Docker_macOS TestNetworkPlugins/group/calico/Start (gopogh) 61.19 (chart)
Docker_Linux TestNetworkPlugins/group/custom-weave/Start (gopogh) 61.94 (chart)
Docker_macOS TestNetworkPlugins/group/bridge/DNS (gopogh) 70.21 (chart)
Docker_Linux TestNetworkPlugins/group/kindnet/DNS (gopogh) 70.83 (chart)
Docker_macOS TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 74.31 (chart)
Docker_Linux TestNetworkPlugins/group/calico/Start (gopogh) 78.71 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/calico/Start (gopogh) 80.16 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 82.44 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/bridge/DNS (gopogh) 83.21 (chart)
Docker_Linux TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 85.81 (chart)
Docker_Windows TestNoKubernetes/serial/Start (gopogh) 86.41 (chart)
Docker_Linux TestNetworkPlugins/group/bridge/DNS (gopogh) 86.45 (chart)
Docker_Linux TestNetworkPlugins/group/kubenet/DNS (gopogh) 87.74 (chart)
Docker_Windows TestFunctional/parallel/TunnelCmd/serial/WaitService/IngressIP (gopogh) 99.33 (chart)
Docker_macOS TestDownloadOnly/v1.16.0/preload-exists (gopogh) 99.36 (chart)
Docker_Windows TestFunctional/parallel/ServiceCmd (gopogh) 100.00 (chart)
Docker_Windows TestNetworkPlugins/group/cilium/Start (gopogh) 100.00 (chart)
Docker_Windows TestSkaffold (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/PingHostFrom2Pods (gopogh) 100.00 (chart)
Hyper-V_Windows TestMultiNode/serial/RestartKeepsNodes (gopogh) 100.00 (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.

@sharifelgamal sharifelgamal merged commit 7292031 into kubernetes:master May 16, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: kadern0, sharifelgamal

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 May 16, 2022
@sharifelgamal sharifelgamal changed the title feat: added configure option to registry-alieases addon feat: added configure option to registry-aliases addon May 16, 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/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.

registry-aliases add-on needs a configure option
5 participants