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

calico: support kubeadm.pod-network-cidr #18233

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

lollipopman
Copy link
Contributor

Prior to this commit the Calico CNI ignored the setting of kubeadm.pod-network-cidr, because we set CALICO_IPV4POOL_CIDR to the DefaultPodCIDR. However, this is no longer necessary as Calico's pod cidr will be set to the default when we initialize kubeadm in pkg/minikube/bootstrapper/bsutil/kubeadm.go.

@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 Feb 22, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @lollipopman. 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/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 22, 2024
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@medyagh
Copy link
Member

medyagh commented Feb 22, 2024

@lollipopman thank you for this PR, can you please provide a before/after this PR with minikube output with an example?

@medyagh
Copy link
Member

medyagh commented Feb 22, 2024

/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 Feb 22, 2024
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@medyagh
Copy link
Member

medyagh commented Mar 12, 2024

@lollipopman can you plz take a look at the unit tests ? and also could you plz put an output of Before / After this PR of using this new feature using minikube in action?

@lollipopman
Copy link
Contributor Author

lollipopman commented Mar 21, 2024

log files are attached, as well as the calico-node config, note how after the patch, CALICO_IPV4POOL_CIDR is removed:

-    - name: CALICO_IPV4POOL_CIDR
-      value: 10.244.0.0/16

The busybox container output shows that after the patch the pod gets the correct ip:

-3: eth0@if10: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1480 qdisc noqueue qlen 1000
-    link/ether 22:ce:10:48:b5:36 brd ff:ff:ff:ff:ff:ff
-    inet 10.244.120.67/32 scope global eth0
+3: eth0@if9: <BROADCAST,MULTICAST,UP,LOWER_UP,M-DOWN> mtu 1480 qdisc noqueue qlen 1000
+    link/ether 4e:4e:31:e7:3f:ec brd ff:ff:ff:ff:ff:ff
+    inet 10.64.120.67/32 scope global eth0

Also, I was unable to reproduce the unit test failures, perhaps a testing fluke?

logs-3e67840d02a296d807adca10af96b93dacfc918d.txt
logs-843733f3a54d29526ff29dae2be6fd1435082ac0.txt
calico-node-3e67840d02a296d807adca10af96b93dacfc918d.yaml.txt
calico-node-843733f3a54d29526ff29dae2be6fd1435082ac0.yaml.txt
busybox-ip-addr-3e67840d02a296d807adca10af96b93dacfc918d.txt
busybox-ip-addr-843733f3a54d29526ff29dae2be6fd1435082ac0.txt

@medyagh
Copy link
Member

medyagh commented Mar 27, 2024

thanks @lollipopman do you mind pull upstream to your PR, the unit test is fixed, but there are failed test on Docker Linux that I would like to see if it goes away
https://storage.googleapis.com/minikube-builds/logs/18233/33262/Docker_Linux.html

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.

after the test are ok we could merge

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 27, 2024
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

Prior to this commit the Calico CNI ignored the setting of
kubeadm.pod-network-cidr, because we set CALICO_IPV4POOL_CIDR to the
DefaultPodCIDR. However, this is no longer necessary as Calico's pod
cidr will be set to the default when we initialize kubeadm in
pkg/minikube/bootstrapper/bsutil/kubeadm.go.
@lollipopman
Copy link
Contributor Author

@prezha & @spowelljr can you take a look at this pull request when you have a moment?

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18233) |
+----------------+----------+---------------------+
| minikube start | 51.5s    | 53.1s               |
| enable ingress | 26.3s    | 24.8s               |
+----------------+----------+---------------------+

Times for minikube start: 52.1s 51.1s 50.2s 52.2s 51.8s
Times for minikube (PR 18233) start: 55.1s 53.4s 51.5s 52.2s 53.4s

Times for minikube ingress: 26.5s 24.5s 26.5s 27.1s 27.0s
Times for minikube (PR 18233) ingress: 23.1s 23.6s 25.6s 24.5s 27.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18233) |
+----------------+----------+---------------------+
| minikube start | 22.8s    | 22.4s               |
| enable ingress | 21.4s    | 21.1s               |
+----------------+----------+---------------------+

Times for minikube start: 24.6s 20.9s 23.3s 22.1s 23.3s
Times for minikube (PR 18233) start: 23.3s 24.3s 20.0s 24.1s 20.5s

Times for minikube ingress: 21.2s 21.2s 21.2s 21.2s 22.2s
Times for minikube (PR 18233) ingress: 21.7s 20.7s 21.2s 21.2s 20.7s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 18233) |
+----------------+----------+---------------------+
| minikube start | 21.3s    | 21.5s               |
| enable ingress | 34.7s    | 31.9s               |
+----------------+----------+---------------------+

Times for minikube ingress: 31.7s 31.7s 31.7s 47.7s 30.7s
Times for minikube (PR 18233) ingress: 32.7s 31.7s 31.7s 31.7s 31.7s

Times for minikube start: 22.0s 19.6s 22.4s 22.4s 20.2s
Times for minikube (PR 18233) start: 22.3s 22.1s 19.0s 22.2s 22.0s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Docker_Windows TestDownloadOnly/v1.30.0-rc.0/json-events (gopogh) n/a
Docker_Windows TestDownloadOnly/v1.30.0-rc.0/kubectl (gopogh) n/a
Docker_Windows TestDownloadOnly/v1.30.0-rc.0/preload-exists (gopogh) n/a
Docker_Linux_crio TestFunctional/parallel/ImageCommands/ImageLoadFromFile (gopogh) 1.20 (chart)
KVM_Linux_crio TestAddons/parallel/CloudSpanner (gopogh) 1.20 (chart)
KVM_Linux_crio TestFunctional/parallel/ImageCommands/ImageBuild (gopogh) 1.81 (chart)

To see the flake rates of all tests by environment, click here.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: lollipopman, medyagh, spowelljr

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

@spowelljr spowelljr merged commit c46252f into kubernetes:master Apr 5, 2024
24 of 38 checks passed
@lollipopman
Copy link
Contributor Author

woohoo, thanks!

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/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants