What happened?
When NodeReconciler encounters an error evaluating a node, it records it in rule.Status.FailedNodes. If the error resolves on the next reconcile and evaluation succeeds, the controller fails to clear the old failure because it lacks an else block to handle success.
The stale failure is read from the local cache and actively merged back into the API server, permanently trapping the healthy node in the FailedNodes array. It only clears if a manual rule edit forces the RuleReconciler to run.
Steps to Reproduce
- Trigger a transient error during node evaluation
- Observe the node is added to
rule.Status.FailedNodes.
- Resolve the error. The controller retries and evaluation succeeds.
- Check the rule status. The node operates normally but is permanently stuck in
FailedNodes.
Expected Behavior
processNodeAgainstAllRules must include an else block to explicitly clear the node from rule.Status.FailedNodes upon successful evaluation, mirroring the correct logic found in processAllNodesForRule.
Controller Version / Image Tag
main
Kubernetes Version
Client Version v1.30.0
Controller Logs
No response
Additional Details
This issue is entirely distinct from PR #222 and PR #237.
Those PRs fixed the retry mechanism by ensuring that transient errors are properly returned to the reconciler so controller runtime can requeue them.
While those PRs ensured the controller retries on failure, they did not fix the controller forgetting to clean up Status.FailedNodes upon success.
What happened?
When
NodeReconcilerencounters an error evaluating a node, it records it inrule.Status.FailedNodes. If the error resolves on the next reconcile and evaluation succeeds, the controller fails to clear the old failure because it lacks anelseblock to handle success.The stale failure is read from the local cache and actively merged back into the API server, permanently trapping the healthy node in the
FailedNodesarray. It only clears if a manual rule edit forces theRuleReconcilerto run.Steps to Reproduce
rule.Status.FailedNodes.FailedNodes.Expected Behavior
processNodeAgainstAllRulesmust include anelseblock to explicitly clear the node fromrule.Status.FailedNodesupon successful evaluation, mirroring the correct logic found inprocessAllNodesForRule.Controller Version / Image Tag
main
Kubernetes Version
Client Version v1.30.0
Controller Logs
No response
Additional Details
This issue is entirely distinct from PR #222 and PR #237.
Those PRs fixed the retry mechanism by ensuring that transient errors are properly returned to the reconciler so controller runtime can requeue them.
While those PRs ensured the controller retries on failure, they did not fix the controller forgetting to clean up Status.FailedNodes upon success.