-
Notifications
You must be signed in to change notification settings - Fork 187
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
Support for running image-based gadgets test in k8s #2867
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My idea was more to implement a new "kubernetes container runtime". i.e. something that runs containers using kubernetes. I hacked a bit and got something working on fa5f2d1, please check the commit message with more details.
What do you think about using it?
e2ec249
to
052e435
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more comments. It's looking really good!
44191ae
to
f3881ac
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's almost ready to go. Few final nits, I'll approve once them are handled. Great job!
02bb6a1
to
a027fd6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Would you mind fixing the last lint error? I'll merge it after it. Thanks!
Should we add a job for running these tests in a minikube cluster, we just have the |
That would be great if you are able to make it. Perhaps we can reuse the same job with a matrix strategy. |
Signed-off-by: pawarpranav83 <pawar.pranav83@gmail.com>
Signed-off-by: pawarpranav83 <pawar.pranav83@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
Thank you for working on this! I have some comments but nothing critical!
Let's see how the CI reacts.
Best regards.
Signed-off-by: pawarpranav83 <pawar.pranav83@gmail.com>
…for testing with k8s Signed-off-by: pawarpranav83 <pawar.pranav83@gmail.com>
Support for running image-based gadgets test in k8s cluster with kubectl-gadget.
Previously we were running the test with ig alongside local containers, this PR adds support for running these tests with kubectl-gadget in the k8s cluster (minikube).
We try to have a single test, which applies different options for the factory runner as well as expected entry based on whether it's
ig
orkubectl-gadget
.Issue #2046
How to use
Set
IG_PATH=ig
(for testing with local containers using ig) orIG_PATH=kubectl-gadget
andIG_RUNTIME=kubernetes
(for testing with containers running in minikube cluster, need to runminikube-deploy
before).Note: You can set this to the actual path of those applications as well, for example,
./ig
or./kubectl-gadget
, should contain the keywordkubectl-gadget
forCurrentTestComponent
to be set asKubectlGadgetTestComponent
.Test Command:
make -C ./gadgets test-k8s