-
Notifications
You must be signed in to change notification settings - Fork 1.5k
e2e tests leave resources behind after running #4712
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
Comments
Thanks for opening this issue! Just to better understand the context, could you please clarify a few things?
This information will help us investigate and assist you more effectively. Thanks again! |
I'm running the E2E tests scaffolded in a project generated by Kubebuilder. To be more specific: the problem is with this code. This way of uninstalling cert-manager doesn't take into account the resources that could be generated by cert-manager as part of its runtime. Maybe using helm for (un)installing cert-manager will fix this? |
Hi @mahmoudhossam, Thank you for your response!
Given that, your proposal in #4718 doesn’t actually address your scenario. In this case, what we can do is:
Let me know your thoughts — please feel free to propose an improvement in for the uninstall methods if they are required. |
Thanks for the speedy response, @camilamacedo86! I'm not using the tutorial code, I just pulled the first instance of the code I'm seeing in the Kubebuilder codebase. The codebase I'm working on (unfortunately private) works with existing kubernetes types so As for the test utils code, I can test with using helm to install/uninstall cert-manager and report back. |
We should not use Helm to do that since Helm is not required for the projects. And the same changes applied to the funcs used by Kubebuilder tests persei at: https://github.com/kubernetes-sigs/kubebuilder/tree/master/test/e2e/utils Ideally, this is defined in the documentation of those solutions. |
What broke? What's expected?
Running e2e tests leaves cert-manager related resources behind, causing failures in subsequent runs.
Namely, the resources
leases.coordination.k8s.io/cert-manager-cainjector-leader-election
andleases.coordination.k8s.io/cert-manager-controller
in thekube-system
namespace.Reproducing this issue
Run
make test-e2e
thenkubectl get -n kube-system leases.coordination.k8s.io
KubeBuilder (CLI) Version
PROJECT version
3
Plugin versions
Other versions
Kubectl:
Go 1.23.0
sigs.k8s.io/controller-runtime v0.20.0
Extra Labels
No response
The text was updated successfully, but these errors were encountered: