kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.24k stars 4.87k forks source link

add calico api server to calico cni plugin #19648

Open ComradeProgrammer opened 1 week ago

ComradeProgrammer commented 1 week ago

feat:add calico api server to calico cni plugin FIX #19285

this pr was implememted according to https://docs.tigera.io/calico/3.26/operations/install-apiserver (Manifest Install)

Before:

$./out/minikube start --cni calico      
$kubectl api-resources | grep 'projectcalico.org'
(The result is empty)

After:

$./out/minikube start --cni calico      
# proving the api server is running
$ kubectl get pods -n calico-apiserver    
NAME                               READY   STATUS    RESTARTS      AGE
calico-apiserver-cb6754675-c4tlc   1/1     Running   1 (17s ago)   26s
$kubectl api-resources | grep 'projectcalico.org'
 kubectl api-resources | grep 'projectcalico.org'
bgpconfigurations                                crd.projectcalico.org/v1          false        BGPConfiguration
bgpfilters                                       crd.projectcalico.org/v1          false        BGPFilter
bgppeers                                         crd.projectcalico.org/v1          false        BGPPeer
blockaffinities                                  crd.projectcalico.org/v1          false        BlockAffinity
caliconodestatuses                               crd.projectcalico.org/v1          false        CalicoNodeStatus
clusterinformations                              crd.projectcalico.org/v1          false        ClusterInformation
felixconfigurations                              crd.projectcalico.org/v1          false        FelixConfiguration
globalnetworkpolicies                            crd.projectcalico.org/v1          false        GlobalNetworkPolicy
globalnetworksets                                crd.projectcalico.org/v1          false        GlobalNetworkSet
hostendpoints                                    crd.projectcalico.org/v1          false        HostEndpoint
ipamblocks                                       crd.projectcalico.org/v1          false        IPAMBlock
ipamconfigs                                      crd.projectcalico.org/v1          false        IPAMConfig
ipamhandles                                      crd.projectcalico.org/v1          false        IPAMHandle
ippools                                          crd.projectcalico.org/v1          false        IPPool
ipreservations                                   crd.projectcalico.org/v1          false        IPReservation
kubecontrollersconfigurations                    crd.projectcalico.org/v1          false        KubeControllersConfiguration
networkpolicies                                  crd.projectcalico.org/v1          true         NetworkPolicy
networksets                                      crd.projectcalico.org/v1          true         NetworkSet
k8s-ci-robot commented 1 week ago

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ComradeProgrammer Once this PR has been reviewed and has the lgtm label, please assign medyagh for approval. For more information see the Kubernetes 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: - **[OWNERS](https://github.com/kubernetes/minikube/blob/master/OWNERS)** Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
ComradeProgrammer commented 1 week ago

/ok-to-test

minikube-pr-bot commented 1 week ago

kvm2 driver with docker runtime

+-------------------+----------+---------------------+
|      COMMAND      | MINIKUBE | MINIKUBE (PR 19648) |
+-------------------+----------+---------------------+
| ⚠️  minikube start | 46.3s    | 68.5s ⚠️             |
| enable ingress    | 14.9s    | 14.9s               |
+-------------------+----------+---------------------+
Times for minikube (PR 19648) start: 45.4s 158.4s 44.1s 47.5s 47.2s Times for minikube start: 44.8s 45.8s 47.1s 44.0s 50.0s Times for minikube ingress: 14.4s 14.9s 14.9s 15.4s 14.9s Times for minikube (PR 19648) ingress: 14.8s 14.8s 14.9s 14.9s 14.9s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 22.3s    | 20.6s               |
| enable ingress | 12.0s    | 12.1s               |
+----------------+----------+---------------------+
Times for minikube ingress: 13.7s 10.3s 12.7s 12.7s 10.7s Times for minikube (PR 19648) ingress: 12.8s 12.7s 11.3s 12.2s 11.7s Times for minikube start: 23.2s 23.0s 20.3s 24.0s 20.8s Times for minikube (PR 19648) start: 21.0s 19.3s 19.5s 22.8s 20.6s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 21.3s    | 20.5s               |
| enable ingress | 23.1s    | 24.8s               |
+----------------+----------+---------------------+
Times for minikube start: 22.4s 23.1s 21.7s 19.4s 20.0s Times for minikube (PR 19648) start: 21.4s 19.3s 21.5s 20.8s 19.6s Times for minikube ingress: 22.7s 23.2s 23.2s 23.2s 23.2s Times for minikube (PR 19648) ingress: 23.2s 23.2s 31.2s 23.2s 23.2s
minikube-pr-bot commented 1 week ago

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
KVM_Linux (2 failed) TestFunctional/parallel/MountCmd/specific-port(gopogh) 1.28% (chart)
Docker_Linux_crio (4 failed) TestStartStop/group/old-k8s-version/serial/SecondStart(gopogh) 0.63% (chart)

Besides the following environments also have failed tests:

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

minikube-pr-bot commented 1 week ago

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 52.8s    | 53.5s               |
| enable ingress | 16.2s    | 16.2s               |
+----------------+----------+---------------------+
Times for minikube start: 53.1s 52.7s 53.0s 53.1s 52.4s Times for minikube (PR 19648) start: 55.2s 54.4s 52.8s 53.9s 51.2s Times for minikube ingress: 15.6s 16.7s 16.7s 16.1s 15.6s Times for minikube (PR 19648) ingress: 16.2s 16.1s 16.3s 16.2s 16.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 24.6s    | 24.5s               |
| enable ingress | 12.1s    | 12.8s               |
+----------------+----------+---------------------+
Times for minikube start: 24.7s 24.4s 24.9s 22.6s 26.3s Times for minikube (PR 19648) start: 24.6s 24.9s 22.2s 25.9s 25.1s Times for minikube ingress: 12.4s 12.4s 10.3s 12.3s 13.0s Times for minikube (PR 19648) ingress: 12.9s 12.9s 12.9s 12.9s 12.4s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 23.6s    | 22.1s               |
| enable ingress | 26.3s    | 31.3s               |
+----------------+----------+---------------------+
Times for minikube start: 24.2s 24.0s 23.1s 24.1s 22.7s Times for minikube (PR 19648) start: 24.1s 20.1s 23.9s 20.9s 21.6s Times for minikube ingress: 39.8s 22.8s 22.9s 22.8s 22.8s Times for minikube (PR 19648) ingress: 26.9s 23.9s 38.9s 38.9s 27.9s
minikube-pr-bot commented 1 week ago

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
Docker_Linux_crio_arm64 (4 failed) TestMultiControlPlane/serial/DeleteSecondaryNode(gopogh) 8.33% (chart)
Docker_Linux_containerd_arm64 (7 failed) TestStartStop/group/newest-cni/serial/Stop(gopogh) 0.00% (chart)
Docker_Linux_containerd_arm64 (7 failed) TestStartStop/group/newest-cni/serial/EnableAddonAfterStop(gopogh) 0.00% (chart)
Docker_Linux_containerd_arm64 (7 failed) TestStartStop/group/newest-cni/serial/SecondStart(gopogh) 0.00% (chart)
Docker_Linux_containerd_arm64 (7 failed) TestStartStop/group/newest-cni/serial/VerifyKubernetesImages(gopogh) 0.00% (chart)
Docker_Linux_containerd_arm64 (7 failed) TestStartStop/group/newest-cni/serial/Pause(gopogh) 0.00% (chart)
Docker_Linux_containerd_arm64 (7 failed) TestStartStop/group/old-k8s-version/serial/SecondStart(gopogh) 49.36% (chart)

Besides the following environments also have failed tests:

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

medyagh commented 1 week ago

@ComradeProgrammer can u plz fix the lint

minikube-pr-bot commented 6 days ago

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 48.4s    | 48.9s               |
| enable ingress | 15.1s    | 15.0s               |
+----------------+----------+---------------------+
Times for minikube ingress: 14.5s 15.0s 15.5s 14.5s 16.0s Times for minikube (PR 19648) ingress: 15.0s 15.0s 14.5s 16.0s 14.5s Times for minikube start: 49.2s 46.4s 50.2s 46.8s 49.6s Times for minikube (PR 19648) start: 48.2s 47.5s 49.3s 50.2s 49.4s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 22.5s    | 22.1s               |
| enable ingress | 13.1s    | 11.9s               |
+----------------+----------+---------------------+
Times for minikube start: 20.7s 22.1s 24.4s 21.3s 24.1s Times for minikube (PR 19648) start: 20.5s 20.7s 20.9s 24.2s 24.3s Times for minikube ingress: 13.8s 12.8s 12.8s 12.8s 13.3s Times for minikube (PR 19648) ingress: 13.3s 10.3s 11.8s 13.3s 10.8s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19648) |
+----------------+----------+---------------------+
| minikube start | 21.1s    | 21.8s               |
| enable ingress | 25.0s    | 29.9s               |
+----------------+----------+---------------------+
Times for minikube start: 22.6s 20.4s 22.6s 19.7s 20.1s Times for minikube (PR 19648) start: 19.3s 23.6s 23.0s 19.8s 23.4s Times for minikube ingress: 22.8s 24.3s 30.3s 23.8s 23.8s Times for minikube (PR 19648) ingress: 22.8s 23.8s 23.8s 38.8s 40.3s
minikube-pr-bot commented 6 days ago

Here are the number of top 10 failed tests in each environments with lowest flake rate.

Environment Test Name Flake Rate
Docker_Linux_crio_arm64 (4 failed) TestStartStop/group/old-k8s-version/serial/SecondStart(gopogh) 5.33% (chart)

Besides the following environments also have failed tests:

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