feat: honor IncludeDeletingResources in ManagementClusterClassifier matching - #512
Merged
Merged
Conversation
gianlucam76
force-pushed
the
bug-1970
branch
from
September 16, 2026 07:21
5e045fb to
b073136
Compare
…atching `fetchResourcesForSelector` always excluded any resource with a non-zero `metadata.deletionTimestamp` before evaluation. This made it impossible to classify/react based on a resource while it is being deleted but still exists. libsveltos now has an opt-in `ResourceSelector.IncludeDeletingResources` field (default `false). This PR makes `mgmtcluster_classifier_utils.go` honor it, matching the equivalent fix already made in sveltos-agent. This PR also advances sveltos-agent images which contain same change for classifier, eventSource and healthCheck resource selection. Part of
gianlucam76
force-pushed
the
bug-1970
branch
from
September 16, 2026 11:40
b073136 to
d427c8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fetchResourcesForSelectoralways excluded any resource with a non-zerometadata.deletionTimestampbefore evaluation.This made it impossible to classify/react based on a resource while it is being deleted but still exists.
libsveltos now has an opt-in
ResourceSelector.IncludeDeletingResourcesfield (defaultfalse). This PR makesmgmtcluster_classifier_utils.go` honor it, matching the equivalent fix already made in sveltos-agent.This PR also advances sveltos-agent images which contain same change for classifier, eventSource and healthCheck resource selection.
Part of 1970