kubernetes / minikube

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

addons: Use configmap for inspektor-gadget #19712

Closed mqasimsarfraz closed 18 hours ago

mqasimsarfraz commented 1 day ago

Use configmap for inspektor-gadget addon.

fixes: https://github.com/kubernetes/minikube/issues/19710

Testing Done

Before

$ go run ./cmd/minikube/ start --addons=inspektor-gadget
...
🌟  Enabled addons: default-storageclass, inspektor-gadget

❗  /usr/local/bin/kubectl is version 1.26.3, which may have incompatibilities with Kubernetes 1.31.1.
    ▪ Want kubectl v1.31.1? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
$ kubectl get pods -n gadget
NAME           READY   STATUS             RESTARTS     AGE
gadget-dnkdd   0/1     CrashLoopBackOff   4 (3s ago)   112s

After

$ go run ./cmd/minikube/ start --addons=inspektor-gadget
...
🌟  Enabled addons: default-storageclass, inspektor-gadget

❗  /usr/local/bin/kubectl is version 1.26.3, which may have incompatibilities with Kubernetes 1.31.1.
    ▪ Want kubectl v1.31.1? Try 'minikube kubectl -- get pods -A'
🏄  Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
$ kubectl get pods -n gadget
NAME           READY   STATUS    RESTARTS   AGE
gadget-jfkrb   1/1     Running   0          2m24s

cc: @eiffel-fl

k8s-ci-robot commented 1 day ago

Hi @mqasimsarfraz. 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](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
minikube-bot commented 1 day ago

Can one of the admins verify this patch?

spowelljr commented 23 hours ago

Hi @eiffel-fl, for some other addons we pull YAMLs from the repo on updates, does https://github.com/inspektor-gadget/inspektor-gadget/blob/4bbe675d85cafd7fe532b9ca6773c231fac8149e/pkg/resources/manifests/deploy.yaml have everything needed? If so I can update the automation to update the images and the YAML when a new version is released.

spowelljr commented 22 hours ago

/ok-to-test

minikube-pr-bot commented 21 hours ago

kvm2 driver with docker runtime

+-------------------+----------+---------------------+
|      COMMAND      | MINIKUBE | MINIKUBE (PR 19712) |
+-------------------+----------+---------------------+
| minikube start    | 49.8s    | 51.6s               |
| ⚠️  enable ingress | 16.3s    | 27.6s ⚠️             |
+-------------------+----------+---------------------+
Times for minikube (PR 19712) start: 49.8s 54.2s 50.6s 49.7s 53.8s Times for minikube start: 48.4s 49.3s 49.1s 49.5s 52.6s Times for minikube ingress: 15.6s 17.6s 16.1s 17.1s 15.1s Times for minikube (PR 19712) ingress: 75.5s 15.5s 15.1s 15.6s 16.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19712) |
+----------------+----------+---------------------+
| minikube start | 22.1s    | 22.5s               |
| enable ingress | 12.4s    | 12.7s               |
+----------------+----------+---------------------+
Times for minikube start: 20.5s 20.8s 23.7s 24.2s 21.3s Times for minikube (PR 19712) start: 21.0s 23.5s 20.9s 22.6s 24.4s Times for minikube (PR 19712) ingress: 12.3s 12.3s 12.8s 13.3s 12.8s Times for minikube ingress: 12.8s 12.8s 12.3s 11.8s 12.3s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 19712) |
+----------------+----------+---------------------+
| minikube start | 21.2s    | 22.3s               |
| enable ingress | 22.8s    | 26.0s               |
+----------------+----------+---------------------+
Times for minikube start: 22.8s 22.6s 20.7s 19.9s 20.2s Times for minikube (PR 19712) start: 22.6s 22.2s 22.8s 23.5s 20.6s Times for minikube ingress: 22.8s 22.8s 22.8s 22.8s 22.8s Times for minikube (PR 19712) ingress: 38.8s 22.8s 22.8s 22.8s 22.8s
minikube-pr-bot commented 19 hours ago

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

Environment Test Name Flake Rate

Besides the following environments also have failed tests:

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

k8s-ci-robot commented 18 hours ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: mqasimsarfraz, 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: - ~~[OWNERS](https://github.com/kubernetes/minikube/blob/master/OWNERS)~~ [spowelljr] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
spowelljr commented 18 hours ago

Hi @eiffel-fl, for some other addons we pull YAMLs from the repo on updates, does https://github.com/inspektor-gadget/inspektor-gadget/blob/4bbe675d85cafd7fe532b9ca6773c231fac8149e/pkg/resources/manifests/deploy.yaml have everything needed? If so I can update the automation to update the images and the YAML when a new version is released.

It looks like that file has everything but the CRDs which are available here: https://github.com/inspektor-gadget/inspektor-gadget/blob/4bbe675d85cafd7fe532b9ca6773c231fac8149e/pkg/resources/crd/bases/gadget.kinvolk.io_traces.yaml

I'll make a PR shortly to automate updating the YAML files.

spowelljr commented 17 hours ago

Created https://github.com/kubernetes/minikube/pull/19717

mqasimsarfraz commented 17 hours ago

Hi @eiffel-fl, for some other addons we pull YAMLs from the repo on updates, does https://github.com/inspektor-gadget/inspektor-gadget/blob/4bbe675d85cafd7fe532b9ca6773c231fac8149e/pkg/resources/manifests/deploy.yaml have everything needed? If so I can update the automation to update the images and the YAML when a new version is released.

It looks like that file has everything but the CRDs which are available here: https://github.com/inspektor-gadget/inspektor-gadget/blob/4bbe675d85cafd7fe532b9ca6773c231fac8149e/pkg/resources/crd/bases/gadget.kinvolk.io_traces.yaml

I'll make a PR shortly to automate updating the YAML files.

We also publish a manifest for each release, I wonder if that can be helpful: https://github.com/inspektor-gadget/inspektor-gadget/releases/download/v0.32.0/inspektor-gadget-v0.32.0.yaml

spowelljr commented 17 hours ago

That seems to be identical to https://github.com/inspektor-gadget/inspektor-gadget/blob/4bbe675d85cafd7fe532b9ca6773c231fac8149e/pkg/resources/manifests/deploy.yaml, but yes, that was basically what I was looking for, thanks