fix: avoid taint cleanup for dry-run rules (#374) - #399
Conversation
✅ Deploy Preview for node-readiness-controller canceled.
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: alanhuangch The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
Hi @alanhuangch. Thanks for your PR. I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with Tip We noticed you've done this a few times! Consider joining the org to skip this step and gain Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions 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. |
|
/ok-to-test |
|
I understand the rationale here, but wouldnt a 'stuck' taint has more side effects than cleaning it up? From a safety standpoint, erring on the side of cleaning up taints might be preferable. Even in a scenario where a user deletes a dry-run rule to update and reapply it, NRC would re-add missing taints to enforce readiness anyway. Could you clarify where do you see leaving the taints is preferred here? |
Description
Prevent deleting an always-dry-run NodeReadinessRule from removing pre-existing Node taints. The cleanup finalizer is now added only when a rule enters enforcement and is retained across later transitions back to dry-run.
Related Issue
Fixes #374
Type of Change
/kind bug
Testing
make testpasses (including controller-gen, gofmt, go vet, and all non-e2e tests; controller suite 64/64)make lintpasses (golangci-lint and kube-api-linter)Checklist
make testpassesmake lintpassesDoes this PR introduce a user-facing change?
Yes: deleting a rule that remained in dry-run mode no longer mutates Node taints.