-
Notifications
You must be signed in to change notification settings - Fork 14
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
WIP: nrop: controller: don't delete unused resources explictly #1029
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ffromani 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 |
e2e tests:
|
88b8b3b
to
b9489aa
Compare
/hold |
xref: CNF-3740 |
if not explicitly deleted (or at least ownerRefernce is removed) wouldn't they still be under the related objects of the NRO CR? |
this is one of the questions we need to answer. The rationale for explicit delete is fuzzy and likely obsolete (since few releases) |
b9489aa
to
0d9a026
Compare
0d9a026
to
c3211dc
Compare
good, the expected failures mean that so far the suites are working as expected. We can proceed adding the real new e2e tests. |
ea2e464
to
e415ac8
Compare
needs to be rebased on top of #1045 |
5640c6d
to
d14d861
Compare
add missing GinkgoHelper() declaration to make error trace point to the failing test, not to the shared helper. Signed-off-by: Francesco Romani <[email protected]>
cosmetic change, no intended change in behavior Signed-off-by: Francesco Romani <[email protected]>
We add Controller References, so we expect the system to take care of orphaned resources. Move the relevant code in the new package `dangling`, which will cleaned up and reused later. Signed-off-by: Francesco Romani <[email protected]>
keep the happy path on the left. No inteded changes in behavior. Signed-off-by: Francesco Romani <[email protected]>
instead of expecting them from the caller. No intended changes in behavior. Signed-off-by: Francesco Romani <[email protected]>
Don't delete straight up orphan objects, return them. This way we can use this code in validation. Signed-off-by: Francesco Romani <[email protected]>
d14d861
to
675fea8
Compare
/hold cancel tests are good enough now |
675fea8
to
0c6af74
Compare
/hold I think finally I managed to remember. The scenario the explicit delete is supposed to cover is:
|
Signed-off-by: Francesco Romani <[email protected]>
wire in validator support for dangling objects. Note: `pkg/validator` imports from `internal` since few releases, so it should be moved or changed. Signed-off-by: Francesco Romani <[email protected]>
These utilities are really code we want to use internally, so they hardly will ever promoted in `pkg/`, and surely not in their current form, without extensive polishing. We can reuse this code in the e2e tests however. Trivial code movement and minimal API changes to support the move (e.g. renderScheduler -> render.RenderScheduler -> render.Scheduler) Signed-off-by: Francesco Romani <[email protected]>
The uninstall tests can and should check that all the objects managed by a NRO instance are deleted once the NRO object itself is deleted. Note this does not include yet edits in node groups, because those are hard to setup in CI. Signed-off-by: Francesco Romani <[email protected]>
WIP TBD Signed-off-by: Francesco Romani <[email protected]>
0c6af74
to
6eece60
Compare
@ffromani: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
much ado about nothing. There are good ideas in this PR, but the overall concept turned out wrong. I'll post later more targeted PRs to recycle the good bits in there. |
We add Controller References, so we expect the system to take care of orphaned resources.
Hence, the explicit delete logic can be removed. That logic was always suspicious, it should never be needed and it's a sweeping yet effective fix that could have masked real issues. It's time to address these issues and had real ownership and object cleanup instead of using this bandaid.
Besides simplification, we now are down two List() per reconcile loop