Skip to content

Conversation

@camilamacedo86
Copy link
Member

@camilamacedo86 camilamacedo86 commented Jul 20, 2025

Closes: #4712

NOTE: The E2E tests are designed to run in isolated environments intended specifically for them,
such as the GitHub Actions workflows scaffolded by default.

c/c @wallrj @erikgb @mahmoudhossam

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jul 20, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: camilamacedo86

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 approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 20, 2025
@camilamacedo86
Copy link
Member Author

Hi @mahmoudhossam

Here is the fix for the issue that you opened !!!
It would be nice to get your help to review.

@mahmoudhossam
Copy link

Hi @mahmoudhossam

Here is the fix for the issue that you opened !!! It would be nice to get your help to review.

Hi @camilamacedo86, thank you for this!

I haven't touched the relevant part of the tests so didn't have any feedback for you, sorry about that.

However, looking at the PR code I don't see any mention of the leases.coordination.k8s.io API group, can you point me to where this is addressed in the code?

Bear in mind that deleting the cert-manager namespace won't take care of that as the resources in #4712 are in the kube-system namespace.

@camilamacedo86
Copy link
Member Author

/hold
I will need work more on this one

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 23, 2025
@camilamacedo86 camilamacedo86 changed the title 🐛 (go/v4)(fix): ensure full cert-manager uninstall/teardown for e2e tests WIP: 🐛 (go/v4)(fix): ensure full cert-manager uninstall/teardown for e2e tests Jul 23, 2025
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 23, 2025
@camilamacedo86 camilamacedo86 force-pushed the uninstall-cert branch 3 times, most recently from 83e48c9 to 7071752 Compare July 24, 2025 06:00
@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2025
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 24, 2025
@camilamacedo86 camilamacedo86 changed the title WIP: 🐛 (go/v4)(fix): ensure full cert-manager uninstall/teardown for e2e tests 🐛 (go/v4)(fix): ensure full cert-manager uninstall/teardown for e2e tests Jul 24, 2025
@k8s-ci-robot k8s-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 24, 2025
@camilamacedo86
Copy link
Member Author

/hold cancel

@k8s-ci-robot k8s-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 24, 2025
Copy link
Member

@erikgb erikgb left a comment

Choose a reason for hiding this comment

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

I don't understand why you're rewriting the uninstall. Shouldn't the change just be to add the cleanup of leases in kube-system namespace? Reversing the installation procedure with kubectl delete should work except from this.

@camilamacedo86
Copy link
Member Author

camilamacedo86 commented Jul 24, 2025

I don't understand why you're rewriting the uninstall. Shouldn't the change just be to add the cleanup of leases in kube-system namespace? Reversing the installation procedure with kubectl delete should work except from this.

Hi @erikgb

My motivation was to cover all: https://cert-manager.io/docs/installation/kubectl/#uninstalling
To avoid any other possible scenario.

However, keep it as before, with only the specific caveat that it would be a less verbose, cleaner solution.
I think that is a good idea since it is either a bug fix only

@erikgb
Copy link
Member

erikgb commented Jul 24, 2025

My motivation was to cover all: https://cert-manager.io/docs/installation/kubectl/#uninstalling To avoid any other possible scenario.

Your current approach will make this more fragile to future changes in cert-manager. So I would recommend to just do the fix for leases.

@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jul 24, 2025
@camilamacedo86 camilamacedo86 changed the title 🐛 (go/v4)(fix): ensure full cert-manager uninstall/teardown for e2e tests 🐛 (go/v4)(fix): (e2e) ensure full cert-manager uninstall/teardown remove leases from default ns Jul 24, 2025
@camilamacedo86 camilamacedo86 requested a review from erikgb July 24, 2025 06:50
@camilamacedo86 camilamacedo86 changed the title 🐛 (go/v4)(fix): (e2e) ensure full cert-manager uninstall/teardown remove leases from default ns 🐛 (go/v4)(fix): (e2e) delete CertManager leftover leases in kube-system (not cleaned by default) Jul 24, 2025
@camilamacedo86
Copy link
Member Author

Hi @erikgb

Thank you for the amazing help
Done 🎉

Copy link
Member

@erikgb erikgb left a comment

Choose a reason for hiding this comment

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

/lgtm

🚀

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jul 24, 2025
@k8s-ci-robot k8s-ci-robot merged commit 215d16e into kubernetes-sigs:master Jul 24, 2025
29 checks passed
@camilamacedo86 camilamacedo86 deleted the uninstall-cert branch July 24, 2025 08:04
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. 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.

e2e tests leave resources behind after running

4 participants