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

addons: Use configmap for inspektor-gadget #19712

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

mqasimsarfraz
Copy link
Contributor

Use configmap for inspektor-gadget addon.

fixes: #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 k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Sep 27, 2024
@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 27, 2024
@k8s-ci-robot
Copy link
Contributor

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. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 27, 2024
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

Copy link
Contributor

@eiffel-fl eiffel-fl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!

I tested it and it works fine:

$ go run ./cmd/minikube/ start --addons=inspektor-gadget                                                                                                            (remotes/qasim/qasim/ig-configmap) %
πŸ˜„  minikube v0.0.0-unset sur Ubuntu 22.04
✨  Choix automatique du pilote docker. Autres choix: kvm2, qemu2, ssh
πŸ“Œ  Utilisation du pilote Docker avec le privilΓ¨ge root
πŸ‘  DΓ©marrage du nΕ“ud "minikube" primary control-plane dans le cluster "minikube"
🚜  Extraction de l'image de base v0.0.45-1727108449-19696...
πŸ’Ύ  TΓ©lΓ©chargement du prΓ©chargement de Kubernetes v1.31.1...
    > preloaded-images-k8s-v18-v1...:  326.18 MiB / 326.18 MiB  100.00% 28.88 M
    > gcr.io/k8s-minikube/kicbase...:  490.00 MiB / 490.00 MiB  100.00% 9.07 Mi
πŸ”₯  CrΓ©ation de docker container (CPU=2, Memory=7900Mo) ...
...
🌟  Modules activés: default-storageclass, inspektor-gadget
πŸ’‘  kubectl introuvable. Si vous en avez besoin, essayez : 'minikube kubectl -- get pods -A'
πŸ„  TerminΓ© ! kubectl est maintenant configurΓ© pour utiliser "minikube" cluster et espace de noms "default" par dΓ©faut.
$ ../kubectl get pod -n gadget                                                                                                                                      (remotes/qasim/qasim/ig-configmap) %
NAME           READY   STATUS    RESTARTS   AGE
gadget-mskt7   1/1     Running   0          2m37s

@spowelljr This is sadly not the first time the Inspektor Gadget addons cause you trouble :(.
Indeed, we often modify the surrounding YAML upstream and the container image is adapted to follow it.
Is there a way to automatize porting the upstream changes here? Do you know how other addons handle it?

Best regards.

@spowelljr
Copy link
Member

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
Copy link
Member

/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 Sep 27, 2024
@minikube-pr-bot
Copy link

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
Copy link

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.

Copy link
Member

@spowelljr spowelljr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fast fix!

@k8s-ci-robot
Copy link
Contributor

[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:

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 Sep 27, 2024
@spowelljr spowelljr merged commit 943a025 into kubernetes:master Sep 27, 2024
33 of 49 checks passed
@spowelljr
Copy link
Member

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
Copy link
Member

Created #19717

@mqasimsarfraz
Copy link
Contributor Author

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
Copy link
Member

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

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.

inspektor-gadget addon fails to run
6 participants