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

Fix orphaned CR handling #360

Merged
merged 2 commits into from
Jan 9, 2025
Merged

Conversation

slintes
Copy link
Member

@slintes slintes commented Jan 9, 2025

Why we need this PR

CRs for deleted nodes weren't cleaned up

Changes made

No remediator is deleting AND recreating nodes anymore, so it's safe
to delete the CR when its node was deleted.
For backwards compapibilty we keep the old behaviour for remediators
which mark their CR with the PermanentNodeDeletionExpected condition:
the CR will only be deleted once it succeeded.

Which issue(s) this PR fixes

Fixes #356
ECOPROJECT-2489

Test plan

Unit test updated

Signed-off-by: Marc Sluiter <[email protected]>
No remediator is deleting AND recreating nodes anymore, so it's safe
to delete the CR when its node was deleted.
For backwards compapibilty we keep the old behaviour for remediators
which mark their CR with the PermanentNodeDeletionExpected condition:
the CR will only be deleted once it succeeded.

Fixes the case when escalating remediation with MDR was used, and
CRs for other remediators weren't cleaned up after node deletion.

Signed-off-by: Marc Sluiter <[email protected]>
@openshift-ci openshift-ci bot requested review from mshitrit and razo7 January 9, 2025 11:46
Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: slintes

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

@openshift-ci openshift-ci bot added the approved label Jan 9, 2025
@mshitrit
Copy link
Member

mshitrit commented Jan 9, 2025

/lgtm

@slintes
Copy link
Member Author

slintes commented Jan 9, 2025

/retest

@slintes
Copy link
Member Author

slintes commented Jan 9, 2025

flaky MHC test, not relevant

/override ci/prow/4.14-openshift-e2e
/cherrypick release-0.9

@openshift-cherrypick-robot

@slintes: once the present PR merges, I will cherry-pick it on top of release-0.9 in a new PR and assign it to you.

In response to this:

flaky MHC test, not relevant

/override ci/prow/4.14-openshift-e2e
/cherrypick release-0.9

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.

Copy link
Contributor

openshift-ci bot commented Jan 9, 2025

@slintes: Overrode contexts on behalf of slintes: ci/prow/4.14-openshift-e2e

In response to this:

flaky MHC test, not relevant

/override ci/prow/4.14-openshift-e2e
/cherrypick release-0.9

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.

@openshift-merge-bot openshift-merge-bot bot merged commit a4fff24 into medik8s:main Jan 9, 2025
23 checks passed
@openshift-cherrypick-robot

@slintes: new pull request created: #361

In response to this:

flaky MHC test, not relevant

/override ci/prow/4.14-openshift-e2e
/cherrypick release-0.9

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants